]> granicus.if.org Git - llvm/commitdiff
[Alignment][NFC] Align(1) to Align::None() conversions
authorGuillaume Chatelet <gchatelet@google.com>
Wed, 18 Sep 2019 16:19:40 +0000 (16:19 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Wed, 18 Sep 2019 16:19:40 +0000 (16:19 +0000)
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67715

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372234 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MIRPrinter.cpp
lib/CodeGen/MachineBasicBlock.cpp

index 6c9712b63ff32a9aba0d1b24cfed8a0b1e45d5f2..8f7866313bc0ebaa6604d0899f68d5cc3c844264 100644 (file)
@@ -629,7 +629,7 @@ void MIPrinter::print(const MachineBasicBlock &MBB) {
     OS << "landing-pad";
     HasAttributes = true;
   }
-  if (MBB.getAlignment() > 1) {
+  if (MBB.getAlignment() != llvm::Align::None()) {
     OS << (HasAttributes ? ", " : " (");
     OS << "align " << MBB.getAlignment().value();
     HasAttributes = true;
index 24927b266c8baaa1ba2dd517ea145d4023edb1a9..6e06107f2e3f1e71d0943214b49e601ebe2192db 100644 (file)
@@ -326,7 +326,7 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST,
     OS << "landing-pad";
     HasAttributes = true;
   }
-  if (getAlignment() > 1) {
+  if (getAlignment() != llvm::Align::None()) {
     OS << (HasAttributes ? ", " : " (");
     OS << "align " << Log2(getAlignment());
     HasAttributes = true;