Include per-shader and per-program pools in the new C++ interface to glslang.  (And picked up missing test result from previous check in.)

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23844 e7fa87d3-cd2b-0410-9028-fcbf551c1848
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 441f88b..eb0c6f4 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -537,7 +537,7 @@
     // Per-shader processing...
     //
 
-    glslang::TProgram program;
+    glslang::TProgram& program = *new glslang::TProgram;
     glslang::TWorkItem* workItem;
     while (Worklist.remove(workItem)) {
         EShLanguage stage = FindLanguage(workItem->name);
@@ -575,13 +575,15 @@
         puts(program.getInfoDebugLog());
     }
 
-    // free everything up
+    // Free everything up, program has to go before the shaders
+    // because it might have merged stuff from the shaders, and
+    // the stuff from the shaders has to have its destructors called
+    // before the pools holding the memory in the shaders is freed.
+    delete &program;
     while (shaders.size() > 0) {
         delete shaders.back();
         shaders.pop_back();
     }
-
-    // TODO: memory: for each compile, need a GetThreadPoolAllocator().pop();
 }
 
 int C_DECL main(int argc, char* argv[])
@@ -613,7 +615,6 @@
 
     ProcessConfigFile();
 
-
     //
     // Two modes:
     // 1) linking all arguments together, single-threaded, new C++ interface