Commit a7bc2b97 by Ben Clayton

Reactor: Disable more warnings to get LLVM 10 building

There's yet more unnecessary semicolons knocking around in the public LLVM headers, which are purely stylistic issues. Just silence them. `LegacyIRCompileLayer` is now annotated with deprecated, so we need to disable the warning for that too (and move to the new JIT in time). Bug: b/152339534 Change-Id: Id84fe88fd2f6b50000e37a8b84f52742ca9db646 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/43010Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent a0535bd3
...@@ -476,6 +476,7 @@ else() ...@@ -476,6 +476,7 @@ else()
"-Wno-unused-private-field" # private field 'offset' is not used - TODO: Consider enabling this once Vulkan is further implemented. "-Wno-unused-private-field" # private field 'offset' is not used - TODO: Consider enabling this once Vulkan is further implemented.
"-Wno-comment" # multi-line comment "-Wno-comment" # multi-line comment
"-Wno-undefined-var-template" # instantiation of variable 'X' required here, but no definition is available "-Wno-undefined-var-template" # instantiation of variable 'X' required here, but no definition is available
"-Wno-extra-semi" # extra ';' after member function definition
# Silence errors caused by unknown warnings when building with older # Silence errors caused by unknown warnings when building with older
# versions of Clang. This demands checking that warnings added above # versions of Clang. This demands checking that warnings added above
......
...@@ -18,13 +18,6 @@ ...@@ -18,13 +18,6 @@
#include "ExecutableMemory.hpp" #include "ExecutableMemory.hpp"
#include "Routine.hpp" #include "Routine.hpp"
#if defined(__clang__)
// LLVM has occurrences of the extra-semi warning in its headers, which will be
// treated as an error in SwiftShader targets.
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wextra-semi"
#endif // defined(__clang__)
// TODO(b/143539525): Eliminate when warning has been fixed. // TODO(b/143539525): Eliminate when warning has been fixed.
#ifdef _MSC_VER #ifdef _MSC_VER
__pragma(warning(push)) __pragma(warning(push))
...@@ -60,10 +53,6 @@ __pragma(warning(push)) ...@@ -60,10 +53,6 @@ __pragma(warning(push))
#include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h" #include "llvm/Transforms/Scalar/GVN.h"
#if defined(__clang__)
# pragma clang diagnostic pop
#endif // defined(__clang__)
#ifdef _MSC_VER #ifdef _MSC_VER
__pragma(warning(pop)) __pragma(warning(pop))
#endif #endif
...@@ -595,6 +584,17 @@ class JITRoutine : public rr::Routine ...@@ -595,6 +584,17 @@ class JITRoutine : public rr::Routine
#endif #endif
public: public:
#if defined(__clang__)
// TODO(bclayton): Switch to new JIT
// error: 'LegacyIRCompileLayer' is deprecated: ORCv1 layers (layers with the 'Legacy' prefix) are deprecated.
// Please use the ORCv2 IRCompileLayer instead [-Werror,-Wdeprecated-declarations]
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
JITRoutine( JITRoutine(
std::unique_ptr<llvm::Module> module, std::unique_ptr<llvm::Module> module,
llvm::Function **funcs, llvm::Function **funcs,
...@@ -638,6 +638,13 @@ public: ...@@ -638,6 +638,13 @@ public:
}) })
, addresses(count) , addresses(count)
{ {
#if defined(__clang__)
# pragma clang diagnostic pop
#elif defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
std::vector<std::string> mangledNames(count); std::vector<std::string> mangledNames(count);
for(size_t i = 0; i < count; i++) for(size_t i = 0; i < count; i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment