This is an archive of the discontinued LLVM Phabricator instance.

Fix #include cycle between Pass.h and PassSupport.h
AbandonedPublic

Authored by rsmith on May 11 2015, 3:50 PM.

Details

Reviewers
chandlerc
Summary

Pass.h #includes PassSupport.h and PassAnalysisSupport.h. Each of those #includes Pass.h. This makes the modules build unhappy when local submodule visibility is enabled.

The approach taken here is:

  • Move the definition of the Pass base class and related types to PassBase.h
  • Change the other two headers to include PassBase.h instead of Pass.h

This way including Pass.h gets the full Pass interface, and PassBase.h gets just the base Pass classes. One functional difference is that including PassSupport does *not* provide PassAnalysisSupport and vice versa. I'm doing a build right now to see if I need to add includes of those two anywhere as a result.

Diff Detail

Repository
rL LLVM

Event Timeline

rsmith updated this revision to Diff 25519.May 11 2015, 3:50 PM
rsmith retitled this revision from to Fix #include cycle between Pass.h and PassSupport.h.
rsmith updated this object.
rsmith edited the test plan for this revision. (Show Details)
rsmith added a reviewer: chandlerc.
rsmith set the repository for this revision to rL LLVM.
rsmith added a subscriber: Unknown Object (MLST).
chandlerc requested changes to this revision.May 11 2015, 4:16 PM
chandlerc edited edge metadata.
chandlerc added inline comments.
include/llvm/Pass.h
18

Can you sink this into llvm/IR/ and call it LegacyPass.h?

And sink the other files' actual content into llvm/IR/LegacyFoo.h files?

And then these will all be pure forwarding headers?

This revision now requires changes to proceed.May 11 2015, 4:16 PM
rsmith abandoned this revision.Jul 13 2015, 7:35 PM