Index: lib/MC/MCParser/AsmParser.cpp =================================================================== --- lib/MC/MCParser/AsmParser.cpp +++ lib/MC/MCParser/AsmParser.cpp @@ -3894,6 +3894,12 @@ parseToken(AsmToken::EndOfStatement)) return addErrorSuffix(" in '.cfi_startproc' directive"); } + + // TODO(kristina): Deal with PP macro expansion so the error line + // matches the source chunk within the diagnostic when in a PP macro. + if (getStreamer().hasUnfinishedDwarfFrameInfo()) + return Error(Lexer.getLoc(), + ".cfi_startproc cannot be used in an existing frame"); getStreamer().EmitCFIStartProc(!Simple.empty()); return false;