diff options
author | Johannes Kauffmann <19662702+JohannesKauffmann@users.noreply.github.com> | 2023-02-25 20:57:02 +0100 |
---|---|---|
committer | arcady-lunarg <122813703+arcady-lunarg@users.noreply.github.com> | 2023-05-10 09:55:02 -0600 |
commit | e00517acfec01a7248aa5dc516c57287c3639aa8 (patch) | |
tree | 9b918f1ebd7632e241a960e3c2620c3c1a1d2801 | |
parent | 076c35863ebbfd0bf650cea7b367dfd36a60a729 (diff) | |
download | glslang-e00517acfec01a7248aa5dc516c57287c3639aa8.tar.gz |
SPIRV: remove pre-C++11 workaround
-rw-r--r-- | SPIRV/SPVRemapper.cpp | 6 | ||||
-rw-r--r-- | SPIRV/SPVRemapper.h | 28 | ||||
-rw-r--r-- | StandAlone/spirv-remap.cpp | 2 |
3 files changed, 0 insertions, 36 deletions
diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 6aca8cbc..4b2c4395 100644 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -36,10 +36,6 @@ #include "SPVRemapper.h" #include "doc.h" -#if !defined (use_cpp11) -// ... not supported before C++11 -#else // defined (use_cpp11) - #include <algorithm> #include <cassert> #include "../glslang/Include/Common.h" @@ -1528,5 +1524,3 @@ namespace spv { } // namespace SPV -#endif // defined (use_cpp11) - diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h index d2169463..42b01686 100644 --- a/SPIRV/SPVRemapper.h +++ b/SPIRV/SPVRemapper.h @@ -43,12 +43,6 @@ namespace spv { -// MSVC defines __cplusplus as an older value, even when it supports almost all of 11. -// We handle that here by making our own symbol. -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700) -# define use_cpp11 1 -#endif - class spirvbin_base_t { public: @@ -74,27 +68,6 @@ public: } // namespace SPV -#if !defined (use_cpp11) -#include <cstdio> -#include <cstdint> - -namespace spv { -class spirvbin_t : public spirvbin_base_t -{ -public: - spirvbin_t(int /*verbose = 0*/) { } - - void remap(std::vector<std::uint32_t>& /*spv*/, unsigned int /*opts = 0*/) - { - printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n"); - exit(5); - } -}; - -} // namespace SPV - -#else // defined (use_cpp11) - #include <functional> #include <cstdint> #include <unordered_map> @@ -308,5 +281,4 @@ private: } // namespace SPV -#endif // defined (use_cpp11) #endif // SPIRVREMAPPER_H diff --git a/StandAlone/spirv-remap.cpp b/StandAlone/spirv-remap.cpp index 301bb0cb..c54cbb9d 100644 --- a/StandAlone/spirv-remap.cpp +++ b/StandAlone/spirv-remap.cpp @@ -352,13 +352,11 @@ int main(int argc, char** argv) int opts; int verbosity; -#ifdef use_cpp11 // handle errors by exiting spv::spirvbin_t::registerErrorHandler(errHandler); // Log messages to std::cout spv::spirvbin_t::registerLogHandler(logHandler); -#endif if (argc < 2) usage(argv[0]); |