another ldc2 merge

This commit is contained in:
Moritz Warning
2011-01-10 19:45:00 +01:00
46 changed files with 1629 additions and 1240 deletions

View File

@@ -1065,6 +1065,7 @@ struct CallExp : UnaExp
Expression *inlineScan(InlineScanState *iss);
#if IN_LLVM
void cacheLvalue(IRState* p);
DValue* toElem(IRState* irs);
#endif
};
@@ -1334,6 +1335,7 @@ struct CommaExp : BinExp
#endif
#if IN_LLVM
void cacheLvalue(IRState* p);
DValue* toElem(IRState* irs);
#endif
};
@@ -1469,6 +1471,7 @@ struct AddExp : BinExp
#endif
#if IN_LLVM
llvm::Constant* toConstElem(IRState* p);
DValue* toElem(IRState* irs);
#endif
};
@@ -1491,6 +1494,7 @@ struct MinExp : BinExp
#endif
#if IN_LLVM
llvm::Constant* toConstElem(IRState* p);
DValue* toElem(IRState* irs);
#endif
};

View File

@@ -451,7 +451,9 @@ inline unsigned readlongBE(unsigned *p)
(((unsigned char *)p)[0] << 24);
}
#if IN_GCC
#if IN_LLVM
void Module::parse(bool gen_docs)
#elif IN_GCC
void Module::parse(bool dump_source)
#else
void Module::parse()
@@ -660,7 +662,11 @@ void Module::parse()
d_gcc_dump_source(srcname, "d.utf-8", buf, buflen);
#endif
}
#if IN_LLVM
Parser p(this, buf, buflen, gen_docs);
#else
Parser p(this, buf, buflen, docfile != NULL);
#endif
p.nextToken();
members = p.parseModule();
md = p.md;

View File

@@ -135,7 +135,9 @@ struct Module : Package
void toJsonBuffer(OutBuffer *buf);
const char *kind();
void read(Loc loc); // read file
#if IN_GCC
#if IN_LLVM
void parse(bool gen_docs = false); // syntactic parse
#elif IN_GCC
void parse(bool dump_source = false); // syntactic parse
#else
void parse(); // syntactic parse