[cfe-commits] r165900 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Bill Wendling
isanbard at gmail.com
Sun Oct 14 01:54:39 PDT 2012
Author: void
Date: Sun Oct 14 03:54:39 2012
New Revision: 165900
URL: http://llvm.org/viewvc/llvm-project?rev=165900&view=rev
Log:
Remove operator cast method in favor of querying with the correct method.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=165900&r1=165899&r2=165900&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sun Oct 14 03:54:39 2012
@@ -1820,7 +1820,7 @@
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 @@
}
// 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
More information about the cfe-commits
mailing list