Skip to content

Fix include guards #25070

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

Merged
merged 1 commit into from
Jun 21, 2019
Merged

Fix include guards #25070

merged 1 commit into from
Jun 21, 2019

Conversation

moatom
Copy link

@moatom moatom commented May 26, 2019

I fixed include guards using the identifiers reserved by C++.

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks! = ).

@gottesmm
Copy link
Contributor

@swift-ci test and merge

@compnerd
Copy link
Member

@swift-ci please test and merge

@moatom
Copy link
Author

moatom commented May 28, 2019

Sorry.
I accidentally send this PR without testing in my environment.
But I didn't think it would fail.

Anyway, it seems to work fine if undoing the changes of HeapObject.h, KeyPath.h and System.h's include guards and then I found that these just have include guards of the same names as others.

@moatom
Copy link
Author

moatom commented May 28, 2019

Now, It would work.
Please check.

@CodaFi
Copy link
Contributor

CodaFi commented May 28, 2019

@swift-ci please test

@CodaFi CodaFi closed this May 28, 2019
@CodaFi CodaFi reopened this May 28, 2019
@moatom
Copy link
Author

moatom commented May 31, 2019

@gottesmm
Could you merge it, or is there something wrong with it?

@@ -31,4 +31,4 @@
# endif
#endif

#endif /* SWIFT_ABI_TARGET_H */
#endif /* SWIFT_STDLIB_SHIMS_ABI_TARGET_H */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change /* to //?

@moatom
Copy link
Author

moatom commented May 31, 2019

ok

@compnerd
Copy link
Member

compnerd commented Jun 1, 2019

@moatom could you please squash the commits into a single commit?

@moatom
Copy link
Author

moatom commented Jun 2, 2019

@compnerd
Thank you for pointing it out.
It is rebase -i, isn't it?

I have another question.
When I searched Swift's source code by #endif /* , I found further ununified comments at the namespace ends in 24 files.
Should I change their /* to // this time?
We cannot avoid recompilation of all the translation units depending on them :(.

@compnerd
Copy link
Member

compnerd commented Jun 2, 2019

Yes, use git rebase -i to squash the commits.

Sure, changing the ending on those in a follow up is fine.

@moatom
Copy link
Author

moatom commented Jun 2, 2019

Done!

@compnerd
Copy link
Member

compnerd commented Jun 2, 2019

@swift-ci please test

@compnerd compnerd merged commit 38995f5 into swiftlang:master Jun 21, 2019
@moatom moatom deleted the fix-include-guard branch July 21, 2019 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants