summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/WinEHPrepare.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-09-28 23:56:30 +0000
committerReid Kleckner <rnk@google.com>2015-09-28 23:56:30 +0000
commitc71d6275ca727a6d534dd5ee4602e315702e8054 (patch)
tree7e0ea578cfcd1ce4cd7fd0504c96746204d87ca1 /llvm/lib/CodeGen/WinEHPrepare.cpp
parent525c013921e98a89ebcc0e3ee57300cd6d1a2963 (diff)
downloadbcm5719-llvm-c71d6275ca727a6d534dd5ee4602e315702e8054.tar.gz
bcm5719-llvm-c71d6275ca727a6d534dd5ee4602e315702e8054.zip
[WinEH] Fix ip2state table emission with funclets
Previously we were hijacking the old LandingPadInfo data structures to communicate our state numbers. Now we don't need that anymore. llvm-svn: 248763
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/WinEHPrepare.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index b062b1a29d3..7240159b083 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -34,6 +34,7 @@
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PatternMatch.h"
+#include "llvm/MC/MCSymbol.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -3499,3 +3500,12 @@ void WinEHPrepare::replaceUseWithLoad(Value *V, Use &U, AllocaInst *&SpillSlot,
U.set(Load);
}
}
+
+void WinEHFuncInfo::addIPToStateRange(const BasicBlock *PadBB,
+ MCSymbol *InvokeBegin,
+ MCSymbol *InvokeEnd) {
+ assert(PadBB->isEHPad() && EHPadStateMap.count(PadBB->getFirstNonPHI()) &&
+ "should get EH pad BB with precomputed state");
+ InvokeToStateMap[InvokeBegin] =
+ std::make_pair(EHPadStateMap[PadBB->getFirstNonPHI()], InvokeEnd);
+}
OpenPOWER on IntegriCloud