aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfException.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-12-14 21:49:44 +0000
committerBill Wendling <isanbard@gmail.com>2009-12-14 21:49:44 +0000
commitf8084fb1e1da226d73f69c8b30179951ca7d80a9 (patch)
tree12ed7b813ba5bfa3522db2940ca795ebdb993235 /lib/CodeGen/AsmPrinter/DwarfException.cpp
parent80dd125e173e059783afef782df2ab895c643da5 (diff)
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 1c8b8f4647..3fd077f687 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -292,14 +292,13 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
Asm->EOL("Augmentation size");
+ // We force 32-bits here because we've encoded our LSDA in the CIE with
+ // `dwarf::DW_EH_PE_sdata4'. And the CIE and FDE should agree.
if (EHFrameInfo.hasLandingPads)
- EmitReference("exception", EHFrameInfo.Number, true, false);
- else {
- if (is4Byte)
- Asm->EmitInt32((int)0);
- else
- Asm->EmitInt64((int)0);
- }
+ EmitReference("exception", EHFrameInfo.Number, true, true);
+ else
+ Asm->EmitInt32((int)0);
+
Asm->EOL("Language Specific Data Area");
} else {
Asm->EmitULEB128Bytes(0);