[PGO] Allow input value node list to be null
[oota-llvm.git] / include / llvm / IR / Statepoint.h
index aeb0ede72c2733526bed6be53326bff3edea6526..efe58e3e5a152b5166bf9081044293f1889df372 100644 (file)
@@ -86,7 +86,7 @@ public:
     CallArgsBeginPos = 5,
   };
 
-  operator bool() const {
+  explicit operator bool() const {
     // We do not assign non-statepoint CallSites to StatepointCS.
     return (bool)StatepointCS;
   }
@@ -235,6 +235,10 @@ public:
     return getCallSite().arg_end();
   }
 
+  unsigned gcArgsStartIdx() const {
+    return gc_args_begin() - getInstruction()->op_begin();
+  }
+
   /// range adapter for gc arguments
   iterator_range<arg_iterator> gc_args() const {
     return iterator_range<arg_iterator>(gc_args_begin(), gc_args_end());