summaryrefslogtreecommitdiffstats
path: root/lld/COFF/Chunks.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-09-13 21:54:55 +0000
committerRui Ueyama <ruiu@google.com>2017-09-13 21:54:55 +0000
commitcfc2f80df6afac6d7d033a145911f2adebb22464 (patch)
tree44f0cf60d076af6c58c642b0cb6d0d9918678d73 /lld/COFF/Chunks.cpp
parent89af112cf590e76fbb1fd964086a3882b7f935f9 (diff)
downloadbcm5719-llvm-cfc2f80df6afac6d7d033a145911f2adebb22464.tar.gz
bcm5719-llvm-cfc2f80df6afac6d7d033a145911f2adebb22464.zip
Remove {get,set}Align accessor functions and use Alignment member variable instead.
llvm-svn: 313204
Diffstat (limited to 'lld/COFF/Chunks.cpp')
-rw-r--r--lld/COFF/Chunks.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index 43bb4d4c8f2..5b17ea9c3d1 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -36,7 +36,7 @@ SectionChunk::SectionChunk(ObjFile *F, const coff_section *H)
// Initialize SectionName.
File->getCOFFObj()->getSectionName(Header, SectionName);
- Align = Header->getAlignment();
+ Alignment = Header->getAlignment();
// Chunks may be discarded during comdat merging.
Discarded = false;
@@ -374,11 +374,7 @@ void SectionChunk::replace(SectionChunk *Other) {
CommonChunk::CommonChunk(const COFFSymbolRef S) : Sym(S) {
// Common symbols are aligned on natural boundaries up to 32 bytes.
// This is what MSVC link.exe does.
- Align = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue()));
-}
-
-void CommonChunk::setAlign(uint32_t NewAlign) {
- Align = std::max(Align, NewAlign);
+ Alignment = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue()));
}
uint32_t CommonChunk::getPermissions() const {
@@ -393,7 +389,7 @@ void StringChunk::writeTo(uint8_t *Buf) const {
ImportThunkChunkX64::ImportThunkChunkX64(Defined *S) : ImpSymbol(S) {
// Intel Optimization Manual says that all branch targets
// should be 16-byte aligned. MSVC linker does this too.
- Align = 16;
+ Alignment = 16;
}
void ImportThunkChunkX64::writeTo(uint8_t *Buf) const {
OpenPOWER on IntegriCloud