diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-14 08:54:39 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-14 08:54:39 +0000 |
commit | 4d68ed5f03ad1235946377eb32b5c4d0412f2e48 (patch) | |
tree | bd9ac51490c862a1cce0987f552226101dbc36ac /lib/CodeGen/CodeGenModule.cpp | |
parent | e91e9ecf2f6ef18ed9d9642915e5e1abb63e150a (diff) |
Remove operator cast method in favor of querying with the correct method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 0d70968b9d..7e688585d0 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1820,7 +1820,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, llvm::Attributes RAttrs = AttrList.getRetAttributes(); // Add the return attributes. - if (RAttrs) + if (RAttrs.hasAttributes()) AttrVec.push_back(llvm::AttributeWithIndex::get(0, RAttrs)); // If the function was passed too few arguments, don't transform. If extra @@ -1837,13 +1837,15 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old, } // Add any parameter attributes. - if (llvm::Attributes PAttrs = AttrList.getParamAttributes(ArgNo + 1)) + llvm::Attributes PAttrs = AttrList.getParamAttributes(ArgNo + 1); + if (PAttrs.hasAttributes()) AttrVec.push_back(llvm::AttributeWithIndex::get(ArgNo + 1, PAttrs)); } if (DontTransform) continue; - if (llvm::Attributes FnAttrs = AttrList.getFnAttributes()) + llvm::Attributes FnAttrs = AttrList.getFnAttributes(); + if (FnAttrs.hasAttributes()) AttrVec.push_back(llvm::AttributeWithIndex::get(~0, FnAttrs)); // Okay, we can transform this. Create the new call instruction and copy |