[cfe-commits] r104998 - in /cfe/trunk: lib/Sema/SemaAttr.cpp test/Parser/pragma-options.c

Daniel Dunbar daniel at zuster.org
Fri May 28 12:43:33 PDT 2010


Author: ddunbar
Date: Fri May 28 14:43:33 2010
New Revision: 104998

URL: http://llvm.org/viewvc/llvm-project?rev=104998&view=rev
Log:
Sema: Just ignore '#pragma options align=power' for now, this is no worse than
what we used to be doing, and makes sure that paired '#pragma options
align=reset' won't fail.

Modified:
    cfe/trunk/lib/Sema/SemaAttr.cpp
    cfe/trunk/test/Parser/pragma-options.c

Modified: cfe/trunk/lib/Sema/SemaAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAttr.cpp?rev=104998&r1=104997&r2=104998&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAttr.cpp Fri May 28 14:43:33 2010
@@ -135,7 +135,6 @@
     return;
   }
 
-  // We don't support #pragma options align=power.
   switch (Kind) {
     // For all targets we support native and natural are the same.
     //
@@ -146,6 +145,12 @@
     Context->setAlignment(0);
     break;
 
+    // FIXME: We just ignore #pragma options align=power for now.
+  case POAK_Power:
+    Context->push(0);
+    Context->setAlignment(0);
+    break;
+
     // Note that '#pragma options align=packed' is not equivalent to attribute
     // packed, it has a different precedence relative to attribute aligned.
   case POAK_Packed:

Modified: cfe/trunk/test/Parser/pragma-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/pragma-options.c?rev=104998&r1=104997&r2=104998&view=diff
==============================================================================
--- cfe/trunk/test/Parser/pragma-options.c (original)
+++ cfe/trunk/test/Parser/pragma-options.c Fri May 28 14:43:33 2010
@@ -9,4 +9,4 @@
 #pragma options align=natural
 #pragma options align=reset
 #pragma options align=mac68k
-/* expected-warning {{unsupported alignment option}} */ #pragma options align=power
+#pragma options align=power





More information about the cfe-commits mailing list