Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing includes where headers depend on other headers having been included first. #1347

Merged
merged 1 commit into from Oct 23, 2014

Conversation

comex
Copy link
Contributor

@comex comex commented Oct 21, 2014

This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import. Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up. The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH. Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)

@comex comex force-pushed the header-hygiene branch 2 times, most recently from 7e8e856 to 2f58132 Compare October 21, 2014 06:22
@Sonicadvance1
Copy link
Contributor

Don't include GL/gl.h directly in all these files. Include GLExtensions/GLExtensions.h instead.

…n included first.

This is good hygiene, and also happens to be required to build Dolphin
using Clang modules.

(Under this setup, each header file becomes a module, and each #include
is automatically translated to a module import.  Recursive includes
still leak through (by default), but modules are compiled independently,
and can't depend on defines or types having previously been set up.  The
main reason to retrofit it onto Dolphin is compilation performance - no
more textual includes whatsoever, rather than putting a few blessed
common headers into a PCH.  Unfortunately, I found multiple Clang bugs
while trying to build Dolphin this way, so it's not ready yet, but I can
start with this prerequisite.)
@comex
Copy link
Contributor Author

comex commented Oct 22, 2014

@Sonicadvance1 fixed

@skidau
Copy link
Contributor

skidau commented Oct 23, 2014

Code looks fine

comex added a commit that referenced this pull request Oct 23, 2014
Add missing includes where headers depend on other headers having been included first.
@comex comex merged commit 00c6ec9 into dolphin-emu:master Oct 23, 2014
@Icekhaos
Copy link

Good job on the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants