This is an archive of the discontinued LLVM Phabricator instance.

COFF: Read linker directives from bitcode files.
ClosedPublic

Authored by pcc on Jun 5 2015, 2:19 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 27232.Jun 5 2015, 2:19 PM
pcc retitled this revision from to COFF: Read linker directives from bitcode files..
pcc updated this object.
pcc edited the test plan for this revision. (Show Details)
pcc added a reviewer: ruiu.
pcc added a subscriber: Unknown Object (MLST).
ruiu added inline comments.Jun 5 2015, 6:35 PM
COFF/SymbolTable.cpp
44 ↗(On Diff #27232)

I'd reverse the condition to return early.

81 ↗(On Diff #27232)

I'm wondering what kind of command line options compiled bitcode would actually contain. Is that /defaultlib option? Can you give me an example?

pcc updated this revision to Diff 27249.Jun 5 2015, 6:51 PM

Address review comments

COFF/SymbolTable.cpp
44 ↗(On Diff #27232)

Done

81 ↗(On Diff #27232)

Yes, /defaultlib. For example, if I compile an empty translation unit with clang-cl, I'll see IR like this:

!llvm.module.flags = !{!0, !...}

!0 = !{i32 6, !"Linker Options", !1}
!1 = !{!2, !3}
!2 = !{!"/DEFAULTLIB:libcmt.lib"}
!3 = !{!"/DEFAULTLIB:oldnames.lib"}
ruiu accepted this revision.Jun 5 2015, 7:01 PM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 5 2015, 7:01 PM
This revision was automatically updated to reflect the committed changes.