mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
correct const-ness with auto and dyn_cast
1. Use const with autos. 2. Don't bother with explicit const in cast ops because they do it automagically. Thanks, David B. / Aaron B. / Reid K. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219817 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c15862fd3
commit
ddcfe81459
@ -710,15 +710,15 @@ static void WriteModuleInfo(const Module *M, const ValueEnumerator &VE,
|
||||
static uint64_t GetOptimizationFlags(const Value *V) {
|
||||
uint64_t Flags = 0;
|
||||
|
||||
if (auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) {
|
||||
if (const auto *OBO = dyn_cast<OverflowingBinaryOperator>(V)) {
|
||||
if (OBO->hasNoSignedWrap())
|
||||
Flags |= 1 << bitc::OBO_NO_SIGNED_WRAP;
|
||||
if (OBO->hasNoUnsignedWrap())
|
||||
Flags |= 1 << bitc::OBO_NO_UNSIGNED_WRAP;
|
||||
} else if (auto *PEO = dyn_cast<PossiblyExactOperator>(V)) {
|
||||
} else if (const auto *PEO = dyn_cast<PossiblyExactOperator>(V)) {
|
||||
if (PEO->isExact())
|
||||
Flags |= 1 << bitc::PEO_EXACT;
|
||||
} else if (auto *FPMO = dyn_cast<const FPMathOperator>(V)) {
|
||||
} else if (const auto *FPMO = dyn_cast<FPMathOperator>(V)) {
|
||||
if (FPMO->hasUnsafeAlgebra())
|
||||
Flags |= FastMathFlags::UnsafeAlgebra;
|
||||
if (FPMO->hasNoNaNs())
|
||||
|
Loading…
Reference in New Issue
Block a user