[llvm-commits] [dragonegg] r173206 - /dragonegg/trunk/src/Convert.cpp

Bill Wendling isanbard at gmail.com
Tue Jan 22 15:40:21 PST 2013


Author: void
Date: Tue Jan 22 17:40:21 2013
New Revision: 173206

URL: http://llvm.org/viewvc/llvm-project?rev=173206&view=rev
Log:
Update to the new AttributeSet encapsulation of 'addAttr'.

Modified:
    dragonegg/trunk/src/Convert.cpp

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=173206&r1=173205&r2=173206&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Jan 22 17:40:21 2013
@@ -3269,12 +3269,10 @@
     PAL = cast<Function>(Callee)->getAttributes();
 
   // Work out whether to use an invoke or an ordinary call.
-  if (!stmt_could_throw_p(stmt)) {
+  if (!stmt_could_throw_p(stmt))
     // This call does not throw - mark it 'nounwind'.
-    Attribute NoUnwind = Attribute::get(Callee->getContext(),
-                                          Attribute::NoUnwind);
-    PAL = PAL.addAttr(Callee->getContext(), ~0, NoUnwind);
-  }
+    PAL = PAL.addAttribute(Callee->getContext(), AttributeSet::FunctionIndex,
+                           Attribute::NoUnwind);
 
   if (!PAL.hasAttribute(AttributeSet::FunctionIndex,
                         Attribute::NoUnwind)) {
@@ -3374,7 +3372,8 @@
       // If the argument is split into multiple scalars, assign the
       // attributes to all scalars of the aggregate.
       for (unsigned j = OldSize + 1; j <= CallOperands.size(); ++j)
-        PAL = PAL.addAttr(Context, j, Attribute::get(Context, AttrBuilder));
+        PAL = PAL.addAttr(Context, j,
+                          AttributeSet::get(Context, j, AttrBuilder));
     }
 
     Client.clear();





More information about the llvm-commits mailing list