NFC in preparation of D60740.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 30594 Build 30593: arc lint + arc unit
Event Timeline
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 | I believe that both Inc and UpperBound must be of the same type as Cost (i.e. int) but the parameters of std::max() should be extended. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 | Agree. An explicit cast to a wider type is more clear. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 | int64_t came from cost calculations in CallAnalyzer::visitSwitchInst, which specifically uses uint64_t in many places, both for increment and upper bound. The only check that I should add here is an assert on UpperBound being positive and not exceeding INT_MAX. |
I believe that both Inc and UpperBound must be of the same type as Cost (i.e. int) but the parameters of std::max() should be extended.