diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-01 23:04:27 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-01 23:04:27 +0000 |
commit | 36a16015ac108e2f0dd2d6d96a6d364bc74c50d7 (patch) | |
tree | 32f8e302aea0fbe6b07b367e256e4f2e01bc19a4 /tools | |
parent | 7df496d2ad1ecbc86d454a5cea2ae3e0928197ee (diff) | |
download | external_llvm-36a16015ac108e2f0dd2d6d96a6d364bc74c50d7.zip external_llvm-36a16015ac108e2f0dd2d6d96a6d364bc74c50d7.tar.gz external_llvm-36a16015ac108e2f0dd2d6d96a6d364bc74c50d7.tar.bz2 |
Don't drop alignment info on local common symbols.
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm
Based on a patch by NAKAMURA Takumi.
Fixes PR9337, PR9483 and PR10128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 7c94891..f6dc7d9 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -581,7 +581,8 @@ namespace { markDefined(*Symbol); } virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {} - virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) {} + virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, + unsigned ByteAlignment) {} virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) {} virtual void EmitBytes(StringRef Data, unsigned AddrSpace) {} |