diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-12-08 11:49:12 -0800 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-12-09 08:43:19 -0800 |
commit | 1172712f4629cabd606675a216fb2dbdc82ee910 (patch) | |
tree | fb67dcc3de7b82b942033c4194026cb241d10e0c /llvm/lib/IR/Globals.cpp | |
parent | 0ec5f1e64fb2c38519bdefc85c018ed4f0a8d7c1 (diff) | |
download | llvm-1172712f4629cabd606675a216fb2dbdc82ee910.zip llvm-1172712f4629cabd606675a216fb2dbdc82ee910.tar.gz llvm-1172712f4629cabd606675a216fb2dbdc82ee910.tar.bz2 |
[NFC] Replace some deprecated getAlignment() calls with getAlign()
Reviewed By: gchatelet
Differential Revision: https://reviews.llvm.org/D115370
Diffstat (limited to 'llvm/lib/IR/Globals.cpp')
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp index 9f38288..b6bd25a 100644 --- a/llvm/lib/IR/Globals.cpp +++ b/llvm/lib/IR/Globals.cpp @@ -126,7 +126,7 @@ void GlobalObject::setAlignment(MaybeAlign Align) { void GlobalObject::copyAttributesFrom(const GlobalObject *Src) { GlobalValue::copyAttributesFrom(Src); - setAlignment(MaybeAlign(Src->getAlignment())); + setAlignment(Src->getAlign()); setSection(Src->getSection()); } @@ -249,7 +249,7 @@ bool GlobalObject::canIncreaseAlignment() const { // alignment specified. (If it is assigned a section, the global // could be densely packed with other objects in the section, and // increasing the alignment could cause padding issues.) - if (hasSection() && getAlignment() > 0) + if (hasSection() && getAlign().hasValue()) return false; // On ELF platforms, we're further restricted in that we can't |