diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-28 20:03:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-28 20:03:44 +0000 |
commit | a1ac3bbec703f7faf20cbc06fa0eb9d34bb4f5f6 (patch) | |
tree | e9071f47d3c397cd9db4431bedbcc21eb9fb7a8b /lib/VMCore/Core.cpp | |
parent | bf953eaba3442f8e25926b8f41423d4d126960f6 (diff) | |
download | llvm-a1ac3bbec703f7faf20cbc06fa0eb9d34bb4f5f6.tar.gz llvm-a1ac3bbec703f7faf20cbc06fa0eb9d34bb4f5f6.tar.bz2 llvm-a1ac3bbec703f7faf20cbc06fa0eb9d34bb4f5f6.tar.xz |
add a function to the C api to get the context out of a module, patch
by Eric Dobson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index eb0af30a2f..858f49cdf5 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -138,6 +138,12 @@ void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm) { } +/*--.. Operations on module contexts ......................................--*/ +LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M) { + return wrap(&unwrap(M)->getContext()); +} + + /*===-- Operations on types -----------------------------------------------===*/ /*--.. Operations on all types (mostly) ....................................--*/ |