Make Rustc build with LLVM trunk.
This commit is contained in:
parent
ae5b350d77
commit
a43a7a0778
|
@ -705,10 +705,17 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
|||
FPVal->getValueAPF().bitcastToAPInt().getZExtValue());
|
||||
}
|
||||
|
||||
#if LLVM_VERSION_GE(8, 0)
|
||||
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
|
||||
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
|
||||
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
|
||||
InitExpr, unwrapDIPtr<MDNode>(Decl), nullptr, AlignInBits);
|
||||
#else
|
||||
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
|
||||
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
|
||||
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
|
||||
InitExpr, unwrapDIPtr<MDNode>(Decl), AlignInBits);
|
||||
#endif
|
||||
|
||||
InitVal->setMetadata("dbg", VarExpr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue