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

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 07:49:52 PST 2018


yaxunl added inline comments.


================
Comment at: lib/IR/Verifier.cpp:214-216
+    // If TreatBrokenDebugInfoAsError is set, ignore non-DebugInfo errors.
+    if (!TreatBrokenDebugInfoAsError)
+      return;
----------------
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.



================
Comment at: lib/IR/Verifier.cpp:3239
   Assert(PTy->getAddressSpace() == DL.getAllocaAddrSpace(),
-         "Allocation instruction pointer not in the stack address space!",
+         "Allocation instruction pointer not in the dataLayout alloca address space!",
          &AI);
----------------
aprantl wrote:
> Please move this change into a separate review, it looks like an orthogonal change and just makes this patch harder to understand.
will do.


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list