aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-29 21:19:44 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-29 21:19:44 +0000
commit409914b773ffd53d53d214394d5636a76f673186 (patch)
tree63a630350e9a42510878c60c6a8a31fb4ef3d684
parentcb778a8634454c70d88955b3732f330a6cbe5b07 (diff)
downloadexternal_llvm-409914b773ffd53d53d214394d5636a76f673186.zip
external_llvm-409914b773ffd53d53d214394d5636a76f673186.tar.gz
external_llvm-409914b773ffd53d53d214394d5636a76f673186.tar.bz2
Forgot to output the base offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77505 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 67f0e07..49512a3 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -269,8 +269,6 @@ unsigned DwarfException::
ComputeActionsTable(const SmallVectorImpl<const LandingPadInfo*> &LandingPads,
SmallVectorImpl<ActionEntry> &Actions,
SmallVectorImpl<unsigned> &FirstActions) {
- const std::vector<unsigned> &FilterIds = MMI->getFilterIds();
-
// Negative type IDs index into FilterIds. Positive type IDs index into
// TypeInfos. The value written for a positive type ID is just the type ID
// itself. For a negative type ID, however, the value written is the
@@ -281,11 +279,14 @@ ComputeActionsTable(const SmallVectorImpl<const LandingPadInfo*> &LandingPads,
// of complication does not occur for positive type IDs because type infos are
// output using a fixed width encoding. FilterOffsets[i] holds the byte
// offset corresponding to FilterIds[i].
+
+ const std::vector<unsigned> &FilterIds = MMI->getFilterIds();
SmallVector<int, 16> FilterOffsets;
FilterOffsets.reserve(FilterIds.size());
int Offset = -1;
- for(std::vector<unsigned>::const_iterator
- I = FilterIds.begin(), E = FilterIds.end(); I != E; ++I) {
+
+ for (std::vector<unsigned>::const_iterator
+ I = FilterIds.begin(), E = FilterIds.end(); I != E; ++I) {
FilterOffsets.push_back(Offset);
Offset -= TargetAsmInfo::getULEB128Size(*I);
}
@@ -295,6 +296,7 @@ ComputeActionsTable(const SmallVectorImpl<const LandingPadInfo*> &LandingPads,
int FirstAction = 0;
unsigned SizeActions = 0;
const LandingPadInfo *PrevLPI = 0;
+
for (SmallVectorImpl<const LandingPadInfo *>::const_iterator
I = LandingPads.begin(), E = LandingPads.end(); I != E; ++I) {
const LandingPadInfo *LPI = *I;
@@ -568,6 +570,8 @@ void DwarfException::EmitExceptionTable() {
#else
Asm->EmitInt8(dwarf::DW_EH_PE_absptr);
Asm->EOL("TType format (DW_EH_PE_absptr)");
+ Asm->EmitULEB128Bytes(TypeOffset);
+ Asm->EOL("TType base offset");
#endif
Asm->EmitInt8(dwarf::DW_EH_PE_udata4);