summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-03-17 16:55:18 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-03-17 16:55:18 +0000
commit511391feaa67ed28f5c244acdbdd547ae7e379cc (patch)
tree213437bb3af5b6528d36cac2d2259c4e47c9e461 /llvm/lib/Object/COFFObjectFile.cpp
parent62fed0c354ad3c0ad5cd5dc87ed1b4ac77a2e119 (diff)
downloadbcm5719-llvm-511391feaa67ed28f5c244acdbdd547ae7e379cc.tar.gz
bcm5719-llvm-511391feaa67ed28f5c244acdbdd547ae7e379cc.zip
[COFF] Refactor section alignment calculation
Section alignment isn't completely trivial, let it live in one place so that we may reuse it in LLVM. llvm-svn: 263722
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 4cd6aff5f17..25145471382 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -290,7 +290,7 @@ std::error_code COFFObjectFile::getSectionContents(DataRefImpl Ref,
uint64_t COFFObjectFile::getSectionAlignment(DataRefImpl Ref) const {
const coff_section *Sec = toSec(Ref);
- return uint64_t(1) << (((Sec->Characteristics & 0x00F00000) >> 20) - 1);
+ return Sec->getAlignment();
}
bool COFFObjectFile::isSectionText(DataRefImpl Ref) const {
OpenPOWER on IntegriCloud