aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/JSBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/JSBackend/JSBackend.cpp')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index 65504326b0..856a051fe9 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -950,6 +950,11 @@ std::string JSWriter::getConstant(const Constant* CV, AsmCast sign) {
Externals.insert(Name);
return Name;
}
+ if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(CV)) {
+ // Since we don't currently support linking of our output, we don't need
+ // to worry about weak or other kinds of aliases.
+ return getConstant(GA->getAliasee(), sign);
+ }
return utostr(getGlobalAddress(GV->getName().str()));
}