From 39bfb6b978e937487a9cedfd964d61a3ac4384b8 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 7 Feb 2019 14:49:15 -0500 Subject: [PATCH] Make spvParseTargetEnv public (#2362) This CL moves the method to parse the SPIRV environment into the public headers. This will allow other applications to re-use the same parsing logic. --- include/spirv-tools/libspirv.h | 4 ++++ source/spirv_target_env.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spirv-tools/libspirv.h b/include/spirv-tools/libspirv.h index ff7eb6b6c..13bd959a8 100644 --- a/include/spirv-tools/libspirv.h +++ b/include/spirv-tools/libspirv.h @@ -445,6 +445,10 @@ typedef enum { // Returns a string describing the given SPIR-V target environment. SPIRV_TOOLS_EXPORT const char* spvTargetEnvDescription(spv_target_env env); +// Parses s into *env and returns true if successful. If unparsable, returns +// false and sets *env to SPV_ENV_UNIVERSAL_1_0. +SPIRV_TOOLS_EXPORT bool spvParseTargetEnv(const char* s, spv_target_env* env); + // Creates a context object. Returns null if env is invalid. SPIRV_TOOLS_EXPORT spv_context spvContextCreate(spv_target_env env); diff --git a/source/spirv_target_env.h b/source/spirv_target_env.h index d4635705f..c19d16921 100644 --- a/source/spirv_target_env.h +++ b/source/spirv_target_env.h @@ -19,10 +19,6 @@ #include "spirv-tools/libspirv.h" -// Parses s into *env and returns true if successful. If unparsable, returns -// false and sets *env to SPV_ENV_UNIVERSAL_1_0. -bool spvParseTargetEnv(const char* s, spv_target_env* env); - // Returns true if |env| is a VULKAN environment, false otherwise. bool spvIsVulkanEnv(spv_target_env env);