mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
It's possible for a global variable to be optimized out of a metadata object. So
we should allow a "null" with this dyn_cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -116,7 +116,7 @@ GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
|
||||
return 0;
|
||||
|
||||
if (Elt < DbgNode->getNumElements())
|
||||
return dyn_cast<GlobalVariable>(DbgNode->getElement(Elt));
|
||||
return dyn_cast_or_null<GlobalVariable>(DbgNode->getElement(Elt));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user