Skip to content

Commit 2f2f248

Browse files
committed
Address one other piece of feedback
1 parent e539a52 commit 2f2f248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,13 +1516,13 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
15161516
Value *InstName = nullptr;
15171517
if (ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None) {
15181518
IRBuilder<> IRB0(Instruction);
1519-
std::string str;
15201519
StringRef InstNameStrRef;
15211520

15221521
// Dumping the full instruction is expensive because the operands etc.
15231522
// likely make the string unique per instruction instance, hence we
15241523
// offer a choice whether to only print the instruction name.
15251524
if (ClEmbedFaultingInst == MSanEmbedFaultingInstructionMode::Full) {
1525+
std::string str;
15261526
llvm::raw_string_ostream buf(str);
15271527
Instruction->print(buf);
15281528
InstNameStrRef = StringRef(str);

0 commit comments

Comments
 (0)