[llvm-commits] [llvm] r172572 - in /llvm/trunk: include/llvm/MC/MCAssembler.h lib/MC/MCAssembler.cpp lib/MC/MCELFStreamer.cpp
Eli Bendersky
eliben at google.com
Wed Jan 16 08:55:08 PST 2013
On Tue, Jan 15, 2013 at 11:19 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> Hi Eli,
>
> Is it possible to implement this without introducing virtual function like hasFixups()? I'm always suspicious of virtual functions that returns a simple query. Could the query simply check the fragment type?
>
Done in r172622.
Although I must admit that I don't fully see the benefits in terms of
general software design considerations. If a new fragment deriving
from MCEncodedFragmentWithFixups is ever defined, one needs to
remember explicitly to add its type to that classof check. Whereas
with the virtual method, remembering that would not be required.
Eli
More information about the llvm-commits
mailing list