commit | c79099e0f44d0f85515fd30c83923d9d9dc1679b | [log] [tgz] |
---|---|---|
author | Guillaume Chatelet <gchatelet@google.com> | Thu Oct 03 13:00:29 2019 +0000 |
committer | Guillaume Chatelet <gchatelet@google.com> | Thu Oct 03 13:00:29 2019 +0000 |
tree | 05849b449c5e4af3baf0c4aa0dca897e64860400 | |
parent | f6551ddfceb676d2fb09e509ed39051c003927db [diff] [blame] |
[Alignment][Clang][NFC] Add CharUnits::getAsAlign Summary: This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`. 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: jholewinski, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68274 llvm-svn: 373592
diff --git a/clang/lib/CodeGen/ConstantInitBuilder.cpp b/clang/lib/CodeGen/ConstantInitBuilder.cpp index 40b1607..2d63d88 100644 --- a/clang/lib/CodeGen/ConstantInitBuilder.cpp +++ b/clang/lib/CodeGen/ConstantInitBuilder.cpp
@@ -79,7 +79,7 @@ /*insert before*/ nullptr, llvm::GlobalValue::NotThreadLocal, addressSpace); - GV->setAlignment(alignment.getQuantity()); + GV->setAlignment(alignment.getAsAlign()); resolveSelfReferences(GV); return GV; }