mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-22 00:37:49 +00:00
StripSymbols: Use DIGlobalVariable::getConstant() instead of getGlobal()
The only difference between the two is a `dyn_cast<>` to `GlobalVariable`. If optimizations have left anything behind when a global gets replaced, then it doesn't seem like the debug info is dead. I can't seem to find an optimization that would leave behind a non-`GlobalVariable` without nulling the reference entirely, so I haven't added a testcase (but I'll be deleting `getGlobal()` in a future commit). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
55ba23d2fc
commit
afb02d5d0d
@ -335,7 +335,7 @@ bool StripDeadDebugInfo::runOnModule(Module &M) {
|
||||
|
||||
// If the global variable referenced by DIG is not null, the global
|
||||
// variable is live.
|
||||
if (DIG.getGlobal())
|
||||
if (DIG.getConstant())
|
||||
LiveGlobalVariables.push_back(DIG);
|
||||
else
|
||||
GlobalVariableChange = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user