mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-22 11:39:35 +00:00
Simplify.
llvm-svn: 135127
This commit is contained in:
parent
1cab6179ab
commit
39f6e21de3
@ -1582,19 +1582,9 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(DebugLoc DL, LLVMContext &Ctx) {
|
||||
getOrCreateDbgScope(DebugLoc::getFromDILexicalBlock(Scope), Ctx);
|
||||
WScope->setParent(Parent);
|
||||
Parent->addScope(WScope);
|
||||
}
|
||||
|
||||
if (!WScope->getParent()) {
|
||||
StringRef SPName = DISubprogram(Scope).getLinkageName();
|
||||
// We used to check only for a linkage name, but that fails
|
||||
// since we began omitting the linkage name for private
|
||||
// functions. The new way is to check for the name in metadata,
|
||||
// but that's not supported in old .ll test cases. Ergo, we
|
||||
// check both.
|
||||
if (SPName == Asm->MF->getFunction()->getName() ||
|
||||
DISubprogram(Scope).getFunction() == Asm->MF->getFunction())
|
||||
CurrentFnDbgScope = WScope;
|
||||
}
|
||||
} else if (DIDescriptor(Scope).isSubprogram()
|
||||
&& DISubprogram(Scope).describes(Asm->MF->getFunction()))
|
||||
CurrentFnDbgScope = WScope;
|
||||
|
||||
return WScope;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user