[LLVMdev] Removing types from metadata

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Dec 19 12:56:22 PST 2014


> On Fri, Dec 19, 2014 at 10:59 AM, Tom Stellard <tom at stellard.net> wrote:
> Hi,
> 
> Types were recently removed from metadata in the IR, which means older
> LLVM IR code with metadata won't compile.  Was this intentional?
> Is there a practical way to maintain compatibility with older LLVM IR?
> 
> Thanks,
> Tom

As Reid said, there's no backwards compatibility for assembly.  However,
I did share an upgrade script (as mentioned in r224257) that should help
you update out-of-tree testcases (or other IR).  Have a look at the
attachment to PR21532.

Warning: Reid noticed that the `sed -E` flag I'm using there doesn't
seem to be portable.  You might have to fiddle with the regexes (please
share if you do).

> On 2014-Dec-19, at 11:40, Reid Kleckner <rnk at google.com> wrote:
> 
> That said, if it's just a matter of skipping over the 'metadata' token, it would be nice to let old IR assemble.

It's a little harder than that, since it's a `Type` token, but in
theory it's probably doable.

However, I think this would set a bad precedent.  There's nowhere else
(that I know of) where we accept two versions of assembly.  The
LLParser is relatively easy to work with because it doesn't have that
kind of historical baggage.



More information about the llvm-dev mailing list