aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-05 00:04:43 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-05 00:04:43 +0000
commitca0ed744852a7d9625572fbb793f65e81225a3e8 (patch)
treededf204008d224f4537fd9262cacd8b640ab4d35 /include/llvm
parent83430bce1d21c8095438ed591cb9c72b5c666a07 (diff)
downloadexternal_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.zip
external_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.tar.gz
external_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.tar.bz2
Eliminate the remaining uses of getTypeSize. This
should only effect x86 when using long double. Now 12/16 bytes are output for long double globals (the exact amount depends on the alignment). This brings globals in line with the rest of LLVM: the space reserved for an object is now always the ABI size. One tricky point is that only 10 bytes should be output for long double if it is a field in a packed struct, which is the reason for the additional argument to EmitGlobalConstant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h4
-rw-r--r--include/llvm/Target/TargetData.h8
2 files changed, 2 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 0ca7cfc..607aa70 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -286,8 +286,8 @@ namespace llvm {
void EmitConstantValueOnly(const Constant *CV);
/// EmitGlobalConstant - Print a general LLVM constant to the .s file.
- ///
- void EmitGlobalConstant(const Constant* CV);
+ /// If Packed is false, pad to the ABI size.
+ void EmitGlobalConstant(const Constant* CV, bool Packed = false);
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);
diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h
index cf6b5e7..3136a38 100644
--- a/include/llvm/Target/TargetData.h
+++ b/include/llvm/Target/TargetData.h
@@ -190,14 +190,6 @@ public:
return 8*getABITypeSize(Ty);
}
- /// getTypeSize - Obsolete method, do not use. Replaced by getTypeStoreSize
- /// and getABITypeSize. For alias analysis of loads and stores you probably
- /// want getTypeStoreSize. Use getABITypeSize for GEP computations and alloca
- /// sizing.
- uint64_t getTypeSize(const Type *Ty) const {
- return getTypeStoreSize(Ty);
- }
-
/// getABITypeAlignment - Return the minimum ABI-required alignment for the
/// specified type.
unsigned char getABITypeAlignment(const Type *Ty) const;