aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/AsmPrinter.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-06-04 08:21:45 +0000
committerDuncan Sands <baldrick@free.fr>2008-06-04 08:21:45 +0000
commit4afc575cd530a9933527a42e781aacf15481f691 (patch)
tree9446c7971f43aab4e303542a8a31e9497017d24d /include/llvm/CodeGen/AsmPrinter.h
parent52aa68641a00e3ba7d46dbd32cc9f5ef50cca9f0 (diff)
downloadexternal_llvm-4afc575cd530a9933527a42e781aacf15481f691.zip
external_llvm-4afc575cd530a9933527a42e781aacf15481f691.tar.gz
external_llvm-4afc575cd530a9933527a42e781aacf15481f691.tar.bz2
Change packed struct layout so that field sizes
are the same as in unpacked structs, only field positions differ. This only matters for structs containing x86 long double or an apint; it may cause backwards compatibility problems if someone has bitcode containing a packed struct with a field of one of those types. The issue is that only 10 bytes are needed to hold an x86 long double: the store size is 10 bytes, but the ABI size is 12 or 16 bytes (linux/ darwin) which comes from rounding the store size up by the alignment. Because it seemed silly not to pack an x86 long double into 10 bytes in a packed struct, this is what was done. I now think this was a mistake. Reserving the ABI size for an x86 long double field even in a packed struct makes things more uniform: the ABI size is now always used when reserving space for a type. This means that developers are less likely to make mistakes. It also makes life easier for the CBE which otherwise could not represent all LLVM packed structs (PR2402). Front-end people might need to adjust the way they create LLVM structs - see following change to llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51928 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/AsmPrinter.h')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index dd42ce1..e92c8a8 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -314,8 +314,7 @@ namespace llvm {
void EmitConstantValueOnly(const Constant *CV);
/// EmitGlobalConstant - Print a general LLVM constant to the .s file.
- /// If Packed is false, pad to the ABI size.
- void EmitGlobalConstant(const Constant* CV, bool Packed = false);
+ void EmitGlobalConstant(const Constant* CV);
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);