diff options
author | David Blaikie <dblaikie@gmail.com> | 2021-07-08 13:30:14 -0700 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2021-07-08 13:37:57 -0700 |
commit | 1def2579e10dd84405465f403e8c31acebff0c97 (patch) | |
tree | 8f8965df36c9eadb466cccd78d1a384ebd550cc5 /llvm/lib/Object/IRSymtab.cpp | |
parent | a7992b43a54f89dca7b76cb79d1045acce6dbe1f (diff) | |
download | llvm-1def2579e10dd84405465f403e8c31acebff0c97.zip llvm-1def2579e10dd84405465f403e8c31acebff0c97.tar.gz llvm-1def2579e10dd84405465f403e8c31acebff0c97.tar.bz2 |
PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23
C++23 will make these conversions ambiguous - so fix them to make the
codebase forward-compatible with C++23 (& a follow-up change I've made
will make this ambiguous/invalid even in <C++23 so we don't regress
this & it generally improves the code anyway)
Diffstat (limited to 'llvm/lib/Object/IRSymtab.cpp')
-rw-r--r-- | llvm/lib/Object/IRSymtab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/IRSymtab.cpp b/llvm/lib/Object/IRSymtab.cpp index 4ff73f9..70655d1 100644 --- a/llvm/lib/Object/IRSymtab.cpp +++ b/llvm/lib/Object/IRSymtab.cpp @@ -230,7 +230,7 @@ Error Builder::addSymbol(const ModuleSymbolTable &Msymtab, raw_svector_ostream OS(Name); Msymtab.printSymbolName(OS, Msym); } - setStr(Sym.Name, Saver.save(StringRef(Name))); + setStr(Sym.Name, Saver.save(Name.str())); auto Flags = Msymtab.getSymbolFlags(Msym); if (Flags & object::BasicSymbolRef::SF_Undefined) |