[svn r95] added support for mains like:

T main(string[] args)
fixed a bug with slicing a pointer that is an argument with no storage
This commit is contained in:
Tomas Lindquist Olsen
2007-11-07 04:52:56 +01:00
parent 4a5659c04e
commit ea18cd8e75
5 changed files with 77 additions and 3 deletions

View File

@@ -1747,7 +1747,7 @@ DValue* SliceExp::toElem(IRState* p)
Type* e1type = DtoDType(e1->type);
DValue* v = e1->toElem(p);
llvm::Value* vmem = v->getLVal();
llvm::Value* vmem = v->isIm() ? v->getRVal() : v->getLVal();
assert(vmem);
llvm::Value* zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0, false);