aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-04-30 00:43:29 +0000
committerDale Johannesen <dalej@apple.com>2008-04-30 00:43:29 +0000
commit21d972ad046f93669657eb7efb89ad2d0fe05ef8 (patch)
tree01a4d0835288a72ff9a5030d68ff9dfba902e3d4 /lib/CodeGen/DwarfWriter.cpp
parent203b2d6eed0f35fc8492c78ed2ae1afa854bfbf1 (diff)
Add comments for previous patch as requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/DwarfWriter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 74df79002f..9e806fadcd 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -2876,6 +2876,9 @@ private:
RI->getInitialFrameState(Moves);
EmitFrameMoves(NULL, 0, Moves, true);
+ // On Darwin the linker honors the alignment of eh_frame, which means it
+ // must be 8-byte on 64-bit targets to match what gcc does. Otherwise
+ // you get holes which confuse readers of eh_frame.
Asm->EmitAlignment(TD->getPointerSize() == sizeof(int32_t) ? 2 : 3,
0, 0, false);
EmitLabel("eh_frame_common_end", Index);
@@ -2966,6 +2969,9 @@ private:
// frame.
EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves, true);
+ // On Darwin the linker honors the alignment of eh_frame, which means it
+ // must be 8-byte on 64-bit targets to match what gcc does. Otherwise
+ // you get holes which confuse readers of eh_frame.
Asm->EmitAlignment(TD->getPointerSize() == sizeof(int32_t) ? 2 : 3,
0, 0, false);
EmitLabel("eh_frame_end", EHFrameInfo.Number);