From b939a257070d71eee3c18415ca6104731c7923a6 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 31 Mar 2016 23:56:58 +0000 Subject: Move the DebugEmissionKind enum from DIBuilder into DICompileUnit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This mostly cosmetic patch moves the DebugEmissionKind enum from DIBuilder into DICompileUnit. DIBuilder is not the right place for this enum to live in — a metadata consumer should not have to include DIBuilder.h. I also added a Verifier check that checks that the emission kind of a DICompileUnit is actually legal. http://reviews.llvm.org/D18612 llvm-svn: 265077 --- llvm/lib/AsmParser/LLLexer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib/AsmParser/LLLexer.cpp') diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 46ffc642ec6..5ad5ddd52a0 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -787,11 +787,15 @@ lltok::Kind LLLexer::LexIdentifier() { DWKEYWORD(OP, DwarfOp); DWKEYWORD(MACINFO, DwarfMacinfo); #undef DWKEYWORD - if (Keyword.startswith("DIFlag")) { StrVal.assign(Keyword.begin(), Keyword.end()); return lltok::DIFlag; } + if (Keyword == "NoDebug" || Keyword == "FullDebug" || + Keyword == "LineTablesOnly") { + StrVal.assign(Keyword.begin(), Keyword.end()); + return lltok::EmissionKind; + } // Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by // the CFE to avoid forcing it to deal with 64-bit numbers. -- cgit v1.2.3