Commit 646ea1ec by alokp@chromium.org

Fixed compile error for translator_hlsl.

git-svn-id: https://angleproject.googlecode.com/svn/trunk@1153 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0c1f5942
...@@ -17,6 +17,8 @@ class TDiagnostics : public pp::Diagnostics ...@@ -17,6 +17,8 @@ class TDiagnostics : public pp::Diagnostics
TDiagnostics(TInfoSink& infoSink); TDiagnostics(TInfoSink& infoSink);
virtual ~TDiagnostics(); virtual ~TDiagnostics();
TInfoSink& infoSink() { return mInfoSink; }
void writeInfo(Severity severity, void writeInfo(Severity severity,
const pp::SourceLocation& loc, const pp::SourceLocation& loc,
const std::string& reason, const std::string& reason,
......
...@@ -101,8 +101,8 @@ void OutputHLSL::output() ...@@ -101,8 +101,8 @@ void OutputHLSL::output()
mContext.treeRoot->traverse(this); // Output the body first to determine what has to go in the header mContext.treeRoot->traverse(this); // Output the body first to determine what has to go in the header
header(); header();
mContext.infoSink.obj << mHeader.c_str(); mContext.infoSink().obj << mHeader.c_str();
mContext.infoSink.obj << mBody.c_str(); mContext.infoSink().obj << mBody.c_str();
} }
TInfoSinkBase &OutputHLSL::getBodyStream() TInfoSinkBase &OutputHLSL::getBodyStream()
......
...@@ -67,6 +67,7 @@ struct TParseContext { ...@@ -67,6 +67,7 @@ struct TParseContext {
bool initPreprocessor(); bool initPreprocessor();
void destroyPreprocessor(); void destroyPreprocessor();
TInfoSink& infoSink() { return diagnostics.infoSink(); }
void error(TSourceLoc loc, const char *reason, const char* token, void error(TSourceLoc loc, const char *reason, const char* token,
const char* extraInfoFormat, ...); const char* extraInfoFormat, ...);
void warning(TSourceLoc loc, const char* reason, const char* token, void warning(TSourceLoc loc, const char* reason, const char* token,
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "compiler/TranslatorHLSL.h" #include "compiler/TranslatorHLSL.h"
#include "compiler/InitializeParseContext.h"
#include "compiler/OutputHLSL.h" #include "compiler/OutputHLSL.h"
TranslatorHLSL::TranslatorHLSL(ShShaderType type, ShShaderSpec spec) TranslatorHLSL::TranslatorHLSL(ShShaderType type, ShShaderSpec spec)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment