[llvm-commits] [llvm-gcc-4.2] r75388 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-types.cpp

Nick Lewycky nicholas at mxc.ca
Sat Jul 11 14:47:28 PDT 2009


Author: nicholas
Date: Sat Jul 11 16:47:28 2009
New Revision: 75388

URL: http://llvm.org/viewvc/llvm-project?rev=75388&view=rev
Log:
Move C-style includes ahead of the LLVM ones to prevent LLVM #define's from
leaking into GCC. This fixes the compiler error on linux where
VISIBILITY_HIDDEN is defined (gcc tries to use it as a name in an enum).

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

Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=75388&r1=75387&r2=75388&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Sat Jul 11 16:47:28 2009
@@ -30,14 +30,7 @@
 #define LLVM_ABI_H
 
 #include "llvm-internal.h"
-#include "llvm/Constants.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/Attributes.h"
-#include "llvm/Target/TargetData.h"
 
-namespace llvm {
-  class BasicBlock;
-}
 extern "C" {
 #include "config.h"
 #include "system.h"
@@ -46,6 +39,15 @@
 #include "tree.h"
 }  
 
+#include "llvm/Attributes.h"
+#include "llvm/Constants.h"
+#include "llvm/DerivedTypes.h"
+#include "llvm/Target/TargetData.h"
+
+namespace llvm {
+  class BasicBlock;
+}
+
 /// DefaultABIClient - This is a simple implementation of the ABI client
 /// interface that can be subclassed.
 struct DefaultABIClient {

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=75388&r1=75387&r2=75388&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Sat Jul 11 16:47:28 2009
@@ -25,6 +25,15 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm-internal.h"
+
+extern "C" {
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tree.h"
+}
+#include "llvm-abi.h"
+
 #include "llvm/CallingConv.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
@@ -38,14 +47,6 @@
 #include "llvm/Support/raw_ostream.h"
 #include <map>
 
-extern "C" {
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tree.h"
-}
-#include "llvm-abi.h"
-
 //===----------------------------------------------------------------------===//
 //                   Matching LLVM types with GCC trees
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list