summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp2
-rw-r--r--llvm/lib/Transforms/Utils/InlineCost.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 6f1898a2e0e..60895f3e8f0 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -512,7 +512,7 @@ struct VISIBILITY_HIDDEN ExitOpt : public LibCallOptimization {
// Verify the caller is main, and that the result type of main matches the
// argument type of exit.
- if (!Caller->isName("main") || !Caller->hasExternalLinkage() ||
+ if (Caller->getName() != "main" || !Caller->hasExternalLinkage() ||
Caller->getReturnType() != CI->getOperand(1)->getType())
return 0;
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp
index 9cd47027631..1a04b96be51 100644
--- a/llvm/lib/Transforms/Utils/InlineCost.cpp
+++ b/llvm/lib/Transforms/Utils/InlineCost.cpp
@@ -125,7 +125,7 @@ void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) {
// probably won't do this in callers.
if (Function *F = CS.getCalledFunction())
if (F->isDeclaration() &&
- (F->isName("setjmp") || F->isName("_setjmp"))) {
+ (F->getName() == "setjmp" || F->getName() == "_setjmp")) {
NeverInline = true;
return;
}
OpenPOWER on IntegriCloud