diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp')
-rw-r--r-- | Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp b/Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp deleted file mode 100644 index 8a38c41a6..000000000 --- a/Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// - -#include "compiler/Diagnostics.h" - -#include "compiler/debug.h" -#include "compiler/InfoSink.h" -#include "compiler/preprocessor/SourceLocation.h" - -TDiagnostics::TDiagnostics(TInfoSink& infoSink) : - mInfoSink(infoSink), - mNumErrors(0), - mNumWarnings(0) -{ -} - -TDiagnostics::~TDiagnostics() -{ -} - -void TDiagnostics::writeInfo(Severity severity, - const pp::SourceLocation& loc, - const std::string& reason, - const std::string& token, - const std::string& extra) -{ - TPrefixType prefix = EPrefixNone; - switch (severity) - { - case ERROR: - ++mNumErrors; - prefix = EPrefixError; - break; - case WARNING: - ++mNumWarnings; - prefix = EPrefixWarning; - break; - default: - UNREACHABLE(); - break; - } - - TInfoSinkBase& sink = mInfoSink.info; - /* VC++ format: file(linenum) : error #: 'token' : extrainfo */ - sink.prefix(prefix); - sink.location(loc.file, loc.line); - sink << "'" << token << "' : " << reason << " " << extra << "\n"; -} - -void TDiagnostics::writeDebug(const std::string& str) -{ - mInfoSink.debug << str; -} - -void TDiagnostics::print(ID id, - const pp::SourceLocation& loc, - const std::string& text) -{ - writeInfo(severity(id), loc, message(id), text, ""); -} |