diff options
author | Kazu Hirata <kazu@google.com> | 2025-09-25 08:51:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-25 08:51:47 -0700 |
commit | 0fd341c20b890b05f9588b7da61731561d3ef72a (patch) | |
tree | 1b39dc3d2d4c15b3e2cab020763273ccfc2c005e /llvm/unittests/Support/CommandLineTest.cpp | |
parent | fddb8fe5f2be4f31c643ee6ff6f017b01465b21d (diff) | |
download | llvm-0fd341c20b890b05f9588b7da61731561d3ef72a.zip llvm-0fd341c20b890b05f9588b7da61731561d3ef72a.tar.gz llvm-0fd341c20b890b05f9588b7da61731561d3ef72a.tar.bz2 |
[Support] Clean up Align (#160644)
This patch cleans up the constructors and operator= of Align.
- "constexpr Align(LogValue CA)" is a really strange "public:"
constructor. It can only be constructed with a private struct
LogValue, which wraps the log2 of an alignment. Since nobody uses
it outside the class anyway, this patch moves the constructor to
"private:" while switching to a tag-based parameter list. In turn,
this patch removes LogValue.
- The block of comment being deleted is no longer applicable, so this
patch marks operator= constexpr. To test operator= in a unit test,
this patch makes value() constexpr also. Refer to the unit test to
see how operator= and value() are put together.
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
0 files changed, 0 insertions, 0 deletions