File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
llvm/lib/Transforms/Instrumentation Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1517,12 +1517,14 @@ 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
1522
+ std::string str;
1520
1523
1521
1524
// Dumping the full instruction is expensive because the operands etc.
1522
1525
// likely make the string unique per instruction instance, hence we
1523
1526
// offer a choice whether to only print the instruction name.
1524
1527
if (ClEmbedFaultingInst == MSanEmbedFaultingInstructionMode::Full) {
1525
- std::string str;
1526
1528
llvm::raw_string_ostream buf (str);
1527
1529
Instruction->print (buf);
1528
1530
InstNameStrRef = StringRef (str);
You can’t perform that action at this time.
0 commit comments