diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2019-10-22 12:35:55 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2019-10-22 12:35:55 +0000 |
commit | 734c74ba14be0f4421ccd9f720e5b9309248e0f7 (patch) | |
tree | 98a54292834e3de2554bf60f2a0ec7eddcc5e1f7 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | f2c8f3b181e1a0f1a45e6893d15317386bf73977 (diff) | |
download | llvm-734c74ba14be0f4421ccd9f720e5b9309248e0f7.zip llvm-734c74ba14be0f4421ccd9f720e5b9309248e0f7.tar.gz llvm-734c74ba14be0f4421ccd9f720e5b9309248e0f7.tar.bz2 |
[Alignment][NFC] Convert LoadInst 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/D69302
llvm-svn: 375498
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9caeba5..518a03c 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4792,8 +4792,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { MaybeAlign Align; if (Error Err = parseAlignmentValue(Record[OpNum], Align)) return Err; - I = new LoadInst(Ty, Op, "", Record[OpNum + 1], - Align ? Align->value() : 0); + I = new LoadInst(Ty, Op, "", Record[OpNum + 1], Align); InstructionList.push_back(I); break; } @@ -4830,8 +4829,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { MaybeAlign Align; if (Error Err = parseAlignmentValue(Record[OpNum], Align)) return Err; - I = new LoadInst(Ty, Op, "", Record[OpNum + 1], - Align ? Align->value() : 0, Ordering, SSID); + I = new LoadInst(Ty, Op, "", Record[OpNum + 1], Align, Ordering, SSID); InstructionList.push_back(I); break; } |