[PATCH] D41832: LLParser: do not verify LLVM module

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 09:28:06 PST 2018


aprantl added inline comments.


================
Comment at: lib/IR/Verifier.cpp:214-216
+    // If TreatBrokenDebugInfoAsError is set, ignore non-DebugInfo errors.
+    if (!TreatBrokenDebugInfoAsError)
+      return;
----------------
yaxunl wrote:
> aprantl wrote:
> > yaxunl wrote:
> > > arsenm wrote:
> > > > This seems to just be stopping all error messages?
> > > No. This will only stop checking of non-debug info and will not stop checking debug info. Since checking of debug info does not use this function but uses DebugInfoCheckFailed.
> > Can you please elaborate on this? I'm afraid I didn't understand your explanation.
> The verifier checks two types of issues: 
> 
> 1. debug info issues
> 
> 2. non-debug info issues
> 
> with this change, when TreatBrokenDebugInfoAsError is set, the verifier will ignore non-debug-info issues and only check debug info issues.
> 
> This is necessary for LLParser. Because LLParser only wants to check debug info issues so that it can drop invalid debug info.
> 
> Checking of non-debug-info issues is deferred after parsing.
> 
In what situation would LLParser want to not verify the non-metadata part of the IR?


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list