Restore other bits of the C API that I tore up. All pre-existing APIs default to...
[oota-llvm.git] / lib / VMCore / Core.cpp
index f7fb1bbf7df46fdd2cdef415391ba5bda8e3bee4..6eb188907f560adf38fd98a85a312f8b312a2704 100644 (file)
@@ -56,7 +56,12 @@ void LLVMContextDispose(LLVMContextRef C) {
 
 /*===-- Operations on modules ---------------------------------------------===*/
 
-LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID, LLVMContextRef C) {
+LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID) {
+  return wrap(new Module(ModuleID, getGlobalContext()));
+}
+
+LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, 
+                                                LLVMContextRef C) {
   return wrap(new Module(ModuleID, *unwrap(C)));
 }