forked from OSchip/llvm-project
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
This commit is contained in:
parent
ba70e9e1e6
commit
cd973c4f77
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue