Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Merge 80414 from mainline.
Browse files Browse the repository at this point in the history
Make the augmentation size and next set of bytes agree on size,
and make the reference pointer size as it should be.

Fixes an abort on a testcase derived from libunwind's personality
test in 64-bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@81701 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tlattner committed Sep 13, 2009
1 parent 85160b9 commit 99a127c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/CodeGen/AsmPrinter/DwarfException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,19 @@ void DwarfException::EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) {
// If there is a personality and landing pads then point to the language
// specific data area in the exception table.
if (EHFrameInfo.PersonalityIndex) {
Asm->EmitULEB128Bytes(4);
bool is4Byte = TD->getPointerSize() == sizeof(int32_t);

Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
Asm->EOL("Augmentation size");

if (EHFrameInfo.hasLandingPads)
EmitReference("exception", EHFrameInfo.Number, true, true);
else
Asm->EmitInt32((int)0);
EmitReference("exception", EHFrameInfo.Number, true, false);
else {
if (is4Byte)
Asm->EmitInt32((int)0);
else
Asm->EmitInt64((int)0);
}
Asm->EOL("Language Specific Data Area");
} else {
Asm->EmitULEB128Bytes(0);
Expand Down

0 comments on commit 99a127c

Please sign in to comment.