diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-29 06:23:44 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-29 06:23:44 +0000 |
commit | d102593b425da27fa96359300ff0e3d547d0ac8d (patch) | |
tree | 1e1c378b5a251371647bbaac306a9a2ea3873d21 /lib/ExecutionEngine/JIT/JIT.cpp | |
parent | a34d8a0d83bb39f4058e5dea4558e69cc4eda37c (diff) |
Use getPreferredAlignmentLog or getPreferredAlignment
to get the alignment of global variables, rather than
using hand-made versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 8b7b972f6c..70ee114b77 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -355,7 +355,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { // compilation. const Type *GlobalType = GV->getType()->getElementType(); size_t S = getTargetData()->getABITypeSize(GlobalType); - size_t A = getTargetData()->getPrefTypeAlignment(GlobalType); + size_t A = getTargetData()->getPreferredAlignment(GV); if (A <= 8) { Ptr = malloc(S); } else { |