From ff4ab9314881fbee1fbb81a5f754100d05764039 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 24 Apr 2014 18:10:51 -0700 Subject: comment --- lib/Target/JSBackend/JSBackend.cpp | 5 ++--- 1 file 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); -- cgit v1.2.3-18-g5258