Fix handling of relocation names, so that prefix mangling works.
Fixes bug in the representation of relocation names (in either global
initializers or as constant expressions in code) so that they
understand when the name is externally defined. This allows us to test
this property using command line arguments, and fixes relocation tests
in cross compilations (where externnally referenced names shouldn't be
name mangled).
BUG=
R=jvoung@chromium.org, stichnot@chromium.org
Review URL: https://codereview.chromium.org/667763002
diff --git a/src/IceTranslator.cpp b/src/IceTranslator.cpp
index 6d4af11..dad0fa9 100644
--- a/src/IceTranslator.cpp
+++ b/src/IceTranslator.cpp
@@ -88,7 +88,7 @@
Ostream &Stream = Ctx->getStrDump();
for (const Ice::VariableDeclaration *Global : VariableDeclarations) {
if (DumpGlobalVariables)
- Global->dump(Stream);
+ Global->dump(getContext(), Stream);
if(!DisableTranslation)
GlobalLowering->lower(*Global);
}