summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index d17879b587b..63e452ba9c8 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1176,7 +1176,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) {
}
Attribute FnAttrs = CallerPAL.getFnAttributes();
- if (FnAttrs.hasAttributes())
+ if (CallerPAL.hasAttributes(AttributeSet::FunctionIndex))
attrVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex,
FnAttrs));
@@ -1320,7 +1320,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS,
// Add any function attributes.
Attr = Attrs.getFnAttributes();
- if (Attr.hasAttributes())
+ if (Attrs.hasAttributes(AttributeSet::FunctionIndex))
NewAttrs.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex,
Attr));
OpenPOWER on IntegriCloud