Fix a traverse bug.

In loop node, the init part was skipped in traversing.

BUG=
TEST=
R=kbr@chromium.org

Review URL: https://codereview.appspot.com/14366043

Change-Id: If3200f1dbcafda1147820b2d47b758b897de0fc6
Reviewed-on: https://chromium-review.googlesource.com/178992
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/compiler/translator/IntermTraverse.cpp b/src/compiler/translator/IntermTraverse.cpp
index a20a5a2..0e345d2 100644
--- a/src/compiler/translator/IntermTraverse.cpp
+++ b/src/compiler/translator/IntermTraverse.cpp
@@ -211,9 +211,15 @@
 
             if (cond)
                 cond->traverse(it);
+
+            if (init)
+                init->traverse(it);
         }
         else
         {
+            if (init)
+                init->traverse(it);
+
             if (cond)
                 cond->traverse(it);
 
diff --git a/src/compiler/translator/MapLongVariableNames.cpp b/src/compiler/translator/MapLongVariableNames.cpp
index b9ec983..ef629c2 100644
--- a/src/compiler/translator/MapLongVariableNames.cpp
+++ b/src/compiler/translator/MapLongVariableNames.cpp
@@ -102,13 +102,6 @@
     }
 }
 
-bool MapLongVariableNames::visitLoop(Visit, TIntermLoop* node)
-{
-    if (node->getInit())
-        node->getInit()->traverse(this);
-    return true;
-}
-
 TString MapLongVariableNames::mapGlobalLongName(const TString& name)
 {
     ASSERT(mGlobalMap);
diff --git a/src/compiler/translator/MapLongVariableNames.h b/src/compiler/translator/MapLongVariableNames.h
index e0cdfb1..3b085a3 100644
--- a/src/compiler/translator/MapLongVariableNames.h
+++ b/src/compiler/translator/MapLongVariableNames.h
@@ -48,7 +48,6 @@
     MapLongVariableNames(LongNameMap* globalMap);
 
     virtual void visitSymbol(TIntermSymbol*);
-    virtual bool visitLoop(Visit, TIntermLoop*);
 
 private:
     TString mapGlobalLongName(const TString& name);