diff options
author | 卜部昌平 <[email protected]> | 2020-04-12 15:42:45 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-04-13 16:06:00 +0900 |
commit | c37a357c13b399b79fb1ef197738f60cae472dbf () | |
tree | 279ac6c7ce9a02a0d2fcd48e77bc42da1a8554c1 /include/ruby/backward | |
parent | 4ff3f205408ff8bb413d69151105d301858136ba (diff) |
include what you use.
This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56. This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7. Inclusion of header files must be explicit. Every file shall directly include what is necessary. https://.com/include-what-you-use/include-what-you-use says: > When every file includes what it uses, then it is possible to edit any > file and remove unused headers, without fear of accidentally breaking > the upwards dependencies of that file. It also becomes easy to > automatically track and update dependencies in the source code. Though we don't use iwyu itself, the principle quoted above is a good thing that we can agree. Now that include guards were added to every and all of the headers inside of our project this changeset does not increase compile time, at least on my machine.
Notes: Merged: https://.com/ruby/ruby/pull/3023
-rw-r--r-- | include/ruby/backward/2/gcc_version_since.h | 1 | ||||
-rw-r--r-- | include/ruby/backward/2/long_long.h | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -20,6 +20,7 @@ * extension libraries. They could be written in C++98. * @brief Defines old #GCC_VERSION_SINCE */ #ifndef GCC_VERSION_SINCE #define GCC_VERSION_SINCE(x, y, z) RUBY3_COMPILER_SINCE(GCC, (x), (y), (z)) @@ -26,6 +26,8 @@ * compatibility only. */ #include "ruby/3/config.h" #if RUBY3_HAS_WARNING("-Wc++11-long-long") # define HAVE_TRUE_LONG_LONG 1 |