Fix build failure with MSVC, following r208680
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Tue, 13 May 2014 11:16:22 +0000 (11:16 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Tue, 13 May 2014 11:16:22 +0000 (11:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208684 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/DataLayout.h

index cd096dc..3079dec 100644 (file)
@@ -27,6 +27,9 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/DataTypes.h"
 
+// this needs to be outside of the namespace, to avoid conflict with llvm-c decl
+typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
+
 namespace llvm {
 
 class Value;
@@ -445,8 +448,6 @@ public:
   }
 };
 
-typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
-
 inline DataLayout *unwrap(LLVMTargetDataRef P) {
    return reinterpret_cast<DataLayout*>(P);
 }