diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-08-25 01:05:08 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-08-25 01:05:08 +0000 |
commit | 3772549656081dbf7e9b228071cf041f4bad9dbc (patch) | |
tree | ba249c615ac614f7d2b40ef46ac022fd0ba5dbd2 /lib/Analysis/CFLAndersAliasAnalysis.cpp | |
parent | 3d7ca1cde60ee632bccdb2b9d792a1725cfc450c (diff) |
Make some LLVM_CONSTEXPR variables const. NFC.
This patch changes LLVM_CONSTEXPR variable declarations to const
variable declarations, since LLVM_CONSTEXPR expands to nothing if the
current compiler doesn't support constexpr. In all of the changed
cases, it looks like the code intended the variable to be const instead
of sometimes-constexpr sometimes-not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFLAndersAliasAnalysis.cpp')
-rw-r--r-- | lib/Analysis/CFLAndersAliasAnalysis.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/CFLAndersAliasAnalysis.cpp b/lib/Analysis/CFLAndersAliasAnalysis.cpp index d85121283cc..b33938889de 100644 --- a/lib/Analysis/CFLAndersAliasAnalysis.cpp +++ b/lib/Analysis/CFLAndersAliasAnalysis.cpp @@ -107,12 +107,10 @@ enum class MatchState : uint8_t { }; typedef std::bitset<7> StateSet; -// N.B. These are unsigned instead of StateSets because some MSVC versions -// apparently lack constexpr bitset ctors. -LLVM_CONSTEXPR unsigned ReadOnlyStateMask = +const unsigned ReadOnlyStateMask = (1U << static_cast<uint8_t>(MatchState::FlowFromReadOnly)) | (1U << static_cast<uint8_t>(MatchState::FlowFromMemAliasReadOnly)); -LLVM_CONSTEXPR unsigned WriteOnlyStateMask = +const unsigned WriteOnlyStateMask = (1U << static_cast<uint8_t>(MatchState::FlowToWriteOnly)) | (1U << static_cast<uint8_t>(MatchState::FlowToMemAliasWriteOnly)); |