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

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 10:41:00 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;
----------------
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.


================
Comment at: test/Verifier/llvm.dbg.intrinsic-dbg-attachment.ll:1
-; RUN: not llvm-as -disable-output <%s 2>&1 | FileCheck %s
+; RUN: llvm-as -disable-output <%s 2>&1 | FileCheck %s
 define void @foo() {
----------------
arsenm wrote:
> This is a test regression
This test should pass since it only contains invalid debug info. After the parser removes the debug info, the IR is valid. There is a bug in verifier mistakenly treated debug info error as non-debug info error. (See change in Verifier.cpp line 4492 for the fix). After that bug is fixed, this test should pass.


https://reviews.llvm.org/D41832





More information about the llvm-commits mailing list