GaloisInc / llvm-pretty

An llvm pretty printer inspired by the haskell llvm binding
Other
28 stars 15 forks source link

Removal of MDString-based type references in LLVM 4 #39

Closed langston-barrett closed 5 years ago

langston-barrett commented 5 years ago

It seems LLVM 4 added a quite different way to refer to types in metadata. I'm not sure whether changes to the AST are necessary to accommodate this change, or if this is a parsing-only issue.

langston-barrett commented 5 years ago

The fix should include the following test case for the bitcode parser:

When you run

nix-shell --pure -p llvm_39 --run "llvm-as cfi-eof-prologue.new.ll -o new.bc"
nix-shell --pure -p llvm_38 --run "llvm-as cfi-eof-prologue.old.ll -o old.bc"

and then run llvm-disasm on both files, the scope: fields are silently dropped from the new version, whereas they are properly retained in the old version.

langston-barrett commented 5 years ago

This isn't really related to the AST or pretty-printer, it's an issue for the parser.