diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-20 23:39:44 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2008-04-20 23:39:44 +0000 |
commit | 580631a73a71ff621c71618b16e9644b30a9d3c9 (patch) | |
tree | 155c26c3e7a344745abeb057bfd8ae5e14b67859 /lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp | |
parent | 546e36a2c17f9eb7b2b1f2f19e522673153948aa (diff) | |
download | external_llvm-580631a73a71ff621c71618b16e9644b30a9d3c9.zip external_llvm-580631a73a71ff621c71618b16e9644b30a9d3c9.tar.gz external_llvm-580631a73a71ff621c71618b16e9644b30a9d3c9.tar.bz2 |
Be pessimistic in computing the buffer size when aligning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp index b5a0737..b73b0bd 100644 --- a/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp @@ -664,7 +664,8 @@ unsigned JITDwarfEmitter::GetDwarfTableSizeInBytes(MachineFunction& F, /// the new value. static unsigned RoundUpToAlign(unsigned FinalSize, unsigned Alignment) { if (Alignment == 0) Alignment = 1; - return (FinalSize + Alignment - 1) & ~(Alignment - 1); + // Since we do not know where the buffer will be allocated, be pessimistic. + return FinalSize + Alignment; } unsigned |