forked from OSchip/llvm-project
Fix thinko. Create parent scope if parent descriptor is *not* null.
llvm-svn: 62022
This commit is contained in:
parent
cb8d7e131c
commit
5491f25810
|
@ -2618,12 +2618,12 @@ private:
|
||||||
if (!Slot) {
|
if (!Slot) {
|
||||||
// FIXME - breaks down when the context is an inlined function.
|
// FIXME - breaks down when the context is an inlined function.
|
||||||
DIDescriptor ParentDesc;
|
DIDescriptor ParentDesc;
|
||||||
DIBlock *DB = new DIBlock(V);
|
DIDescriptor *DB = new DIBlock(V);
|
||||||
if (DIBlock *Block = dyn_cast<DIBlock>(DB)) {
|
if (DIBlock *Block = dyn_cast<DIBlock>(DB)) {
|
||||||
ParentDesc = Block->getContext();
|
ParentDesc = Block->getContext();
|
||||||
}
|
}
|
||||||
DbgScope *Parent = ParentDesc.isNull() ?
|
DbgScope *Parent = ParentDesc.isNull() ?
|
||||||
getOrCreateScope(ParentDesc.getGV()) : NULL;
|
NULL : getOrCreateScope(ParentDesc.getGV());
|
||||||
Slot = new DbgScope(Parent, DB);
|
Slot = new DbgScope(Parent, DB);
|
||||||
if (Parent) {
|
if (Parent) {
|
||||||
Parent->AddScope(Slot);
|
Parent->AddScope(Slot);
|
||||||
|
|
Loading…
Reference in New Issue