summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2014-08-03 23:54:16 +0000
committerPeter Zotov <whitequark@whitequark.org>2014-08-03 23:54:16 +0000
commitf9aa882ca18c0c67b72a73c4bc1e97ab6c1634ae (patch)
tree0f8bbc044a898d36a9796ec4368222641a31bc8c /llvm/include/llvm-c
parent06f621d3496ed2549edcc763403a64812d35e2a0 (diff)
downloadbcm5719-llvm-f9aa882ca18c0c67b72a73c4bc1e97ab6c1634ae.tar.gz
bcm5719-llvm-f9aa882ca18c0c67b72a73c4bc1e97ab6c1634ae.zip
[LLVM-C] Add LLVM{IsConstantString,GetAsString,GetElementAsConstant}.
llvm-svn: 214676
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/Core.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index fdff77bc5e5..69ed08dff1f 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -1570,6 +1570,20 @@ 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.
*
* @see llvm::ConstantStruct::getAnon()
@@ -1607,6 +1621,13 @@ LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy,
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.
*
* @see llvm::ConstantVector::get()
OpenPOWER on IntegriCloud