diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-18 16:35:37 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-18 16:35:37 +0000 |
commit | 1e09e5b979249ae08082569cbf0ab24d297ee0dd (patch) | |
tree | 4fe8f4dea782812756734d0583bc860f5d503f4f /lib | |
parent | 39a7de72c8b5013f32802ceacefaaf6697726c28 (diff) |
Expose getTypeName to the C API. Patch by Patrick Walton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Core.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 5fd37351e2..35c3a2e925 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -128,6 +128,10 @@ LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) { return wrap(unwrap(M)->getTypeByName(Name)); } +const char *LLVMGetTypeName(LLVMModuleRef M, LLVMTypeRef Ty) { + return unwrap(M)->getTypeName(unwrap(Ty)).c_str(); +} + void LLVMDumpModule(LLVMModuleRef M) { unwrap(M)->dump(); } |