summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm-c/Core.h7
-rw-r--r--lib/IR/Core.cpp4
2 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index caadab1..d39128d 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -700,6 +700,13 @@ LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty);
LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty);
/**
+ * Dump a representation of a type to stderr.
+ *
+ * @see llvm::Type::dump()
+ */
+void LLVMDumpType(LLVMTypeRef Val);
+
+/**
* @defgroup LLVMCCoreTypeInt Integer Types
*
* Functions in this section operate on integer types.
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp
index cf1c1df..7d52386 100644
--- a/lib/IR/Core.cpp
+++ b/lib/IR/Core.cpp
@@ -220,6 +220,10 @@ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) {
return wrap(&unwrap(Ty)->getContext());
}
+void LLVMDumpType(LLVMTypeRef Ty) {
+ return unwrap(Ty)->dump();
+}
+
/*--.. Operations on integer types .........................................--*/
LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C) {