diff options
Diffstat (limited to 'include/llvm/Metadata.h')
-rw-r--r-- | include/llvm/Metadata.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index a6c3f03..c323025 100644 --- a/include/llvm/Metadata.h +++ b/include/llvm/Metadata.h @@ -17,6 +17,7 @@ #define LLVM_METADATA_H #include "llvm/Value.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/ilist_node.h" @@ -110,28 +111,25 @@ class MDNode : public Value, public FoldingSetNode { void replaceOperand(MDNodeOperand *Op, Value *NewVal); ~MDNode(); - MDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals, - bool isFunctionLocal); + MDNode(LLVMContext &C, ArrayRef<Value*> Vals, bool isFunctionLocal); - static MDNode *getMDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals, + static MDNode *getMDNode(LLVMContext &C, ArrayRef<Value*> Vals, FunctionLocalness FL, bool Insert = true); public: // Constructors and destructors. - static MDNode *get(LLVMContext &Context, Value *const *Vals, - unsigned NumVals); + static MDNode *get(LLVMContext &Context, ArrayRef<Value*> Vals); // 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 *getWhenValsUnresolved(LLVMContext &Context, + ArrayRef<Value*> Vals, + bool isFunctionLocal); - static MDNode *getIfExists(LLVMContext &Context, Value *const *Vals, - unsigned NumVals); + static MDNode *getIfExists(LLVMContext &Context, ArrayRef<Value*> Vals); /// 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); + static MDNode *getTemporary(LLVMContext &Context, ArrayRef<Value*> Vals); /// deleteTemporary - Deallocate a node created by getTemporary. The /// node must not have any users. |