summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-09-30 09:37:05 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-09-30 09:37:05 +0000
commit17380227e830a7a3fc2adafc2226e4c579b919ef (patch)
tree1d9a05494cdeebf5a356dfaf037ef6da909da8cc /llvm/lib/IR/Instructions.cpp
parent5a039d55710f72a474572f08f390e17d8cd37e57 (diff)
downloadbcm5719-llvm-17380227e830a7a3fc2adafc2226e4c579b919ef.tar.gz
bcm5719-llvm-17380227e830a7a3fc2adafc2226e4c579b919ef.zip
[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 llvm-svn: 373195
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index f8eec2e805e..f48bf80cd58 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -1321,7 +1321,7 @@ LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
: UnaryInstruction(Ty, Load, Ptr, InsertBef) {
assert(Ty == cast<PointerType>(Ptr->getType())->getElementType());
setVolatile(isVolatile);
- setAlignment(Align);
+ setAlignment(MaybeAlign(Align));
setAtomic(Order, SSID);
AssertOK();
setName(Name);
@@ -1333,16 +1333,12 @@ LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
: UnaryInstruction(Ty, Load, Ptr, InsertAE) {
assert(Ty == cast<PointerType>(Ptr->getType())->getElementType());
setVolatile(isVolatile);
- setAlignment(Align);
+ setAlignment(MaybeAlign(Align));
setAtomic(Order, SSID);
AssertOK();
setName(Name);
}
-void LoadInst::setAlignment(unsigned Align) {
- setAlignment(llvm::MaybeAlign(Align));
-}
-
void LoadInst::setAlignment(MaybeAlign Align) {
assert((!Align || *Align <= MaximumAlignment) &&
"Alignment is greater than MaximumAlignment!");
OpenPOWER on IntegriCloud