[llvm-commits] [vmkit] r50889 - in /vmkit/trunk/lib/Mvm/GCMmap2: MvmGC.h gc.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu May 8 23:02:22 PDT 2008
Author: geoffray
Date: Fri May 9 01:02:22 2008
New Revision: 50889
URL: http://llvm.org/viewvc/llvm-project?rev=50889&view=rev
Log:
Add an extern "C" function for LLVM runtime lib.
Modified:
vmkit/trunk/lib/Mvm/GCMmap2/MvmGC.h
vmkit/trunk/lib/Mvm/GCMmap2/gc.cpp
Modified: vmkit/trunk/lib/Mvm/GCMmap2/MvmGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/MvmGC.h?rev=50889&r1=50888&r2=50889&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/MvmGC.h (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/MvmGC.h Fri May 9 01:02:22 2008
@@ -100,5 +100,10 @@
STATIC void setMinMemory(size_t);
};
+#ifdef MULTIPLE_GC
+extern "C" gc* gcmalloc(size_t sz, VirtualTable* VT, Collector* GC);
+#else
+extern "C" gc* gcmalloc(size_t sz, VirtualTable* VT);
+#endif
#endif
Modified: vmkit/trunk/lib/Mvm/GCMmap2/gc.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/gc.cpp?rev=50889&r1=50888&r2=50889&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/GCMmap2/gc.cpp (original)
+++ vmkit/trunk/lib/Mvm/GCMmap2/gc.cpp Fri May 9 01:02:22 2008
@@ -260,3 +260,14 @@
return (Collector*)GCCollector::o2node((void*)o)->meta;
}
#endif
+
+#ifdef MULTIPLE_GC
+extern "C" gc* gcmalloc(size_t sz, VirtualTable* VT, Collector* GC) {
+ return (gc*)((GCCollector*)GC)->gcmalloc(VT, sz);
+}
+#else
+extern "C" gc* gcmalloc(size_t sz, VirtualTable* VT) {
+ return (gc*)GCCollector::gcmalloc(VT, sz);
+}
+#endif
+
More information about the llvm-commits
mailing list