mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
If string field is empty then return NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dac8bde235
commit
5e8e2d7ad9
@ -84,8 +84,11 @@ DIDescriptor::getStringField(unsigned Elt) const {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (Elt < DbgNode->getNumElements())
|
if (Elt < DbgNode->getNumElements())
|
||||||
if (MDString *MDS = dyn_cast_or_null<MDString>(DbgNode->getElement(Elt)))
|
if (MDString *MDS = dyn_cast_or_null<MDString>(DbgNode->getElement(Elt))) {
|
||||||
|
if (MDS->getLength() == 0)
|
||||||
|
return NULL;
|
||||||
return MDS->getString().data();
|
return MDS->getString().data();
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user