Create a new logger class for all messages w.r.t. SPIR-V build.

This commit is contained in:
Lei Zhang
2016-05-04 15:55:59 -04:00
parent 09caf12bec
commit 17535f7d55
10 changed files with 184 additions and 61 deletions

View File

@@ -49,6 +49,7 @@
#ifndef SpvBuilder_H
#define SpvBuilder_H
#include "Logger.h"
#include "spirv.hpp"
#include "spvIR.h"
@@ -63,7 +64,7 @@ namespace spv {
class Builder {
public:
Builder(unsigned int userNumber, std::ostringstream& warnError);
Builder(unsigned int userNumber, SpvBuildLogger* logger);
virtual ~Builder();
static const int maxMatrixSize = 4;
@@ -583,15 +584,9 @@ public:
std::stack<LoopBlocks> loops;
// The stream for outputing warnings and errors.
std::ostringstream& warningsErrors;
SpvBuildLogger* logger;
}; // end Builder class
// Use for non-fatal notes about what's not complete
void TbdFunctionality(std::ostringstream&, const char*);
// Use for fatal missing functionality
void MissingFunctionality(std::ostringstream&, const char*);
}; // end spv namespace
#endif // SpvBuilder_H