Add an option to undefine __IMAGE_SUPPORT__ (#353)
Clang now defines it by default (was picked up in the update)
and the conformance tests check that this is defined if and only
if the runtime advertises support.
Signed-off-by: Kévin Petit <kpet@free.fr>
diff --git a/lib/Option.cpp b/lib/Option.cpp
index a0d929b..ec04e7e 100644
--- a/lib/Option.cpp
+++ b/lib/Option.cpp
@@ -153,6 +153,9 @@
static llvm::cl::opt<bool>
cplusplus("c++", llvm::cl::init(false),
llvm::cl::desc("Enable experimental C++ support"));
+
+static llvm::cl::opt<bool> images("images", llvm::cl::init(true),
+ llvm::cl::desc("Enable support for images"));
} // namespace
namespace clspv {
@@ -185,6 +188,7 @@
bool KeepUnusedArguments() { return keep_unused_arguments; }
bool Int8Support() { return int8_support; }
bool CPlusPlus() { return cplusplus; }
+bool ImageSupport() { return images; }
} // namespace Option
} // namespace clspv