Added a comment.

llvm-svn: 106063
This commit is contained in:
Stuart Hastings 2010-06-15 23:06:30 +00:00
parent a86c2bdd2c
commit 9b5005cd4b
1 changed files with 5 additions and 0 deletions

View File

@ -2353,6 +2353,11 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(const MDNode *Scope, const MDNode *Inl
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;