diff --git a/include/llvm/ProfileData/InstrProf.h b/include/llvm/ProfileData/InstrProf.h index 49780e4abab..668e6d3663d 100644 --- a/include/llvm/ProfileData/InstrProf.h +++ b/include/llvm/ProfileData/InstrProf.h @@ -127,7 +127,8 @@ struct InstrProfRecord { std::vector & getValueSitesForKind(uint32_t ValueKind) { return const_cast &>( - this->getValueSitesForKind(ValueKind)); + const_cast(this) + ->getValueSitesForKind(ValueKind)); } };