aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-10-22 12:55:32 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-10-22 12:55:32 +0000
commit5b99c189b3bfc0faa157f7ca39652c0bb8c315a7 (patch)
treec472f1ad52dde8acd5a12aa97494433c340bb02e /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent734c74ba14be0f4421ccd9f720e5b9309248e0f7 (diff)
downloadllvm-5b99c189b3bfc0faa157f7ca39652c0bb8c315a7.zip
llvm-5b99c189b3bfc0faa157f7ca39652c0bb8c315a7.tar.gz
llvm-5b99c189b3bfc0faa157f7ca39652c0bb8c315a7.tar.bz2
[Alignment][NFC] Convert StoreInst to MaybeAlign
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, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69303 llvm-svn: 375499
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 518a03c..15eead1 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4851,8 +4851,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
MaybeAlign Align;
if (Error Err = parseAlignmentValue(Record[OpNum], Align))
return Err;
- I = new StoreInst(Val, Ptr, Record[OpNum + 1],
- Align ? Align->value() : 0);
+ I = new StoreInst(Val, Ptr, Record[OpNum + 1], Align);
InstructionList.push_back(I);
break;
}
@@ -4885,8 +4884,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
MaybeAlign Align;
if (Error Err = parseAlignmentValue(Record[OpNum], Align))
return Err;
- I = new StoreInst(Val, Ptr, Record[OpNum + 1], Align ? Align->value() : 0,
- Ordering, SSID);
+ I = new StoreInst(Val, Ptr, Record[OpNum + 1], Align, Ordering, SSID);
InstructionList.push_back(I);
break;
}