This is an archive of the discontinued LLVM Phabricator instance.

Add -fuse-line-directive flag to control usage of #line with -E
ClosedPublic

Authored by rnk on Sep 5 2014, 1:03 PM.

Details

Summary

Currently -fms-extensions controls this behavior, which doesn't make
much sense. It means we can't identify what is and isn't a system header
when compiling our own preprocessed output, because #line doesn't
represent this information.

If someone is feeding Clang's preprocessed output to another compiler,
they can use this flag.

Fixes PR20553.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 13337.Sep 5 2014, 1:03 PM
rnk retitled this revision from to Add -fuse-line-directive flag to control usage of #line with -E.
rnk updated this object.
rnk added a reviewer: rsmith.
rnk added a subscriber: Unknown Object (MLST).
rnk added a comment.Feb 25 2015, 3:35 PM

Ancient, ancient ping

rsmith edited edge metadata.Feb 25 2015, 3:56 PM

You seem to be missing code in the driver to handle your two new -f options and to pass -fuse-line-directive to the frontend.

include/clang/Driver/Options.td
572–574 ↗(On Diff #13337)

Maybe [...]directives?

rnk updated this revision to Diff 20714.Feb 25 2015, 4:18 PM
rnk edited edge metadata.
  • Pluralize the argument everywhere
  • Add driver logic. I considered a test, but it's expensive.
rnk accepted this revision.Feb 25 2015, 4:18 PM
rnk added a reviewer: rnk.

Over-the-shoulder approved by Richard

This revision is now accepted and ready to land.Feb 25 2015, 4:18 PM
This revision was automatically updated to reflect the committed changes.