Remove unused members from TPpContext.
authorDavid Neto <dneto@google.com>
Fri, 24 Jul 2015 12:12:36 +0000 (08:12 -0400)
committerLei Zhang <antiagainst@google.com>
Wed, 5 Aug 2015 17:15:27 +0000 (13:15 -0400)
The ErrMsg and ifloc members were unused or had no effect.

glslang/MachineIndependent/preprocessor/Pp.cpp
glslang/MachineIndependent/preprocessor/PpContext.h

index d62b736..df2de58 100644 (file)
@@ -551,8 +551,7 @@ int TPpContext::CPPif(TPpToken* ppToken)
 {
     int token = scanToken(ppToken);
     elsetracker++;
-    if (! ifdepth++)
-        ifloc = ppToken->loc;
+    ifdepth++;
     if (ifdepth > maxIfNesting) {
         parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", "");
         return 0;
index 5d06e70..57eb9f4 100644 (file)
@@ -237,7 +237,6 @@ protected:
     int ifdepth;                  // current #if-#else-#endif nesting in the cpp.c file (pre-processor)    
     bool elseSeen[maxIfNesting];  // Keep a track of whether an else has been seen at a particular depth
     int elsetracker;              // #if-#else and #endif constructs...Counter.
-    const char* ErrMsg;
 
     class tMacroInput : public tInput {
     public:
@@ -286,7 +285,7 @@ protected:
     //
     // from Pp.cpp
     //
-    TSourceLoc ifloc; /* outermost #if */
+
     // Used to obtain #include content.
     const TShader::Includer& includer;