This is an archive of the discontinued LLVM Phabricator instance.

[NFC][clang] Adding ability to skip compiler phases in clang driver.
AbandonedPublic

Authored by plotfi on Jun 30 2019, 10:03 AM.

Details

Reviewers
compnerd
Summary

Changing getFinalPhase to getPhasesToRun. Instead of only returning the final phase it returns the final phase as well as a collection of the phases to skip. This is useful for cases where you want to do up to a compile phase that emits some information per compilation unit, but then you want a link phase for merging the compilation unit artifacts into one file without having to invoke the backend/assembler phases.

Diff Detail

Event Timeline

plotfi created this revision.Jun 30 2019, 10:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2019, 10:03 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
plotfi marked an inline comment as done.Jun 30 2019, 10:19 AM
plotfi added inline comments.
clang/include/clang/Driver/Phases.h
30

I could change this to a SmallVector or SmallSet

plotfi updated this revision to Diff 207227.Jun 30 2019, 10:27 AM

Add full context, change std::set to llvm::SmallSet

plotfi updated this revision to Diff 207228.Jun 30 2019, 10:29 AM

Removing obvious comment.

plotfi abandoned this revision.Jul 2 2019, 1:46 PM