[llvm] ea88634 - [Support] Remove an unnecessary cast (NFC) (#146810)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 12:02:29 PDT 2025
Author: Kazu Hirata
Date: 2025-07-03T12:02:26-07:00
New Revision: ea88634764f832285eba11e86a54b1c5e07a72c8
URL: https://github.com/llvm/llvm-project/commit/ea88634764f832285eba11e86a54b1c5e07a72c8
DIFF: https://github.com/llvm/llvm-project/commit/ea88634764f832285eba11e86a54b1c5e07a72c8.diff
LOG: [Support] Remove an unnecessary cast (NFC) (#146810)
We don't need to cast std::string to std::string.
Added:
Modified:
llvm/lib/Support/Signals.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/Signals.cpp b/llvm/lib/Support/Signals.cpp
index 59288e97cb24e..f8a14a45ddc3e 100644
--- a/llvm/lib/Support/Signals.cpp
+++ b/llvm/lib/Support/Signals.cpp
@@ -277,7 +277,7 @@ static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace,
// If we don't know argv0 or the address of main() at this point, try
// to guess it anyway (it's possible on some platforms).
std::string MainExecutableName =
- sys::fs::exists(Argv0) ? (std::string)std::string(Argv0)
+ sys::fs::exists(Argv0) ? std::string(Argv0)
: sys::fs::getMainExecutable(nullptr, nullptr);
auto SymbolizedAddressesOpt = collectAddressSymbols(
More information about the llvm-commits
mailing list