[cfe-commits] r173099 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Bill Wendling isanbard at gmail.com
Mon Jan 21 14:45:01 PST 2013


Author: void
Date: Mon Jan 21 16:45:00 2013
New Revision: 173099

URL: http://llvm.org/viewvc/llvm-project?rev=173099&view=rev
Log:
Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.

This further restricts the use of the Attribute class to the Attribute family of
classes.

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=173099&r1=173098&r2=173099&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jan 21 16:45:00 2013
@@ -1939,9 +1939,10 @@
 
     // Collect any return attributes from the call.
     if (oldAttrs.hasAttributes(llvm::AttributeSet::ReturnIndex))
-      newAttrs.push_back(llvm::AttributeWithIndex::get(
-                                llvm::AttributeSet::ReturnIndex,
-                                oldAttrs.getRetAttributes()));
+      newAttrs.push_back(
+        llvm::AttributeWithIndex::get(newFn->getContext(),
+                                      llvm::AttributeSet::ReturnIndex,
+                                      oldAttrs.getRetAttributes()));
 
     // If the function was passed too few arguments, don't transform.
     unsigned newNumArgs = newFn->arg_size();





More information about the cfe-commits mailing list