[DebugInfo] Remove Expr from debug variables used as DenseMap keys

We do keep the fragment part of the expression as it is important
to identify fragments separately.

A variable with less fragments should be considered a superset of
variables with more fragments, but that would require to change a
lot of code.
This commit is contained in:
Emil Pedersen
2024-05-09 15:05:27 -07:00
parent 784034fd3a
commit b2930992a8
5 changed files with 20 additions and 5 deletions

View File

@@ -221,6 +221,9 @@ bool DebugInfoCanonicalizer::process() {
LLVM_DEBUG(llvm::dbgs() << " Has no var info?! Skipping!\n");
continue;
}
// Strip things we don't need in the map.
debugInfo->DIExpr = debugInfo->DIExpr.getFragmentPart();
debugInfo->Type = {};
// Otherwise, we may have a new debug_value to track. Try to begin
// tracking it...