Make eh_frame objects by 8-byte aligned on 64-bit
targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50451 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 3a3a04d..74df790 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -2876,7 +2876,8 @@
RI->getInitialFrameState(Moves);
EmitFrameMoves(NULL, 0, Moves, true);
- Asm->EmitAlignment(2, 0, 0, false);
+ Asm->EmitAlignment(TD->getPointerSize() == sizeof(int32_t) ? 2 : 3,
+ 0, 0, false);
EmitLabel("eh_frame_common_end", Index);
Asm->EOL();
@@ -2965,7 +2966,8 @@
// frame.
EmitFrameMoves("eh_func_begin", EHFrameInfo.Number, EHFrameInfo.Moves, true);
- Asm->EmitAlignment(2, 0, 0, false);
+ Asm->EmitAlignment(TD->getPointerSize() == sizeof(int32_t) ? 2 : 3,
+ 0, 0, false);
EmitLabel("eh_frame_end", EHFrameInfo.Number);
// If the function is marked used, this table should be also. We cannot