mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
Reorganized the tangotests dir a bit.
This commit is contained in:
@@ -52,12 +52,8 @@ llvm::Value* DVarValue::getRVal()
|
||||
}
|
||||
else {
|
||||
if (rval) return rval;
|
||||
Logger::cout() << "val: " << *val << '\n';
|
||||
if (isaArgument(val)) {
|
||||
if (var && (var->isRef() || var->isOut()))
|
||||
return DtoLoad(val);
|
||||
}
|
||||
else if (!isField() && DtoCanLoad(val)) {
|
||||
//Logger::cout() << "val: " << *val << '\n';
|
||||
if (!isThis() && !isField() && DtoCanLoad(val)) {
|
||||
return DtoLoad(val);
|
||||
}
|
||||
return val;
|
||||
|
||||
@@ -211,12 +211,6 @@ DValue* VarExp::toElem(IRState* p)
|
||||
// function parameter
|
||||
else if (vd->isParameter()) {
|
||||
Logger::println("function param");
|
||||
if (!gIR->irDsymbol[vd].getIrValue()) {
|
||||
assert(0); // should be fixed now
|
||||
// TODO: determine this properly
|
||||
// this happens when the DMD frontend generates by pointer wrappers for struct opEquals(S) and opCmp(S)
|
||||
gIR->irDsymbol[vd].getIrValue() = &p->func()->func->getArgumentList().back();
|
||||
}
|
||||
if (vd->isRef() || vd->isOut() || DtoIsPassedByRef(vd->type) || llvm::isa<llvm::AllocaInst>(gIR->irDsymbol[vd].getIrValue())) {
|
||||
return new DVarValue(vd, gIR->irDsymbol[vd].getIrValue(), true);
|
||||
}
|
||||
@@ -1371,7 +1365,8 @@ DValue* DotVarExp::toElem(IRState* p)
|
||||
Type* t = DtoDType(type);
|
||||
Type* e1type = DtoDType(e1->type);
|
||||
|
||||
//Logger::print("e1type=%s\n", e1type->toChars());
|
||||
//Logger::println("e1type=%s", e1type->toChars());
|
||||
//Logger::cout() << *DtoType(e1type) << '\n';
|
||||
|
||||
if (VarDeclaration* vd = var->isVarDeclaration()) {
|
||||
llvm::Value* arrptr;
|
||||
|
||||
@@ -748,6 +748,8 @@ tango/tango/util/log/model/ILevel.d
|
||||
tangotests
|
||||
tangotests/a.d
|
||||
tangotests/aa1.d
|
||||
tangotests/abc.d
|
||||
tangotests/abcd.d
|
||||
tangotests/b.d
|
||||
tangotests/c.d
|
||||
tangotests/classes1.d
|
||||
|
||||
@@ -27,3 +27,8 @@ void access2(C c)
|
||||
{
|
||||
c.d = 2.5;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
func();
|
||||
}
|
||||
|
||||
@@ -18,3 +18,8 @@ void func2(Bar c)
|
||||
{
|
||||
c.i = 123;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
func();
|
||||
}
|
||||
@@ -20,3 +20,8 @@ void func()
|
||||
{
|
||||
scope c = new MyClass(42);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
func();
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
extern(C) int printf(char*,...);
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
|
||||
@@ -21,7 +21,7 @@ class C : Iin
|
||||
}
|
||||
}
|
||||
|
||||
void func()
|
||||
void main()
|
||||
{
|
||||
scope c = new C;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ class C : AC
|
||||
}
|
||||
}
|
||||
|
||||
void func()
|
||||
void main()
|
||||
{
|
||||
scope c = new C;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user