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/Support/Signals.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/Support/Signals.cpp')
-rw-r--r-- | llvm/lib/Support/Signals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Signals.cpp b/llvm/lib/Support/Signals.cpp index 5aa1a9e..4e70eed 100644 --- a/llvm/lib/Support/Signals.cpp +++ b/llvm/lib/Support/Signals.cpp @@ -165,8 +165,8 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace, } } - Optional<StringRef> Redirects[] = {StringRef(InputFile), - StringRef(OutputFile), StringRef("")}; + Optional<StringRef> Redirects[] = {InputFile.str(), OutputFile.str(), + StringRef("")}; StringRef Args[] = {"llvm-symbolizer", "--functions=linkage", "--inlining", #ifdef _WIN32 // Pass --relative-address on Windows so that we don't |