[llvm-commits] [llvm] r170041 - in /llvm/trunk: include/llvm/MC/MCAssembler.h include/llvm/MC/MCContext.h include/llvm/MC/MCObjectStreamer.h include/llvm/MC/MCStreamer.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/MachineModuleInfo.cpp lib/MC/MCAssembler.cpp lib/MC/MCContext.cpp lib/MC/MCObjectStreamer.cpp lib/MC/MCStreamer.cpp

Chandler Carruth chandlerc at google.com
Wed Dec 12 15:19:45 PST 2012


On Wed, Dec 12, 2012 at 2:59 PM, Pedro Artigas <partigas at apple.com> wrote:

>  MCContext::~MCContext() {
>
> -  if (AutoInitializationFinalization)
> -    doFinalization();
> +  if (AutoReset)
> +    reset();
>

I don't think this does what you want it to... This is a virtual function,
and so it seems like a bad idea:
http://www.artima.com/cppsource/nevercall.html

That said, I don't think we need the functionality of MCContext's reset in
the destructor -- won't the normal destructor do what you want anyways?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121212/bebae0e4/attachment.html>


More information about the llvm-commits mailing list