mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Give NamedRegionTimer an Enabled flag, allowing all its clients to
switch from this: if (TimePassesIsEnabled) { NamedRegionTimer T(Name, GroupName); do_something(); } else { do_something(); // duplicate the code, this time without a timer! } to this: { NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled); do_something(); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -322,11 +322,9 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
DwarfStrSectionSym = TextSectionSym = 0;
|
||||
DwarfDebugRangeSectionSym = DwarfDebugLocSectionSym = 0;
|
||||
FunctionBeginSym = FunctionEndSym = 0;
|
||||
if (TimePassesIsEnabled) {
|
||||
NamedRegionTimer T(DbgTimerName, DWARFGroupName);
|
||||
beginModule(M);
|
||||
} else {
|
||||
beginModule(M);
|
||||
{
|
||||
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
|
||||
beginModule(M);
|
||||
}
|
||||
}
|
||||
DwarfDebug::~DwarfDebug() {
|
||||
|
Reference in New Issue
Block a user