diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-05-06 13:41:54 +0000 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2019-05-06 13:41:54 +0000 |
commit | 799d96ec395fc617fedea40676da32f532d1534b (patch) | |
tree | 42995b67535500b53409f46470efb20373feb4f7 /llvm/unittests/Transforms | |
parent | 70afe4f7e1f72607881d8ff4719149a0dbc94120 (diff) | |
download | bcm5719-llvm-799d96ec395fc617fedea40676da32f532d1534b.tar.gz bcm5719-llvm-799d96ec395fc617fedea40676da32f532d1534b.zip |
Fix compilation warnings when compiling with GCC 7.3
Differential Revision: https://reviews.llvm.org/D61046
llvm-svn: 360044
Diffstat (limited to 'llvm/unittests/Transforms')
-rw-r--r-- | llvm/unittests/Transforms/Scalar/CMakeLists.txt | 5 | ||||
-rw-r--r-- | llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp | 10 |
2 files changed, 5 insertions, 10 deletions
diff --git a/llvm/unittests/Transforms/Scalar/CMakeLists.txt b/llvm/unittests/Transforms/Scalar/CMakeLists.txt index 2762799d612..3d01d5c5334 100644 --- a/llvm/unittests/Transforms/Scalar/CMakeLists.txt +++ b/llvm/unittests/Transforms/Scalar/CMakeLists.txt @@ -10,3 +10,8 @@ set(LLVM_LINK_COMPONENTS add_llvm_unittest(ScalarTests LoopPassManagerTest.cpp ) + +# Workaround for the gcc 6.1 bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80916. +if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) + set_source_files_properties(LoopPassManagerTest.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-function) +endif() diff --git a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp index fc94b6e8c1a..0743cba852d 100644 --- a/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp +++ b/llvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp @@ -20,19 +20,9 @@ #include "llvm/IR/PassManager.h" #include "llvm/Support/SourceMgr.h" -// Workaround for the gcc 6.1 bug PR80916. -#if defined(__GNUC__) && __GNUC__ > 5 -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-function" -#endif - #include "gmock/gmock.h" #include "gtest/gtest.h" -#if defined(__GNUC__) && __GNUC__ > 5 -# pragma GCC diagnostic pop -#endif - using namespace llvm; namespace { |