SPIRV: remove pre-C++11 workaround

This commit is contained in:
Johannes Kauffmann 2023-02-25 20:57:02 +01:00 committed by arcady-lunarg
parent 076c35863e
commit e00517acfe
3 changed files with 0 additions and 36 deletions

View File

@ -36,10 +36,6 @@
#include "SPVRemapper.h" #include "SPVRemapper.h"
#include "doc.h" #include "doc.h"
#if !defined (use_cpp11)
// ... not supported before C++11
#else // defined (use_cpp11)
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include "../glslang/Include/Common.h" #include "../glslang/Include/Common.h"
@ -1528,5 +1524,3 @@ namespace spv {
} // namespace SPV } // namespace SPV
#endif // defined (use_cpp11)

View File

@ -43,12 +43,6 @@
namespace spv { 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 class spirvbin_base_t
{ {
public: public:
@ -74,27 +68,6 @@ public:
} // namespace SPV } // 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 <functional>
#include <cstdint> #include <cstdint>
#include <unordered_map> #include <unordered_map>
@ -308,5 +281,4 @@ private:
} // namespace SPV } // namespace SPV
#endif // defined (use_cpp11)
#endif // SPIRVREMAPPER_H #endif // SPIRVREMAPPER_H

View File

@ -352,13 +352,11 @@ int main(int argc, char** argv)
int opts; int opts;
int verbosity; int verbosity;
#ifdef use_cpp11
// handle errors by exiting // handle errors by exiting
spv::spirvbin_t::registerErrorHandler(errHandler); spv::spirvbin_t::registerErrorHandler(errHandler);
// Log messages to std::cout // Log messages to std::cout
spv::spirvbin_t::registerLogHandler(logHandler); spv::spirvbin_t::registerLogHandler(logHandler);
#endif
if (argc < 2) if (argc < 2)
usage(argv[0]); usage(argv[0]);