mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
IR: Take an LLVMContext in Metadata::Metadata()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
24593ac779
commit
e9b30c72ad
@ -41,7 +41,7 @@ enum LLVMConstants : uint32_t {
|
||||
/// TODO: Detach from the Value hierarchy.
|
||||
class Metadata : public Value {
|
||||
protected:
|
||||
Metadata(Type *Type, unsigned ID) : Value(Type, ID) {}
|
||||
Metadata(LLVMContext &Context, unsigned ID);
|
||||
|
||||
public:
|
||||
static bool classof(const Value *V) {
|
||||
|
@ -28,6 +28,9 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
Metadata::Metadata(LLVMContext &Context, unsigned ID)
|
||||
: Value(Type::getMetadataTy(Context), ID) {}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// MDString implementation.
|
||||
//
|
||||
@ -119,7 +122,7 @@ void MDNode::replaceOperandWith(unsigned i, Value *Val) {
|
||||
}
|
||||
|
||||
MDNode::MDNode(LLVMContext &C, ArrayRef<Value *> Vals, bool isFunctionLocal)
|
||||
: Metadata(Type::getMetadataTy(C), Value::MDNodeVal) {
|
||||
: Metadata(C, Value::MDNodeVal) {
|
||||
NumOperands = Vals.size();
|
||||
|
||||
if (isFunctionLocal)
|
||||
|
Loading…
Reference in New Issue
Block a user