aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEdwin Török <edwintorok@gmail.com>2010-04-07 10:44:46 +0000
committerEdwin Török <edwintorok@gmail.com>2010-04-07 10:44:46 +0000
commitc669cb6ba3f71e51fd33cecb3467e5e59f5beb7c (patch)
treebfd2c01e288f852fa7e6e1faa7b3b12773c07362 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentce3c6253d9783bd8ef899570110bfd4339570fb3 (diff)
downloadexternal_llvm-c669cb6ba3f71e51fd33cecb3467e5e59f5beb7c.zip
external_llvm-c669cb6ba3f71e51fd33cecb3467e5e59f5beb7c.tar.gz
external_llvm-c669cb6ba3f71e51fd33cecb3467e5e59f5beb7c.tar.bz2
Workaround the breakage in r100616 by guarding all timers with
TimePassesIsEnabled. This should allow make check to pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 289dd80..b7d682e 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -315,8 +315,13 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
DwarfFrameSectionSym = DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0;
DwarfStrSectionSym = TextSectionSym = 0;
-
- beginModule(M);
+
+ if (TimePassesIsEnabled) {
+ NamedRegionTimer T(DbgTimerName, DWARFGroupName);
+ beginModule(M);
+ } else {
+ beginModule(M);
+ }
}
DwarfDebug::~DwarfDebug() {
for (unsigned j = 0, M = DIEBlocks.size(); j < M; ++j)
@@ -1844,8 +1849,6 @@ void DwarfDebug::constructSubprogramDIE(MDNode *N) {
/// content. Create global DIEs and emit initial debug info sections.
/// This is inovked by the target AsmPrinter.
void DwarfDebug::beginModule(Module *M) {
- NamedRegionTimer T(DbgTimerName, DWARFGroupName);
-
DebugInfoFinder DbgFinder;
DbgFinder.processModule(*M);
@@ -1908,7 +1911,6 @@ void DwarfDebug::beginModule(Module *M) {
/// endModule - Emit all Dwarf sections that should come after the content.
///
void DwarfDebug::endModule() {
- NamedRegionTimer T(DbgTimerName, DWARFGroupName);
if (!ModuleCU) return;
// Attach DW_AT_inline attribute with inlined subprogram DIEs.
@@ -2307,8 +2309,6 @@ bool DwarfDebug::extractScopeInformation() {
/// beginFunction - Gather pre-function debug information. Assumes being
/// emitted immediately after the function entry point.
void DwarfDebug::beginFunction(const MachineFunction *MF) {
- NamedRegionTimer T(DbgTimerName, DWARFGroupName);
-
if (!MMI->hasDebugInfo()) return;
if (!extractScopeInformation()) return;
@@ -2341,8 +2341,6 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
/// endFunction - Gather and emit post-function debug information.
///
void DwarfDebug::endFunction(const MachineFunction *MF) {
- NamedRegionTimer T(DbgTimerName, DWARFGroupName);
-
if (!MMI->hasDebugInfo() || DbgScopeMap.empty()) return;
if (CurrentFnDbgScope) {
@@ -2389,8 +2387,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
/// unique label that was emitted and which provides correspondence to
/// the source line list.
MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
- NamedRegionTimer T(DbgTimerName, DWARFGroupName);
-
StringRef Dir;
StringRef Fn;