Add accessors for metadata constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2009-07-02 17:19:47 +00:00
parent dfc8536d7b
commit 093811593e
2 changed files with 14 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class ConstantFP;
class ConstantVector;
class UndefValue;
class MDNode;
class MDString;
class IntegerType;
class PointerType;
class StructType;
@ -180,6 +181,10 @@ public:
// MDNode accessors
MDNode* getMDNode(Value* const* Vals, unsigned NumVals);
// MDString accessors
MDString* getMDString(const char *StrBegin, const char *StrEnd);
MDString* getMDString(const std::string &Str);
// FunctionType accessors
FunctionType* getFunctionType(const Type* Result,
const std::vector<const Type*>& Params,

View File

@ -411,6 +411,15 @@ MDNode* LLVMContext::getMDNode(Value* const* Vals, unsigned NumVals) {
return MDNode::get(Vals, NumVals);
}
// MDString accessors
MDString* LLVMContext::getMDString(const char *StrBegin, const char *StrEnd) {
return MDString::get(StrBegin, StrEnd);
}
MDString* LLVMContext::getMDString(const std::string &Str) {
return MDString::get(Str);
}
// FunctionType accessors
FunctionType* LLVMContext::getFunctionType(const Type* Result,
const std::vector<const Type*>& Params,