mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Conditionally compile in only the extra argument.
This commit is contained in:
parent
a43a7a0778
commit
bf01bcb451
@ -705,17 +705,14 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable(
|
||||
FPVal->getValueAPF().bitcastToAPInt().getZExtValue());
|
||||
}
|
||||
|
||||
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
|
||||
unwrapDI<DIDescriptor>(Context), Name, LinkageName,
|
||||
unwrapDI<DIFile>(File), LineNo, unwrapDI<DIType>(Ty), IsLocalToUnit,
|
||||
InitExpr, unwrapDIPtr<MDNode>(Decl),
|
||||
#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);
|
||||
/* templateParams */ nullptr,
|
||||
#endif
|
||||
AlignInBits);
|
||||
|
||||
InitVal->setMetadata("dbg", VarExpr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user