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 | a7e04b04c5f29b7b577a0f2f61bbb7cee17ca4d2 (patch) | |
tree | f4e3a665d4ba758e8a1e1dbbdf370d097ae54bea /llvm/lib/VMCore/Core.cpp | |
parent | 6fd5c65095904b653609ba84d208be68d28f411a (diff) | |
download | bcm5719-llvm-a7e04b04c5f29b7b577a0f2f61bbb7cee17ca4d2.tar.gz bcm5719-llvm-a7e04b04c5f29b7b577a0f2f61bbb7cee17ca4d2.zip |
add a function to the C api to get the context out of a module, patch
by Eric Dobson!
llvm-svn: 120259
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r-- | llvm/lib/VMCore/Core.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index eb0af30a2fc..858f49cdf51 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/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) ....................................--*/ |