Add discriminators to DILocations when multiple functions are inlined into a single point.
LLVM does not expect to ever see multiple dbg_declares for the same variable at the same location with different values. proc-macros make it possible for arbitrary code, including multiple calls that get inlined, to happen at any given location in the source code. Add discriminators when that happens so these locations are different to LLVM. This may interfere with the AddDiscriminators pass in LLVM, which is added by the unstable flag -Zdebug-info-for-profiling. Fixes #131944
This commit is contained in:
parent
80445576d0
commit
1dc106121b
5 changed files with 133 additions and 3 deletions
|
@ -2174,6 +2174,10 @@ unsafe extern "C" {
|
|||
Scope: &'a DIScope,
|
||||
InlinedAt: Option<&'a DILocation>,
|
||||
) -> &'a DILocation;
|
||||
pub fn LLVMRustDILocationCloneWithBaseDiscriminator<'a>(
|
||||
Location: &'a DILocation,
|
||||
BD: c_uint,
|
||||
) -> Option<&'a DILocation>;
|
||||
pub fn LLVMRustDIBuilderCreateOpDeref() -> u64;
|
||||
pub fn LLVMRustDIBuilderCreateOpPlusUconst() -> u64;
|
||||
pub fn LLVMRustDIBuilderCreateOpLLVMFragment() -> u64;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue