aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-01 20:00:57 +0000
committerDale Johannesen <dalej@apple.com>2008-04-01 20:00:57 +0000
commitb6d5b1439047609c050576f3dc52b722e76bd30b (patch)
tree40d27805f206bbe0dbb4b11ec963fa0a4a026cdf /lib/CodeGen/DwarfWriter.cpp
parent5a15814098702ea301e2f7ef045b12126c808eaf (diff)
Revert 49006 for the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/DwarfWriter.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 3296e114df..e72ff07a9d 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -2778,13 +2778,9 @@ private:
std::vector<FunctionEHFrameInfo> EHFrames;
- /// shouldEmit - Per-function flag to indicate if EH information should
- /// be emitted.
+ /// shouldEmit - Flag to indicate if debug information should be emitted.
+ ///
bool shouldEmit;
-
- /// shouldEmitModule - Per-module flag to indicate if EH information should
- /// be emitted.
- bool shouldEmitModule;
/// EmitCommonEHFrame - Emit the common eh unwind frame.
///
@@ -3372,7 +3368,6 @@ public:
DwarfException(std::ostream &OS, AsmPrinter *A, const TargetAsmInfo *T)
: Dwarf(OS, A, T, "eh")
, shouldEmit(false)
- , shouldEmitModule(false)
{}
virtual ~DwarfException() {}
@@ -3392,7 +3387,7 @@ public:
/// EndModule - Emit all exception information that should come after the
/// content.
void EndModule() {
- if (!shouldEmitModule) return;
+ if (!shouldEmit) return;
const std::vector<Function *> Personalities = MMI->getPersonalities();
for (unsigned i =0; i < Personalities.size(); ++i)
@@ -3408,14 +3403,13 @@ public:
void BeginFunction(MachineFunction *MF) {
this->MF = MF;
- shouldEmit = false;
- if ((ExceptionHandling || !MF->getFunction()->doesNotThrow()) &&
+ if (MMI &&
+ ExceptionHandling &&
TAI->doesSupportExceptionHandling()) {
shouldEmit = true;
// Assumes in correct section after the entry point.
EmitLabel("eh_func_begin", ++SubprogramCount);
}
- shouldEmitModule |= shouldEmit;
}
/// EndFunction - Gather and emit post-function exception information.