diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/InfoSink.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/InfoSink.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/3rdparty/angle/src/compiler/InfoSink.cpp b/src/3rdparty/angle/src/compiler/InfoSink.cpp index ba32f781f5..d20a6c0175 100644 --- a/src/3rdparty/angle/src/compiler/InfoSink.cpp +++ b/src/3rdparty/angle/src/compiler/InfoSink.cpp @@ -6,8 +6,8 @@ #include "compiler/InfoSink.h" -void TInfoSinkBase::prefix(TPrefixType message) { - switch(message) { +void TInfoSinkBase::prefix(TPrefixType p) { + switch(p) { case EPrefixNone: break; case EPrefixWarning: @@ -31,29 +31,24 @@ void TInfoSinkBase::prefix(TPrefixType message) { } } -void TInfoSinkBase::location(TSourceLoc loc) { - int string = 0, line = 0; - DecodeSourceLoc(loc, &string, &line); - +void TInfoSinkBase::location(int file, int line) { TPersistStringStream stream; if (line) - stream << string << ":" << line; + stream << file << ":" << line; else - stream << string << ":? "; + stream << file << ":? "; stream << ": "; sink.append(stream.str()); } -void TInfoSinkBase::message(TPrefixType message, const char* s) { - prefix(message); - sink.append(s); - sink.append("\n"); +void TInfoSinkBase::location(const TSourceLoc& loc) { + location(loc.first_file, loc.first_line); } -void TInfoSinkBase::message(TPrefixType message, const char* s, TSourceLoc loc) { - prefix(message); +void TInfoSinkBase::message(TPrefixType p, const TSourceLoc& loc, const char* m) { + prefix(p); location(loc); - sink.append(s); + sink.append(m); sink.append("\n"); } |