Skip to content

Commit 73f15dc

Browse files
committed
use getNameOrAsOperand
1 parent 97f43c4 commit 73f15dc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/MachineCFGPrinter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ MachineCFGPrinterPass::run(MachineFunction &MF,
5959
MachineFunctionAnalysisManager &MFAM) {
6060
if (!MCFGFuncName.empty() && !MF.getName().contains(MCFGFuncName))
6161
return PreservedAnalyses::all();
62-
std::string Name;
63-
raw_string_ostream SS(Name);
64-
MF.getFunction().printAsOperand(SS, /*PrintType=*/false);
65-
OS << "Writing Machine CFG for function " << Name;
62+
OS << "Writing Machine CFG for function "
63+
<< MF.getFunction().getNameOrAsOperand();
6664
writeMCFGToDotFile(MF);
6765
return PreservedAnalyses::all();
6866
}

0 commit comments

Comments
 (0)