diff options
author | Youngsuk Kim <joseph942010@gmail.com> | 2024-07-01 21:52:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 21:52:37 -0400 |
commit | a95c85fba5fde0db8f128cf5564ac333e2b1f90f (patch) | |
tree | 33e65940496208c76803c15d2d0f38006ee9fcde /llvm/lib/CodeGen/MachineOutliner.cpp | |
parent | 9b8c2fae38bcff0b16d996ee002ff1e989fa23ea (diff) | |
download | llvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.zip llvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.tar.gz llvm-a95c85fba5fde0db8f128cf5564ac333e2b1f90f.tar.bz2 |
[llvm][CodeGen] Avoid 'raw_string_ostream::str' (NFC) (#97318)
Since `raw_string_ostream` doesn't own the string buffer, it is
desirable (in terms of memory safety) for users to directly reference
the string buffer rather than use `raw_string_ostream::str()`.
Work towards TODO comment to remove `raw_string_ostream::str()`.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineOutliner.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index 76e5952..c7ccf10 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -804,8 +804,7 @@ MachineFunction *MachineOutliner::createOutlinedFunction( Mg.getNameWithPrefix(MangledNameStream, F, false); DISubprogram *OutlinedSP = DB.createFunction( - Unit /* Context */, F->getName(), StringRef(MangledNameStream.str()), - Unit /* File */, + Unit /* Context */, F->getName(), StringRef(Dummy), Unit /* File */, 0 /* Line 0 is reserved for compiler-generated code. */, DB.createSubroutineType( DB.getOrCreateTypeArray(std::nullopt)), /* void type */ |