[llvm-commits] Commit 168785 broke hexagon target data strings

Patrik Hägglund H patrik.h.hagglund at ericsson.com
Wed Nov 28 12:57:38 PST 2012


> I am still a little concerned as 'assert' on an invalid LLVM-IR file. As this is a user-facing feedback, I would expect a proper error message when reading or verifying the bitcode. Would it be possible to provide such an error message.

It seems like Lang Hames tried to provide parse errors messages for this kind of faults at r142288, but that patch was reverted, due to "layering violations". Comment from r142605:

Author: Lang Hames <lhames at gmail.com>
Date:   Thu Oct 20 19:24:44 2011 +0000

    Haven't yet found a nice way to handle TargetData verification in the
    AsmParser. This patch adds validation for target data layout strings upon
    construction of TargetData objects. An attempt to construct a TargetData object
    from a malformed string will trigger an assertion.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142605 91177308-0d34-0410-b5e6-96231b3b80d8


I just tried to improve the error checking in the current "assert" approach. For my needs, it is good enough.

/Patrik Hägglund


-----Original Message-----
From: Tobias Grosser [mailto:tobias at grosser.es] 
Sent: den 28 november 2012 14:58
To: Patrik Hägglund H
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] Commit 168785 broke hexagon target data strings

On 11/28/2012 01:56 PM, Tobias Grosser wrote:
> Hi Patrik,
>
> the Polly builder started to show four failing test cases after your 
> commit 168785. The failures are not due to any Polly passes, but arise 
> as soon as an LLVM-IR module with a hexagon target data string is 
> loaded into opt.

Hi Patrik,

I have seen you fixed the broken version string in the Polly test cases in commit 168791. Thanks for the quick reaction!

I am still a little concerned as 'assert' on an invalid LLVM-IR file. As this is a user-facing feedback, I would expect a proper error message when reading or verifying the bitcode. Would it be possible to provide such an error message.

Tobi





More information about the llvm-commits mailing list