[PATCH] D20121: Make "@name =" mandatory for globals in .ll files

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 23:31:31 PDT 2016


dexonsmith added a subscriber: dexonsmith.
dexonsmith added a comment.

I'm not sure this goes far enough.

While it's inconvenient for parsing and not particularly readable, it makes .ll files with unnamed globals easier to modify.  E.g., if you have this file:
----------------------------------------------------------------------------------------------------------------------------------------------------------

global i32 42
global i32 43

global i32 44
-------------

you can delete the second line to create:
-----------------------------------------

global i32 42

global i32 44
-------------

However, IIRC, skipping a slot would be illegal:
------------------------------------------------

@0 = global i32 42

@2 = global i32 44
------------------

If you make the above (skipping a slot) legal (or if I'm wrong and it's already legal), then I'm fine with this.


http://reviews.llvm.org/D20121





More information about the llvm-commits mailing list