aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFWriter.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-01-29 06:23:44 +0000
committerDuncan Sands <baldrick@free.fr>2008-01-29 06:23:44 +0000
commitd102593b425da27fa96359300ff0e3d547d0ac8d (patch)
tree1e1c378b5a251371647bbaac306a9a2ea3873d21 /lib/CodeGen/ELFWriter.cpp
parenta34d8a0d83bb39f4058e5dea4558e69cc4eda37c (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/CodeGen/ELFWriter.cpp')
-rw-r--r--lib/CodeGen/ELFWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index 3074e31edd..908abe5f1b 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -257,7 +257,7 @@ void ELFWriter::EmitGlobal(GlobalVariable *GV) {
}
const Type *GVType = (const Type*)GV->getType();
- unsigned Align = TM.getTargetData()->getPrefTypeAlignment(GVType);
+ unsigned Align = TM.getTargetData()->getPreferredAlignment(GV);
unsigned Size = TM.getTargetData()->getABITypeSize(GVType);
// If this global has a zero initializer, it is part of the .bss or common