summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/IR/DataLayout.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h
index cd096dcbb5..3079dec783 100644
--- a/include/llvm/IR/DataLayout.h
+++ b/include/llvm/IR/DataLayout.h
@@ -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);
}