[llvm-commits] [llvm] r66571 - in /llvm/trunk: include/llvm/CodeGen/DwarfWriter.h lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Chris Lattner clattner at apple.com
Tue Mar 10 15:29:35 PDT 2009


On Mar 10, 2009, at 1:41 PM, Bill Wendling wrote:

> Author: void
> Date: Tue Mar 10 15:41:52 2009
> New Revision: 66571
>
> URL: http://llvm.org/viewvc/llvm-project?rev=66571&view=rev
> Log:
> Add a timer to the DwarfWriter pass that measures the total time it  
> takes to
> emit exception and debug Dwarf info.

Cool
> +
> +static TimerGroup *DwarfTimerGroup = 0;
> +static TimerGroup *getDwarfTimerGroup() {
> +  if (DwarfTimerGroup) return DwarfTimerGroup;
> +  return DwarfTimerGroup = new TimerGroup("Dwarf Exception and  
> Debugging");
> +}

How is this freed?

> +} // end anonymous namespace

You don't need to put static functions in anon namespaces.

-Chris



More information about the llvm-commits mailing list