File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
llvm/lib/Transforms/Instrumentation Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1517,9 +1517,10 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
1517
1517
if (ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None) {
1518
1518
IRBuilder<> IRB0 (Instruction);
1519
1519
StringRef InstNameStrRef;
1520
- // Keep str at this scope level because it is indirectly needed by
1521
- // CreateGlobalString
1520
+ // Keep str and maybeBuf at this scope level because they may be
1521
+ // indirectly needed by CreateGlobalString
1522
1522
std::string str;
1523
+ SmallVector<char > maybeBuf;
1523
1524
1524
1525
// Dumping the full instruction is expensive because the operands etc.
1525
1526
// likely make the string unique per instruction instance, hence we
@@ -1533,7 +1534,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
1533
1534
if (CallInst *CI = dyn_cast<CallInst>(Instruction)) {
1534
1535
if (CI->getCalledFunction ()) {
1535
1536
Twine description = " call " + CI->getCalledFunction ()->getName ();
1536
- SmallVector<char > maybeBuf;
1537
1537
InstNameStrRef = description.toStringRef (maybeBuf);
1538
1538
} else {
1539
1539
InstNameStrRef = StringRef (" Unknown call" );
You can’t perform that action at this time.
0 commit comments