[svn r105] -inline does nothing for now, the -On setting can already be used to trigger it.

Fixed a rare bug in AddrExp.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-16 10:01:24 +01:00
parent d1cfe9524c
commit 1c4cfc21ac
3 changed files with 11 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
#include <assert.h>
#include <limits.h>
#include <string>
#include <vaarg.h>
#include <cstdarg>
#if _WIN32
#include <windows.h>
@@ -469,8 +469,12 @@ int main(int argc, char *argv[])
}
}
#endif
else if (strcmp(p + 1, "inline") == 0)
global.params.useInline = 1;
else if (strcmp(p + 1, "inline") == 0) {
// TODO
// the ast rewrites dmd does for inling messes up the ast
// someday maybe we can support it, for now llvm does an excellent job at inlining
global.params.useInline = 0; //1
}
else if (strcmp(p + 1, "nofloat") == 0)
global.params.nofloat = 1;
else if (strcmp(p + 1, "quiet") == 0)

View File

@@ -1468,6 +1468,9 @@ DValue* AddrExp::toElem(IRState* p)
fd->toObjFile();
return new DFuncValue(fd, fd->llvmValue);
}
else if (DImValue* im = v->isIm()) {
return v;
}
return new DFieldValue(type, v->getLVal(), false);
}

View File

@@ -299,6 +299,7 @@ test/bug62.d
test/bug63.d
test/bug64.d
test/bug66.d
test/bug67.d
test/bug7.d
test/bug8.d
test/bug9.d