- static MDNode *get(LLVMContext &Context, Value *const *Vals, unsigned NumVals,
- bool isFunctionLocal = false);
+ static MDNode *get(LLVMContext &Context, ArrayRef<Value*> V);
+ // FIXME: Eliminate this constructor form.
+ static MDNode *get(LLVMContext &Context, Value *const *Vals,
+ unsigned NumVals);
+ // getWhenValsUnresolved - Construct MDNode determining function-localness
+ // from isFunctionLocal argument, not by analyzing Vals.
+ static MDNode *getWhenValsUnresolved(LLVMContext &Context, Value *const *Vals,
+ unsigned NumVals, bool isFunctionLocal);
+
+ static MDNode *getIfExists(LLVMContext &Context, Value *const *Vals,
+ unsigned NumVals);
+
+ /// getTemporary - Return a temporary MDNode, for use in constructing
+ /// cyclic MDNode structures. A temporary MDNode is not uniqued,
+ /// may be RAUW'd, and must be manually deleted with deleteTemporary.
+ static MDNode *getTemporary(LLVMContext &Context, Value *const *Vals,
+ unsigned NumVals);
+
+ /// deleteTemporary - Deallocate a node created by getTemporary. The
+ /// node must not have any users.
+ static void deleteTemporary(MDNode *N);