summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Chunks.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-05-14 18:36:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-05-14 18:36:51 +0000
commit62f7af712c0043e8bdb83e6c91bde43a11aab210 (patch)
tree6de4ea4d7351400256878966d43f2b3fab344234 /lld/COFF/Chunks.cpp
parent1b64a12654295accffcb622e3b7d905d07ffe7ae (diff)
downloadbcm5719-llvm-62f7af712c0043e8bdb83e6c91bde43a11aab210.tar.gz
bcm5719-llvm-62f7af712c0043e8bdb83e6c91bde43a11aab210.zip
COFF: Allow ICFing sections with different alignments.
The combined section gets the maximum alignment of all sections. Differential Revision: https://reviews.llvm.org/D46786 llvm-svn: 332273
Diffstat (limited to 'lld/COFF/Chunks.cpp')
-rw-r--r--lld/COFF/Chunks.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index 5f673f8f3eb..ab6160cb702 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -438,6 +438,7 @@ ArrayRef<uint8_t> SectionChunk::getContents() const {
}
void SectionChunk::replace(SectionChunk *Other) {
+ Alignment = std::max(Alignment, Other->Alignment);
Other->Repl = Repl;
Other->Live = false;
}
OpenPOWER on IntegriCloud