This is an archive of the discontinued LLVM Phabricator instance.

Add -gcodeview and -gdwarf to control which type Clang emits
ClosedPublic

Authored by rnk on Aug 3 2015, 5:06 PM.

Details

Summary

By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 31287.Aug 3 2015, 5:06 PM
rnk retitled this revision from to Add -gcodeview and -gdwarf to control which type Clang emits.
rnk updated this object.
rnk added reviewers: dblaikie, hans.
rnk added a subscriber: cfe-commits.
hans added inline comments.Aug 3 2015, 6:04 PM
lib/Driver/Tools.cpp
5276 ↗(On Diff #31287)

Would just Args.hasArg(options::OPT__SLASH_Z7) work?

test/CodeGen/dwarf-version.c
11 ↗(On Diff #31287)

Maybe add %clang_cl invocations here?

test/Driver/cl-options.c
365 ↗(On Diff #31287)

Is there a test for /Zi in here to update as well?

373 ↗(On Diff #31287)

Not sure if this list is exhaustive anymore, but might still be worth adding -gdwarf and -gcodeview here to codify that they're supposed to be exposed in clang-cl.

rnk marked 2 inline comments as done.Aug 5 2015, 9:07 AM
rnk added inline comments.
test/CodeGen/dwarf-version.c
11 ↗(On Diff #31287)

I'd rather keep the %clang_cl tests in test/Driver, though.

rnk updated this revision to Diff 31357.Aug 5 2015, 9:09 AM
  • Add more tests
hans accepted this revision.Aug 5 2015, 11:15 AM
hans edited edge metadata.

lgtm

This revision is now accepted and ready to land.Aug 5 2015, 11:15 AM
This revision was automatically updated to reflect the committed changes.