X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm-c%2FCore.h;h=69ed08dff1f85c5cacf891ab99227e27c6fb89ff;hp=fdff77bc5e511abed8a9b9fd65a3cc72ffae1b3d;hb=5f3f0620f6bb3627fc0fd906bc89ada0cc1cdb7b;hpb=7bf958fe15d907b74a4b7c3bba6e39912ae5a9bb diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index fdff77bc5e5..69ed08dff1f 100644 --- a/include/llvm-c/Core.h +++ b/include/llvm-c/Core.h @@ -1569,6 +1569,20 @@ LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, LLVMValueRef LLVMConstString(const char *Str, unsigned Length, LLVMBool DontNullTerminate); +/** + * Returns true if the specified constant is an array of i8. + * + * @see ConstantDataSequential::getAsString() + */ +LLVMBool LLVMIsConstantString(LLVMValueRef c); + +/** + * Get the given constant data sequential as a string. + * + * @see ConstantDataSequential::getAsString() + */ +const char *LLVMGetAsString(LLVMValueRef c, size_t* out); + /** * Create an anonymous ConstantStruct with the specified values. * @@ -1606,6 +1620,13 @@ LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count); +/** + * Get an element at specified index as a constant. + * + * @see ConstantDataSequential::getElementAsConstant() + */ +LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef c, unsigned idx); + /** * Create a ConstantVector from values. *