| Index: lib/CodeGen/LexicalScopes.cpp
|
| diff --git a/lib/CodeGen/LexicalScopes.cpp b/lib/CodeGen/LexicalScopes.cpp
|
| index b621e3baee513ee37eb8d8343b53e65cbbc55540..234bd1fff36bba0eea148e51b8170a84664a37e3 100644
|
| --- a/lib/CodeGen/LexicalScopes.cpp
|
| +++ b/lib/CodeGen/LexicalScopes.cpp
|
| @@ -176,8 +176,17 @@ LexicalScope *LexicalScopes::getOrCreateRegularScope(MDNode *Scope) {
|
|
|
| if (!Parent) {
|
| assert(DIDescriptor(Scope).isSubprogram());
|
| - assert(DISubprogram(Scope).describes(MF->getFunction()));
|
| - assert(!CurrentFnLexicalScope);
|
| + // @LOCALMOD-BEGIN
|
| + // This currently asserts when mixing -g and -g0 compilation
|
| + // units + LTO. Debug info from a few inlined functions are not
|
| + // marked as inline, so we end up in getOrCreateRegularScope
|
| + // instead of getOrCreateInlinedScope.
|
| + // This is reproducible w/ the pnacl-llc.nexe build and
|
| + // setting the env var PNACL_PRUNE=false.
|
| + // https://code.google.com/p/nativeclient/issues/detail?id=4026
|
| + //assert(DISubprogram(Scope).describes(MF->getFunction()));
|
| + //assert(!CurrentFnLexicalScope);
|
| + // @LOCALMOD-END
|
| CurrentFnLexicalScope = &I->second;
|
| }
|
|
|
|
|