aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-04-24 18:10:51 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-04-24 18:10:51 -0700
commitff4ab9314881fbee1fbb81a5f754100d05764039 (patch)
treee94654cd8802bec6eb7dd3fba1c6a2b242d7f875 /lib
parente0d290a6df8d0180db0ac1727d36980507aee02f (diff)
comment
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/JSBackend/JSBackend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
index 4322be3c8c..8b7be4ac57 100644
--- a/lib/Target/JSBackend/JSBackend.cpp
+++ b/lib/Target/JSBackend/JSBackend.cpp
@@ -290,9 +290,8 @@ namespace {
if (IndexedFunctions.find(Name) != IndexedFunctions.end()) return IndexedFunctions[Name];
std::string Sig = getFunctionSignature(F->getFunctionType(), &Name);
FunctionTable& Table = ensureFunctionTable(F->getFunctionType());
- // use alignment info to avoid unnecessary holes. This is not optimal though,
- // (1) depends on order of appearance, and (2) really just need align for &class::method, see test_polymorph
- unsigned Alignment = F->getAlignment() || 1;
+ unsigned Alignment = F->getAlignment() || 1; // XXX this is wrong, it's always 1. but, that's fine in the ARM-like ABI we have which allows unaligned functions.
+ // the one risk is if someone forces a function to be aligned, and relies on that.
while (Table.size() % Alignment) Table.push_back("0");
unsigned Index = Table.size();
Table.push_back(Name);