[llvm-commits] [llvm-gcc-4.2] r142347 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Duncan Sands baldrick at free.fr
Tue Oct 18 02:20:04 PDT 2011


Author: baldrick
Date: Tue Oct 18 04:20:04 2011
New Revision: 142347

URL: http://llvm.org/viewvc/llvm-project?rev=142347&view=rev
Log:
Hook up the returns_twice attribute to GCC's ECF_RETURNS_TWICE.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=142347&r1=142346&r2=142347&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Tue Oct 18 04:20:04 2011
@@ -901,6 +901,10 @@
   if (flags & ECF_NOTHROW)
     FnAttributes |= Attribute::NoUnwind;
 
+  // Check for 'returnstwice' function attribute.
+  if (flags & ECF_RETURNS_TWICE)
+    FnAttributes |= Attribute::ReturnsTwice;
+
   // Check for 'readnone' function attribute.
   // Both PURE and CONST will be set if the user applied
   // __attribute__((const)) to a function the compiler





More information about the llvm-commits mailing list