This reverts commit r212776.
Nope, still seems to be failing on the sanitizer bots... but hey, not
the msan self-host anymore, it's failing in asan now. I'll start looking
there next.
llvm-svn: 212793
for (const auto &Var : ConcreteVariables) {
DIE *VariableDie = Var->getDIE();
// FIXME: There shouldn't be any variables without DIEs.
- assert(VariableDie);
+ if (!VariableDie)
+ continue;
// FIXME: Consider the time-space tradeoff of just storing the unit pointer
// in the ConcreteVariables list, rather than looking it up again here.
// DIE::getUnit isn't simple - it walks parent pointers, etc.
/// 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());
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;
}
if (isLValueReference() && isRValueReference())
return false;
- if (auto *F = getFunction()) {
- LLVMContext &Ctxt = F->getContext();
- for (auto &BB : *F) {
- for (auto &I : BB) {
- DebugLoc DL = I.getDebugLoc();
- if (DL.isUnknown())
- continue;
-
- MDNode *Scope = nullptr;
- MDNode *IA = nullptr;
- // walk the inlined-at scopes
- while (DL.getScopeAndInlinedAt(Scope, IA, F->getContext()), IA)
- DL = DebugLoc::getFromDILocation(IA);
- DL.getScopeAndInlinedAt(Scope, IA, Ctxt);
- assert(!IA);
- while (!DIDescriptor(Scope).isSubprogram()) {
- DILexicalBlockFile D(Scope);
- Scope = D.isLexicalBlockFile()
- ? D.getScope()
- : DebugLoc::getFromDILexicalBlock(Scope).getScope(Ctxt);
- }
- if (!DISubprogram(Scope).describes(F))
- return false;
- }
- }
- }
return DbgNode->getNumOperands() == 20;
}