InstrProf: Add a missing const_cast from r248833
authorJustin Bogner <mail@justinbogner.com>
Tue, 29 Sep 2015 23:42:47 +0000 (23:42 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 29 Sep 2015 23:42:47 +0000 (23:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248859 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ProfileData/InstrProf.h

index 49780e4abab631a23bc5fc16c9b8184280c7cf77..668e6d3663d23358d4d4ffb9e44b6a5a86619781 100644 (file)
@@ -127,7 +127,8 @@ struct InstrProfRecord {
   std::vector<InstrProfValueSiteRecord> &
   getValueSitesForKind(uint32_t ValueKind) {
     return const_cast<std::vector<InstrProfValueSiteRecord> &>(
-        this->getValueSitesForKind(ValueKind));
+        const_cast<const InstrProfRecord *>(this)
+            ->getValueSitesForKind(ValueKind));
   }
 };