[PATCH] D43717: [WebAssembly] Make getWasmType a non-member function.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 13:06:54 PST 2018

sbc100 added a comment.

I'm not sure I agree with the premis in the change description. There are plenty of times when a method makes sense even though it operates on only the public members (if only to take advantage of the implicit this and to keep data and logic grouped together).    For example most of the methods in elf::Symbol only use public fields.

However I do like the re-write of this code.   Would you consider re-writing but keeping it as method (using `isa..(this)` instead)?


More information about the llvm-commits mailing list