aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-07-27 18:27:23 +0000
committerDiego Novillo <dnovillo@google.com>2015-07-27 18:27:23 +0000
commitcd973c4f77be116206f6f6518e181858f989c09f (patch)
treee27fbbbccc4843ed7431aaba889855a02bc119ac /llvm/lib/Target/TargetMachineC.cpp
parentFix `llvm-config` to emit the linker flag for the combined shared object buil... (diff)
downloadllvm-project-cd973c4f77be116206f6f6518e181858f989c09f.tar.gz
llvm-project-cd973c4f77be116206f6f6518e181858f989c09f.tar.bz2
llvm-project-cd973c4f77be116206f6f6518e181858f989c09f.zip
Fix ODR violation. NFC.
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). llvm-svn: 243298
Diffstat (limited to 'llvm/lib/Target/TargetMachineC.cpp')
-rw-r--r--llvm/lib/Target/TargetMachineC.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp
index eae23e6e67fe..5913822de235 100644
--- a/llvm/lib/Target/TargetMachineC.cpp
+++ b/llvm/lib/Target/TargetMachineC.cpp
@@ -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));
}