Avoid doing symbol internalization when compiling with -O0.

Don't call the symbol internalization pass when compiling with -O0.
This will allow all RenderScript library functions to be available to
lldb, so the developer can call these builtin functions from lldb's
command line.

(cherry picked from commit 688cf3ffb7efe543fb1c47b581b1f36a346dfb7c)

Change-Id: I38a57edda0366a7f54cbd066d21e6aadc7e4eab7
diff --git a/lib/Core/Compiler.cpp b/lib/Core/Compiler.cpp
index ce9108e..01933c7 100644
--- a/lib/Core/Compiler.cpp
+++ b/lib/Core/Compiler.cpp
@@ -161,8 +161,10 @@
   addExpandKernelPass(transformPasses);
   addDebugInfoPass(pScript, transformPasses);
   addInvariantPass(transformPasses);
-  if (!addInternalizeSymbolsPass(pScript, transformPasses))
-    return kErrCustomPasses;
+  if (mTarget->getOptLevel() != llvm::CodeGenOpt::None) {
+    if (!addInternalizeSymbolsPass(pScript, transformPasses))
+      return kErrCustomPasses;
+  }
   addGlobalInfoPass(pScript, transformPasses);
 
   if (mTarget->getOptLevel() == llvm::CodeGenOpt::None) {