mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 05:35:11 +00:00
Add ArrayRef variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126978 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
40a42a2cca
commit
566bd12e54
@ -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"
|
||||
|
||||
@ -117,6 +118,8 @@ class MDNode : public Value, public FoldingSetNode {
|
||||
FunctionLocalness FL, bool Insert = true);
|
||||
public:
|
||||
// Constructors and destructors.
|
||||
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
|
||||
|
@ -232,6 +232,9 @@ MDNode *MDNode::getMDNode(LLVMContext &Context, Value *const *Vals,
|
||||
return N;
|
||||
}
|
||||
|
||||
MDNode *MDNode::get(LLVMContext &Context, ArrayRef<Value*> Vals) {
|
||||
return getMDNode(Context, Vals.data(), Vals.size(), FL_Unknown);
|
||||
}
|
||||
MDNode *MDNode::get(LLVMContext &Context, Value*const* Vals, unsigned NumVals) {
|
||||
return getMDNode(Context, Vals, NumVals, FL_Unknown);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user