[llvm] [Support] Remove an unnecessary cast (NFC) (PR #146810)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 23:27:56 PDT 2025
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/146810
>From 3b39c26552c168ea7a8a452be5633dd5b0fff1c8 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 2 Jul 2025 09:35:12 -0700
Subject: [PATCH] [Support] Remove an unnecessary cast (NFC)
We don't need to cast std::string to std::string.
---
llvm/lib/Support/Signals.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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