[PGO] Add return code for vp rt record init routine to indicate error condition
[oota-llvm.git] / include / llvm / ProfileData / InstrProf.h
index 8fd3d7f8ffd67116746a69fff3a68a806c3de1ed..b4e2206b00a1b86a8303a3ebd7242713e915f60c 100644 (file)
@@ -583,10 +583,13 @@ typedef struct ValueProfRuntimeRecord {
   ValueProfNode **NodesKind[IPVK_Last + 1];
 } ValueProfRuntimeRecord;
 
-/* Initialize the record for runtime value profile data.  */
-void initializeValueProfRuntimeRecord(ValueProfRuntimeRecord *RuntimeRecord,
-                                      uint16_t *NumValueSites,
-                                      ValueProfNode **Nodes);
+/* Initialize the record for runtime value profile data. 
+ * Return 0 if the initialization is successful, otherwise
+ * return 1.
+ */
+int initializeValueProfRuntimeRecord(ValueProfRuntimeRecord *RuntimeRecord,
+                                     uint16_t *NumValueSites,
+                                     ValueProfNode **Nodes);
 
 /* Release memory allocated for the runtime record.  */
 void finalizeValueProfRuntimeRecord(ValueProfRuntimeRecord *RuntimeRecord);