diff options
author | Masahiro Yamada | 2020-12-02 22:49:29 +0900 |
---|---|---|
committer | Kees Cook | 2020-12-04 14:09:41 -0800 |
commit | af2d22254e8ee4558d3803372735c0b4f6046cd2 (patch) | |
tree | b9644c9f4aaf14ec391b781fa37555800145986a /scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | |
parent | b65054597872ce3aefbc6a666385eabdf9e288da (diff) |
gcc-plugins: remove code for GCC versions older than 4.9
Documentation/process/changes.rst says the minimal GCC version is 4.9.
Hence, BUILDING_GCC_VERSION is greater than or equal to 4009.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201202134929.99883-1-masahiroy@kernel.org
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h')
-rw-r--r-- | scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h b/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h index 06800bc477e0..ef6f4c2cb6fa 100644 --- a/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h +++ b/scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h @@ -73,18 +73,11 @@ #define TODO_FLAGS_FINISH 0 #endif -#if BUILDING_GCC_VERSION >= 4009 namespace { static const pass_data _PASS_NAME_PASS_DATA = { -#else -static struct simple_ipa_opt_pass _PASS_NAME_PASS = { - .pass = { -#endif .type = SIMPLE_IPA_PASS, .name = _PASS_NAME_NAME, -#if BUILDING_GCC_VERSION >= 4008 .optinfo_flags = OPTGROUP_NONE, -#endif #if BUILDING_GCC_VERSION >= 5000 #elif BUILDING_GCC_VERSION == 4009 .has_gate = _HAS_GATE, @@ -102,12 +95,8 @@ static struct simple_ipa_opt_pass _PASS_NAME_PASS = { .properties_destroyed = PROPERTIES_DESTROYED, .todo_flags_start = TODO_FLAGS_START, .todo_flags_finish = TODO_FLAGS_FINISH, -#if BUILDING_GCC_VERSION < 4009 - } -#endif }; -#if BUILDING_GCC_VERSION >= 4009 class _PASS_NAME_PASS : public simple_ipa_opt_pass { public: _PASS_NAME_PASS() : simple_ipa_opt_pass(_PASS_NAME_PASS_DATA, g) {} @@ -136,12 +125,6 @@ opt_pass *_MAKE_PASS_NAME_PASS(void) { return new _PASS_NAME_PASS(); } -#else -struct opt_pass *_MAKE_PASS_NAME_PASS(void) -{ - return &_PASS_NAME_PASS.pass; -} -#endif /* clean up user provided defines */ #undef PASS_NAME |