little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()

llvm-svn: 57484
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index acc89c9..55151cb 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -963,7 +963,7 @@
           LinkedGlobalsMap[std::make_pair(GV->getName(), GV->getType())];
         void *Ptr = getPointerToGlobalIfAvailable(CGV);
         assert(Ptr && "Canonical global wasn't codegen'd!");
-        addGlobalMapping(GV, getPointerToGlobalIfAvailable(CGV));
+        addGlobalMapping(GV, Ptr);
       }
     }