r373195 - [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

Guillaume Chatelet via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 02:37:05 PDT 2019


Author: gchatelet
Date: Mon Sep 30 02:37:05 2019
New Revision: 373195

URL: http://llvm.org/viewvc/llvm-project?rev=373195&view=rev
Log:
[Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

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, jdoerfert

Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

Modified:
    cfe/trunk/lib/CodeGen/CGCleanup.cpp

Modified: cfe/trunk/lib/CodeGen/CGCleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.cpp?rev=373195&r1=373194&r2=373195&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCleanup.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCleanup.cpp Mon Sep 30 02:37:05 2019
@@ -310,7 +310,7 @@ static void createStoreInstBefore(llvm::
 static llvm::LoadInst *createLoadInstBefore(Address addr, const Twine &name,
                                             llvm::Instruction *beforeInst) {
   auto load = new llvm::LoadInst(addr.getPointer(), name, beforeInst);
-  load->setAlignment(addr.getAlignment().getQuantity());
+  load->setAlignment(llvm::MaybeAlign(addr.getAlignment().getQuantity()));
   return load;
 }
 




More information about the cfe-commits mailing list