mirror of
https://github.com/RPCS3/glslang.git
synced 2025-02-17 09:27:48 +00:00
SPIRV: remove pre-C++11 workaround
This commit is contained in:
parent
12e9fdc2ec
commit
fed6709f25
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user