Rollup merge of #29016 - sanxiyn:data-layout, r=alexcrichton
This commit is contained in:
commit
3636c8bb3e
@ -335,8 +335,7 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
|
||||
LLVMTargetMachineRef TMR) {
|
||||
TargetMachine *Target = unwrap(TMR);
|
||||
#if LLVM_VERSION_MINOR >= 7
|
||||
if (const DataLayout *DL = Target->getDataLayout())
|
||||
unwrap(Module)->setDataLayout(*DL);
|
||||
unwrap(Module)->setDataLayout(Target->createDataLayout());
|
||||
#elif LLVM_VERSION_MINOR >= 6
|
||||
if (const DataLayout *DL = Target->getSubtargetImpl()->getDataLayout())
|
||||
unwrap(Module)->setDataLayout(DL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user