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 | 0120167c204cbd472a6fea16a9dfff75825db996 (patch) | |
tree | 46c393cde79cd8fa5c8eec8456e4d006a810f960 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 76d2cd2f607f01fae4b987a18508a859e2bfb6c7 (diff) | |
download | bcm5719-llvm-0120167c204cbd472a6fea16a9dfff75825db996.tar.gz bcm5719-llvm-0120167c204cbd472a6fea16a9dfff75825db996.zip |
Remove operator cast method in favor of querying with the correct method.
llvm-svn: 165900
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0d70968b9de..7e688585d09 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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 |