[svn r10] Updated for LLVM rev. 20070913

Applied fixes from wilsonk on the forum
Some tweaks to work with gc 7.0
Fixed aggregate members of aggregates
Fixed cyclic/recursive class declarations
Other minor tweaks
This commit is contained in:
Tomas Lindquist Olsen
2007-09-26 19:05:18 +02:00
parent 5d2e8f1009
commit 329ad7747c
10 changed files with 118 additions and 54 deletions

View File

@@ -6,7 +6,8 @@
#include <stdlib.h>
#include <string.h>
#include "gc.h"
// I needed to perfix the dir after upgrading to gc 7.0
#include "gc/gc.h"
#include "mem.h"
@@ -14,10 +15,12 @@
*/
Mem mem;
static bool gc_was_init = false;
void Mem::init()
{
GC_init();
gc_was_init = true;
}
char *Mem::strdup(const char *s)
@@ -127,7 +130,11 @@ void Mem::mark(void *pointer)
/* =================================================== */
void * operator new(size_t m_size)
{
{
// without this we segfault with gc 7.0
if (!gc_was_init) {
mem.init();
}
void *p = GC_malloc(m_size);
if (p)
return p;