Skip to content

Commit 5781d79

Browse files
committed
ShadowStackGCLowering: Remove unnecessary std::string
1 parent 1196975 commit 5781d79

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/ShadowStackGCLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Type *ShadowStackGCLowering::GetConcreteStackEntryType(Function &F) {
173173
bool ShadowStackGCLowering::doInitialization(Module &M) {
174174
bool Active = false;
175175
for (Function &F : M) {
176-
if (F.hasGC() && F.getGC() == std::string("shadow-stack")) {
176+
if (F.hasGC() && F.getGC() == "shadow-stack") {
177177
Active = true;
178178
break;
179179
}
@@ -292,8 +292,7 @@ void ShadowStackGCLowering::getAnalysisUsage(AnalysisUsage &AU) const {
292292
/// runOnFunction - Insert code to maintain the shadow stack.
293293
bool ShadowStackGCLowering::runOnFunction(Function &F) {
294294
// Quick exit for functions that do not use the shadow stack GC.
295-
if (!F.hasGC() ||
296-
F.getGC() != std::string("shadow-stack"))
295+
if (!F.hasGC() || F.getGC() != "shadow-stack")
297296
return false;
298297

299298
LLVMContext &Context = F.getContext();

0 commit comments

Comments
 (0)