[llvm] r248859 - InstrProf: Add a missing const_cast from r248833

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 16:42:47 PDT 2015


Author: bogner
Date: Tue Sep 29 18:42:47 2015
New Revision: 248859

URL: http://llvm.org/viewvc/llvm-project?rev=248859&view=rev
Log:
InstrProf: Add a missing const_cast from r248833

Modified:
    llvm/trunk/include/llvm/ProfileData/InstrProf.h

Modified: llvm/trunk/include/llvm/ProfileData/InstrProf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProf.h?rev=248859&r1=248858&r2=248859&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProf.h (original)
+++ llvm/trunk/include/llvm/ProfileData/InstrProf.h Tue Sep 29 18:42:47 2015
@@ -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));
   }
 };
 




More information about the llvm-commits mailing list