Fix ODR violation. NFC.
authorDiego Novillo <dnovillo@google.com>
Mon, 27 Jul 2015 18:27:23 +0000 (18:27 +0000)
committerDiego Novillo <dnovillo@google.com>
Mon, 27 Jul 2015 18:27:23 +0000 (18:27 +0000)
There is an ODR conflict between lib/ExecutionEngine/ExecutionEngineBindings.cpp
and lib/Target/TargetMachineC.cpp. The inline definitions should simply
be marked static (thanks dblaikie for the hint).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243298 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngineBindings.cpp
lib/Target/TargetMachineC.cpp

index 892c941a292ffdaa211f1359c41a1eee7180ddae..f7aba4cec04853d57d0c2bc8758ba4cd8cb9d4ed 100644 (file)
@@ -29,7 +29,7 @@ using namespace llvm;
 DEFINE_SIMPLE_CONVERSION_FUNCTIONS(GenericValue, LLVMGenericValueRef)
 
 
-inline LLVMTargetMachineRef wrap(const TargetMachine *P) {
+static LLVMTargetMachineRef wrap(const TargetMachine *P) {
   return
   reinterpret_cast<LLVMTargetMachineRef>(const_cast<TargetMachine*>(P));
 }
index eae23e6e67fead4788cfe5e26c0f90ced1368bda..5913822de235318d628560c34e42b7167f963bff 100644 (file)
@@ -43,16 +43,16 @@ struct LLVMOpaqueTargetMachine {
 };
 
 
-inline TargetMachine *unwrap(LLVMTargetMachineRef P) {
+static TargetMachine *unwrap(LLVMTargetMachineRef P) {
   return P->Machine.get();
 }
-inline Target *unwrap(LLVMTargetRef P) {
+static Target *unwrap(LLVMTargetRef P) {
   return reinterpret_cast<Target*>(P);
 }
-inline LLVMTargetMachineRef wrap(const TargetMachine *P) {
+static LLVMTargetMachineRef wrap(const TargetMachine *P) {
   return new LLVMOpaqueTargetMachine{ std::unique_ptr<TargetMachine>(const_cast<TargetMachine*>(P)),  P->createDataLayout() };
 }
-inline LLVMTargetRef wrap(const Target * P) {
+static LLVMTargetRef wrap(const Target * P) {
   return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P));
 }