From 226f263cbcb03eeb78739dd918be8b03fd24e460 Mon Sep 17 00:00:00 2001 From: GregF Date: Wed, 27 Dec 2017 17:12:04 -0700 Subject: [PATCH] Test: Fix linux/gcc defined-but-not-used warnings/errors --- test/opt/type_manager_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/opt/type_manager_test.cpp b/test/opt/type_manager_test.cpp index 0bb11ba..d1e8b50 100644 --- a/test/opt/type_manager_test.cpp +++ b/test/opt/type_manager_test.cpp @@ -29,6 +29,8 @@ namespace { using namespace spvtools; using namespace spvtools::opt::analysis; +#ifdef SPIRV_EFFCEE + bool Validate(const std::vector& bin) { spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2; spv_context spvContext = spvContextCreate(target_env); @@ -41,7 +43,6 @@ bool Validate(const std::vector& bin) { return error == 0; } -#ifdef SPIRV_EFFCEE void Match(const std::string& original, ir::IRContext* context, bool do_validation = true) { std::vector bin; @@ -60,7 +61,6 @@ void Match(const std::string& original, ir::IRContext* context, << match_result.message() << "\nChecking result:\n" << assembly; } -#endif std::vector> GenerateAllTypes() { // Types in this test case are only equal to themselves, nothing else. @@ -168,6 +168,8 @@ std::vector> GenerateAllTypes() { return types; } +#endif + TEST(TypeManager, TypeStrings) { const std::string text = R"( OpTypeForwardPointer !20 !2 ; id for %p is 20, Uniform is 2 -- 2.7.4