[llvm-commits] [llvm] r74705 - in /llvm/trunk: include/llvm/LLVMContext.h lib/VMCore/LLVMContext.cpp
Owen Anderson
resistor at mac.com
Thu Jul 2 10:12:52 PDT 2009
Author: resistor
Date: Thu Jul 2 12:12:48 2009
New Revision: 74705
URL: http://llvm.org/viewvc/llvm-project?rev=74705&view=rev
Log:
Add accessor for MDNode.
Modified:
llvm/trunk/include/llvm/LLVMContext.h
llvm/trunk/lib/VMCore/LLVMContext.cpp
Modified: llvm/trunk/include/llvm/LLVMContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=74705&r1=74704&r2=74705&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LLVMContext.h (original)
+++ llvm/trunk/include/llvm/LLVMContext.h Thu Jul 2 12:12:48 2009
@@ -31,6 +31,7 @@
class ConstantFP;
class ConstantVector;
class UndefValue;
+class MDNode;
class IntegerType;
class PointerType;
class StructType;
@@ -176,6 +177,9 @@
Constant* getConstantVector(Constant* const* Vals, unsigned NumVals);
ConstantVector* getConstantVectorAllOnes(const VectorType* Ty);
+ // MDNode accessors
+ MDNode* getMDNode(Value* const* Vals, unsigned NumVals);
+
// FunctionType accessors
FunctionType* getFunctionType(const Type* Result,
const std::vector<const Type*>& Params,
Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=74705&r1=74704&r2=74705&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/LLVMContext.cpp (original)
+++ llvm/trunk/lib/VMCore/LLVMContext.cpp Thu Jul 2 12:12:48 2009
@@ -15,6 +15,7 @@
#include "llvm/LLVMContext.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
+#include "llvm/MDNode.h"
#include "llvm/Support/ManagedStatic.h"
#include "LLVMContextImpl.h"
@@ -405,6 +406,11 @@
return ConstantVector::getAllOnesValue(Ty);
}
+// MDNode accessors
+MDNode* LLVMContext::getMDNode(Value* const* Vals, unsigned NumVals) {
+ return MDNode::get(Vals, NumVals);
+}
+
// FunctionType accessors
FunctionType* LLVMContext::getFunctionType(const Type* Result,
const std::vector<const Type*>& Params,
More information about the llvm-commits
mailing list