[compiler-rt] r359043 - The error message for mismatched value sites is very cryptic.

Dmitry Mikulin via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 15:26:55 PDT 2019


Author: dmikulin
Date: Tue Apr 23 15:26:55 2019
New Revision: 359043

URL: http://llvm.org/viewvc/llvm-project?rev=359043&view=rev
Log:
The error message for mismatched value sites is very cryptic.
Make it more readable for an average user.

Differential Revision: https://reviews.llvm.org/D60896

Modified:
    compiler-rt/trunk/lib/profile/InstrProfData.inc
    compiler-rt/trunk/lib/profile/InstrProfiling.h

Modified: compiler-rt/trunk/lib/profile/InstrProfData.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfData.inc?rev=359043&r1=359042&r2=359043&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfData.inc (original)
+++ compiler-rt/trunk/lib/profile/InstrProfData.inc Tue Apr 23 15:26:55 2019
@@ -169,7 +169,7 @@ VALUE_PROF_FUNC_PARAM(uint64_t, LargeVal
 
 /* VALUE_PROF_KIND start */
 #ifndef VALUE_PROF_KIND
-#define VALUE_PROF_KIND(Enumerator, Value)
+#define VALUE_PROF_KIND(Enumerator, Value, Descr)
 #else
 #define INSTR_PROF_DATA_DEFINED
 #endif
@@ -182,16 +182,16 @@ VALUE_PROF_FUNC_PARAM(uint64_t, LargeVal
  * For this remapping the ProfData is used.  ProfData contains both the function
  * name hash and the function address.
  */
-VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0)
+VALUE_PROF_KIND(IPVK_IndirectCallTarget, 0, "indirect call target")
 /* For memory intrinsic functions size profiling. */
-VALUE_PROF_KIND(IPVK_MemOPSize, 1)
+VALUE_PROF_KIND(IPVK_MemOPSize, 1, "memory intrinsic functions size")
 /* These two kinds must be the last to be
  * declared. This is to make sure the string
  * array created with the template can be
  * indexed with the kind value.
  */
-VALUE_PROF_KIND(IPVK_First, IPVK_IndirectCallTarget)
-VALUE_PROF_KIND(IPVK_Last, IPVK_MemOPSize)
+VALUE_PROF_KIND(IPVK_First, IPVK_IndirectCallTarget, "first")
+VALUE_PROF_KIND(IPVK_Last, IPVK_MemOPSize, "last")
 
 #undef VALUE_PROF_KIND
 /* VALUE_PROF_KIND end */

Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=359043&r1=359042&r2=359043&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfiling.h Tue Apr 23 15:26:55 2019
@@ -15,7 +15,7 @@
 #include "InstrProfData.inc"
 
 enum ValueKind {
-#define VALUE_PROF_KIND(Enumerator, Value) Enumerator = Value,
+#define VALUE_PROF_KIND(Enumerator, Value, Descr) Enumerator = Value,
 #include "InstrProfData.inc"
 };
 




More information about the llvm-commits mailing list