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 | 05837edae7295931e8d4317d317831275d469aeb (patch) | |
tree | 83d7542eb2c7c69392727c1e690cbc7f79947530 /llvm/lib/ExecutionEngine | |
parent | 48d37806e20a255df839656f8d314be23faaf18b (diff) | |
download | bcm5719-llvm-05837edae7295931e8d4317d317831275d469aeb.tar.gz bcm5719-llvm-05837edae7295931e8d4317d317831275d469aeb.zip |
Use getPreferredAlignmentLog or getPreferredAlignment
to get the alignment of global variables, rather than
using hand-made versions.
llvm-svn: 46495
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 8b7b972f6c1..70ee114b775 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/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 { |