From cd07efa1736ba3c990f67d3343594dbbcddb08be Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 31 Mar 2015 00:47:15 +0000 Subject: Verifier: Move checks over from DIDescriptor::Verify() Move over some more checks from `DIDescriptor::Verify()`, and change `LLParser` to require non-null `file:` fields in compile units. I've ignored the comment in test/Assembler/metadata-null-operands.ll since I disagree with it. At the time that test was written (r229960), the debug info verifier wasn't on by default, so my comment there is in the context of not expecting the verifier to be useful. It is now, and besides that, since r233394 we can check when parsing textual IR whether an operand is null that shouldn't be. llvm-svn: 233654 --- llvm/lib/AsmParser/LLParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/AsmParser') diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index dc348e4d4b7..6e79960e3db 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -3506,7 +3506,7 @@ bool LLParser::ParseMDFile(MDNode *&Result, bool IsDistinct) { bool LLParser::ParseMDCompileUnit(MDNode *&Result, bool IsDistinct) { #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ REQUIRED(language, DwarfLangField, ); \ - REQUIRED(file, MDField, ); \ + REQUIRED(file, MDField, (/* AllowNull */ false)); \ OPTIONAL(producer, MDStringField, ); \ OPTIONAL(isOptimized, MDBoolField, ); \ OPTIONAL(flags, MDStringField, ); \ -- cgit v1.2.3