[llvm] 5781d79 - ShadowStackGCLowering: Remove unnecessary std::string
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 02:13:02 PST 2023
Author: Matt Arsenault
Date: 2023-12-19T17:12:52+07:00
New Revision: 5781d79a20a44a0c8f0e96f2bc11386a18ecf59c
URL: https://github.com/llvm/llvm-project/commit/5781d79a20a44a0c8f0e96f2bc11386a18ecf59c
DIFF: https://github.com/llvm/llvm-project/commit/5781d79a20a44a0c8f0e96f2bc11386a18ecf59c.diff
LOG: ShadowStackGCLowering: Remove unnecessary std::string
Added:
Modified:
llvm/lib/CodeGen/ShadowStackGCLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
index ff6790a5a825bd..d4840d117110b0 100644
--- a/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
+++ b/llvm/lib/CodeGen/ShadowStackGCLowering.cpp
@@ -173,7 +173,7 @@ Type *ShadowStackGCLowering::GetConcreteStackEntryType(Function &F) {
bool ShadowStackGCLowering::doInitialization(Module &M) {
bool Active = false;
for (Function &F : M) {
- if (F.hasGC() && F.getGC() == std::string("shadow-stack")) {
+ if (F.hasGC() && F.getGC() == "shadow-stack") {
Active = true;
break;
}
@@ -292,8 +292,7 @@ void ShadowStackGCLowering::getAnalysisUsage(AnalysisUsage &AU) const {
/// runOnFunction - Insert code to maintain the shadow stack.
bool ShadowStackGCLowering::runOnFunction(Function &F) {
// Quick exit for functions that do not use the shadow stack GC.
- if (!F.hasGC() ||
- F.getGC() != std::string("shadow-stack"))
+ if (!F.hasGC() || F.getGC() != "shadow-stack")
return false;
LLVMContext &Context = F.getContext();
More information about the llvm-commits
mailing list