mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +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());
|
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)
|
#if LLVM_VERSION_GE(8, 0)
|
||||||
llvm::DIGlobalVariableExpression *VarExpr = Builder->createGlobalVariableExpression(
|
/* templateParams */ nullptr,
|
||||||
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
|
#endif
|
||||||
|
AlignInBits);
|
||||||
|
|
||||||
InitVal->setMetadata("dbg", VarExpr);
|
InitVal->setMetadata("dbg", VarExpr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user