diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-14 08:54:26 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-14 08:54:26 +0000 |
commit | 7be7848e17f60825f5fbc177b8a25909a30ddb00 (patch) | |
tree | 829167031026fff9cf34cb49fceda7e13bd9477b /lib/Transforms/InstCombine/InstCombineCalls.cpp | |
parent | fd8d62c0b449b9070dc18355ac243c7fa78d40d6 (diff) | |
download | external_llvm-7be7848e17f60825f5fbc177b8a25909a30ddb00.zip external_llvm-7be7848e17f60825f5fbc177b8a25909a30ddb00.tar.gz external_llvm-7be7848e17f60825f5fbc177b8a25909a30ddb00.tar.bz2 |
Remove operator cast method in favor of querying with the correct method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index aa4b6b4..6023ad1 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1131,7 +1131,8 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { } // Add any parameter attributes. - if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1)) + Attributes PAttrs = CallerPAL.getParamAttributes(i + 1); + if (PAttrs.hasAttributes()) attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs)); } @@ -1159,13 +1160,15 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { } // Add any parameter attributes. - if (Attributes PAttrs = CallerPAL.getParamAttributes(i + 1)) + Attributes PAttrs = CallerPAL.getParamAttributes(i + 1); + if (PAttrs.hasAttributes()) attrVec.push_back(AttributeWithIndex::get(i + 1, PAttrs)); } } } - if (Attributes FnAttrs = CallerPAL.getFnAttributes()) + Attributes FnAttrs = CallerPAL.getFnAttributes(); + if (FnAttrs.hasAttributes()) attrVec.push_back(AttributeWithIndex::get(~0, FnAttrs)); if (NewRetTy->isVoidTy()) @@ -1274,7 +1277,8 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, // mean appending it. Likewise for attributes. // Add any result attributes. - if (Attributes Attr = Attrs.getRetAttributes()) + Attributes Attr = Attrs.getRetAttributes(); + if (Attr.hasAttributes()) NewAttrs.push_back(AttributeWithIndex::get(0, Attr)); { @@ -1295,7 +1299,8 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, // Add the original argument and attributes. NewArgs.push_back(*I); - if (Attributes Attr = Attrs.getParamAttributes(Idx)) + Attr = Attrs.getParamAttributes(Idx); + if (Attr.hasAttributes()) NewAttrs.push_back (AttributeWithIndex::get(Idx + (Idx >= NestIdx), Attr)); @@ -1304,7 +1309,8 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, } // Add any function attributes. - if (Attributes Attr = Attrs.getFnAttributes()) + Attr = Attrs.getFnAttributes(); + if (Attr.hasAttributes()) NewAttrs.push_back(AttributeWithIndex::get(~0, Attr)); // The trampoline may have been bitcast to a bogus type (FTy). |