gfx/angle/src/compiler/Diagnostics.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 //
     2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #ifndef COMPILER_DIAGNOSTICS_H_
     8 #define COMPILER_DIAGNOSTICS_H_
    10 #include "compiler/preprocessor/DiagnosticsBase.h"
    12 class TInfoSink;
    14 class TDiagnostics : public pp::Diagnostics
    15 {
    16   public:
    17     TDiagnostics(TInfoSink& infoSink);
    18     virtual ~TDiagnostics();
    20     TInfoSink& infoSink() { return mInfoSink; }
    22     int numErrors() const { return mNumErrors; }
    23     int numWarnings() const { return mNumWarnings; }
    25     void writeInfo(Severity severity,
    26                    const pp::SourceLocation& loc,
    27                    const std::string& reason,
    28                    const std::string& token,
    29                    const std::string& extra);
    31     void writeDebug(const std::string& str);
    33   protected:
    34     virtual void print(ID id,
    35                        const pp::SourceLocation& loc,
    36                        const std::string& text);
    38   private:
    39     TInfoSink& mInfoSink;
    40     int mNumErrors;
    41     int mNumWarnings;
    42 };
    44 #endif  // COMPILER_DIAGNOSTICS_H_

mercurial