[PATCH] D44206: [WebAssembly] Create SyntheticFunction for __wasm_call_ctors earlier
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 09:44:54 PST 2018
sbc100 accepted this revision.
sbc100 added a comment.
This revision is now accepted and ready to land.
Nice. I like this increased abstraction and generalization this buys us.
LGTM, with comments.
================
Comment at: wasm/SymbolTable.h:53
+ }
+ ArrayRef<InputGlobal *> getSyntheticGlobals() const {
+ return SyntheticGlobals;
----------------
Newline between method bodies.
================
Comment at: wasm/SymbolTable.h:87
+ std::vector<InputFunction *> SyntheticFunctions;
+ std::vector<InputGlobal *> SyntheticGlobals;
----------------
Maybe move these up to where ObjectFiles is defined (and make them public). They seem to fit the same category to me, and it would save adding accessors.
================
Comment at: wasm/Writer.cpp:884
+ ArrayRef<uint8_t> Body = toArrayRef(Saver.save(FunctionBody));
+ static_cast<SyntheticFunction*>(WasmSym::CallCtors->Function)->setBody(Body);
}
----------------
Should use cast<> here and define a classof() for syntheticfunction? Would that buy is anything?
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D44206
More information about the llvm-commits
mailing list