diff options
author | Jolanta Jensen <jolanta.jensen@arm.com> | 2022-06-15 17:11:28 +0100 |
---|---|---|
committer | Jolanta Jensen <jolanta.jensen@arm.com> | 2022-06-29 11:02:02 +0100 |
commit | 32aac7babfdd2a7e6d40cb186d676bef93bfc6bb (patch) | |
tree | 3464472112fe1020eba1261555e06c8f4b97dc7d /clang/lib/Basic | |
parent | 0af53fcb99edb4c90ef42f1d173e382029ca96ee (diff) | |
download | llvm-32aac7babfdd2a7e6d40cb186d676bef93bfc6bb.zip llvm-32aac7babfdd2a7e6d40cb186d676bef93bfc6bb.tar.gz llvm-32aac7babfdd2a7e6d40cb186d676bef93bfc6bb.tar.bz2 |
[NFC] Switch FloatModeKind enum class to use bitmask enums
Using bitmask enums simplifies and clarifies the code.
Differential Revision: https://reviews.llvm.org/D128182
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets/X86.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index 007d5c2..78e444f 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -14,6 +14,7 @@ #define LLVM_CLANG_LIB_BASIC_TARGETS_X86_H #include "OSTargets.h" +#include "clang/Basic/BitmaskEnum.h" #include "clang/Basic/TargetInfo.h" #include "clang/Basic/TargetOptions.h" #include "llvm/ADT/Triple.h" @@ -419,8 +420,8 @@ public: // Use fpret for all types. RealTypeUsesObjCFPRetMask = - ((1 << (int)FloatModeKind::Float) | (1 << (int)FloatModeKind::Double) | - (1 << (int)FloatModeKind::LongDouble)); + (int)(FloatModeKind::Float | FloatModeKind::Double | + FloatModeKind::LongDouble); // x86-32 has atomics up to 8 bytes MaxAtomicPromoteWidth = 64; @@ -699,7 +700,7 @@ public: "64-i64:64-f80:128-n8:16:32:64-S128"); // Use fpret only for long double. - RealTypeUsesObjCFPRetMask = (1 << (int)FloatModeKind::LongDouble); + RealTypeUsesObjCFPRetMask = (int)FloatModeKind::LongDouble; // Use fp2ret for _Complex long double. ComplexLongDoubleUsesFP2Ret = true; |