summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LexicalScopes.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-07-18 23:57:20 +0000
committerEric Christopher <echristo@gmail.com>2014-07-18 23:57:20 +0000
commitcfd17dd2be3dbb7f7fba9585d5c814c6f75add07 (patch)
tree1b9bb5afdae3b5a1100c0b218ee294fe405f58f5 /llvm/lib/CodeGen/LexicalScopes.cpp
parent215f3b7f02e657d56333aa28c89556c523b051a0 (diff)
downloadbcm5719-llvm-cfd17dd2be3dbb7f7fba9585d5c814c6f75add07.tar.gz
bcm5719-llvm-cfd17dd2be3dbb7f7fba9585d5c814c6f75add07.zip
Revert "Reapply "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.""""
After a successful build it seems to have come back on a later build. This reverts commit r213391. llvm-svn: 213432
Diffstat (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r--llvm/lib/CodeGen/LexicalScopes.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp
index f67c717d4e4..d12c234bf3b 100644
--- a/llvm/lib/CodeGen/LexicalScopes.cpp
+++ b/llvm/lib/CodeGen/LexicalScopes.cpp
@@ -137,8 +137,6 @@ LexicalScope *LexicalScopes::findLexicalScope(DebugLoc DL) {
/// getOrCreateLexicalScope - Find lexical scope for the given DebugLoc. If
/// not available then create new lexical scope.
LexicalScope *LexicalScopes::getOrCreateLexicalScope(DebugLoc DL) {
- if (DL.isUnknown())
- return nullptr;
MDNode *Scope = nullptr;
MDNode *InlinedAt = nullptr;
DL.getScopeAndInlinedAt(Scope, InlinedAt, MF->getFunction()->getContext());
@@ -174,12 +172,9 @@ LexicalScope *LexicalScopes::getOrCreateRegularScope(MDNode *Scope) {
std::make_tuple(Parent, DIDescriptor(Scope),
nullptr, false)).first;
- if (!Parent) {
- assert(DIDescriptor(Scope).isSubprogram());
- assert(DISubprogram(Scope).describes(MF->getFunction()));
- assert(!CurrentFnLexicalScope);
+ if (!Parent && DIDescriptor(Scope).isSubprogram() &&
+ DISubprogram(Scope).describes(MF->getFunction()))
CurrentFnLexicalScope = &I->second;
- }
return &I->second;
}
OpenPOWER on IntegriCloud