Closed langston-barrett closed 5 years ago
The fix should include the following test case for the bitcode parser:
.ll
with new-style references: https://github.com/llvm-mirror/llvm/blob/de7484036b628b08be6acbfb5feac405d7450300/test/DebugInfo/AArch64/cfi-eof-prologue.ll.ll
with old-style references (3.8 release): https://github.com/llvm-mirror/llvm/blob/release_38/test/DebugInfo/AArch64/cfi-eof-prologue.ll#L1When 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.
This isn't really related to the AST or pretty-printer, it's an issue for the parser.
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.
DICompositeType
: https://releases.llvm.org/4.0.1/docs/LangRef.html#dicompositetypeDISubprogram
: https://releases.llvm.org/4.0.1/docs/LangRef.html#disubprogram