aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-05-12 22:36:25 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-05-12 22:36:25 +0000
commit0ff3ca4f9240048462d4cf8e708b519177acf1b4 (patch)
treec12b488f210dc6e9fbf3e4ab89ebd13075fe03f4 /lib/CodeGen/MachineModuleInfo.cpp
parent92c728350011c7d7df29d42166ad3436f1285249 (diff)
More DWARF-related things cleanup:
1. Fix PR1380 2. Apply Duncan's patch from PR1410 3. Insert workaround for "one personality function per module" as noted in PR1414 4. Emit correct debug frames for x86/linux. This partly fixes DebugInfo/2006-11-06-StackTrace.cpp: stack trace is shown correctly, but arguments for function on top of stack are displayed incorrectly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 9d532add1a..22172811dc 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -1475,6 +1475,7 @@ MachineModuleInfo::MachineModuleInfo()
, RootScope(NULL)
, FrameMoves()
, LandingPads()
+, Personality(NULL)
{}
MachineModuleInfo::~MachineModuleInfo() {
@@ -1685,9 +1686,13 @@ unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) {
/// addPersonality - Provide the personality function for the exception
/// information.
void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
- Function *Personality) {
+ Function *PersFn) {
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
- LP.Personality = Personality;
+ LP.Personality = PersFn;
+
+ // FIXME: Until PR1414 will be fixed, we're using 1 personality function per
+ // module
+ Personality = PersFn;
}
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
@@ -1751,7 +1756,11 @@ unsigned MachineModuleInfo::getTypeIDFor(GlobalVariable *TI) {
/// getLandingPadInfos - Return a reference to the landing pad info for the
/// current function.
Function *MachineModuleInfo::getPersonality() const {
- return !LandingPads.empty() ? LandingPads[0].Personality : NULL;
+ // FIXME: Until PR1414 will be fixed, we're using 1 personality function per
+ // module
+
+ //return !LandingPads.empty() ? LandingPads[0].Personality : NULL;
+ return Personality;
}