[PGO] Add return code for vp rt record init routine to indicate error condition
[oota-llvm.git] / include / llvm / ProfileData / InstrProf.h
index 8fd3d7f..b4e2206 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);