[llvm] r297072 - Verifier: Change Assert to AssertDI.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 14:21:47 PST 2017


On Mon, Mar 6, 2017 at 1:17 PM Adrian Prantl via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: adrian
> Date: Mon Mar  6 15:05:14 2017
> New Revision: 297072
>
> URL: http://llvm.org/viewvc/llvm-project?rev=297072&view=rev
> Log:
> Verifier: Change Assert to AssertDI.
> This error can be recovered from by stripping debug info.
> This is NFC for +asserts builds.
>

Is there no way in a +Asserts build to get the behavior of "if debug info
doesn't verify, strip it"? That seems... bad (untestable codepath that
someone's relying on?).


>
> Modified:
>     llvm/trunk/lib/IR/Verifier.cpp
>
> Modified: llvm/trunk/lib/IR/Verifier.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=297072&r1=297071&r2=297072&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/IR/Verifier.cpp (original)
> +++ llvm/trunk/lib/IR/Verifier.cpp Mon Mar  6 15:05:14 2017
> @@ -2734,9 +2734,9 @@ void Verifier::verifyCallSite(CallSite C
>    // do so causes assertion failures when the inliner sets up inline
> scope info.
>    if (I->getFunction()->getSubprogram() && CS.getCalledFunction() &&
>        CS.getCalledFunction()->getSubprogram())
> -    Assert(I->getDebugLoc(), "inlinable function call in a function with
> debug "
> -                             "info must have a !dbg location",
> -           I);
> +    AssertDI(I->getDebugLoc(), "inlinable function call in a function
> with "
> +                               "debug info must have a !dbg location",
> +             I);
>
>    visitInstruction(*I);
>  }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170306/a655b0f9/attachment.html>


More information about the llvm-commits mailing list