[llvm] r222019 - IR: Take an LLVMContext in Metadata::Metadata()
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Nov 14 10:42:09 PST 2014
Author: dexonsmith
Date: Fri Nov 14 12:42:09 2014
New Revision: 222019
URL: http://llvm.org/viewvc/llvm-project?rev=222019&view=rev
Log:
IR: Take an LLVMContext in Metadata::Metadata()
Modified:
llvm/trunk/include/llvm/IR/Metadata.h
llvm/trunk/lib/IR/Metadata.cpp
Modified: llvm/trunk/include/llvm/IR/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Metadata.h?rev=222019&r1=222018&r2=222019&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Metadata.h (original)
+++ llvm/trunk/include/llvm/IR/Metadata.h Fri Nov 14 12:42:09 2014
@@ -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) {
Modified: llvm/trunk/lib/IR/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Metadata.cpp?rev=222019&r1=222018&r2=222019&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Metadata.cpp (original)
+++ llvm/trunk/lib/IR/Metadata.cpp Fri Nov 14 12:42:09 2014
@@ -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
}
MDNode::MDNode(LLVMContext &C, ArrayRef<Value *> Vals, bool isFunctionLocal)
- : Metadata(Type::getMetadataTy(C), Value::MDNodeVal) {
+ : Metadata(C, Value::MDNodeVal) {
NumOperands = Vals.size();
if (isFunctionLocal)
More information about the llvm-commits
mailing list