This is an archive of the discontinued LLVM Phabricator instance.

[llgo] Increment "Debug Info Version"
ClosedPublic

Authored by cierniak on Mar 22 2016, 9:40 AM.

Details

Summary

This patch increments the "Debug Info Version" from 2 to 3. This is a nop if you just want to generate binaries. I verified that with and without this patch, when I run llgo -g on a Go source file, I get exactly the same binary.
The purpose of the patch is to make it possible to run the llvm-dis tool. Without the patch, it is impossible to disassemble files generated with llgo:

$ llgo -c -g -emit-llvm src/hello.go
$ llvm-dis hello.o
llvm-dis: warning: ignoring debug info with an invalid version (2) in hello.o

Diff Detail

Repository
rL LLVM

Event Timeline

cierniak updated this revision to Diff 51293.Mar 22 2016, 9:40 AM
cierniak retitled this revision from to [llgo] Increment "Debug Info Version".
cierniak updated this object.
cierniak added reviewers: pcc, axw.
cierniak added a subscriber: llvm-commits.
axw accepted this revision.Mar 22 2016, 3:50 PM
axw edited edge metadata.

LGTM, thanks. One of these days we should expose llvm::DEBUG_METADATA_VERSION to the C API.

This revision is now accepted and ready to land.Mar 22 2016, 3:50 PM
In D18355#380939, @axw wrote:

LGTM, thanks. One of these days we should expose llvm::DEBUG_METADATA_VERSION to the C API.

I don't have commit access to LLVM yet (this is my first patch ever). Could you commit it for me?

This revision was automatically updated to reflect the committed changes.
axw added a comment.Mar 23 2016, 4:15 PM
In D18355#380939, @axw wrote:

LGTM, thanks. One of these days we should expose llvm::DEBUG_METADATA_VERSION to the C API.

I don't have commit access to LLVM yet (this is my first patch ever). Could you commit it for me?

Done, congratulations ;)

In D18355#382077, @axw wrote:
In D18355#380939, @axw wrote:

LGTM, thanks. One of these days we should expose llvm::DEBUG_METADATA_VERSION to the C API.

I don't have commit access to LLVM yet (this is my first patch ever). Could you commit it for me?

Done, congratulations ;)

Thank you!