// Copyright (c) 2016 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef INCLUDE_SPIRV_TOOLS_LIBSPIRV_HPP_ #define INCLUDE_SPIRV_TOOLS_LIBSPIRV_HPP_ #include <functional> #include <memory> #include <string> #include <vector> #include "spirv-tools/libspirv.h" namespace spvtools { // Message consumer. The C strings for source and message are only alive for the // specific invocation. MessageConsumer; HeaderParser; InstructionParser; // C++ RAII wrapper around the C context object spv_context. class SPIRV_TOOLS_EXPORT Context { … }; // A RAII wrapper around a validator options object. class SPIRV_TOOLS_EXPORT ValidatorOptions { … }; // A C++ wrapper around an optimization options object. class SPIRV_TOOLS_EXPORT OptimizerOptions { … }; // A C++ wrapper around a reducer options object. class SPIRV_TOOLS_EXPORT ReducerOptions { … }; // A C++ wrapper around a fuzzer options object. class SPIRV_TOOLS_EXPORT FuzzerOptions { … }; // C++ interface for SPIRV-Tools functionalities. It wraps the context // (including target environment and the corresponding SPIR-V grammar) and // provides methods for assembling, disassembling, and validating. // // Instances of this class provide basic thread-safety guarantee. class SPIRV_TOOLS_EXPORT SpirvTools { … }; } // namespace spvtools #endif // INCLUDE_SPIRV_TOOLS_LIBSPIRV_HPP_