mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 05:43:14 +01:00
[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:
10
dmd/mars.c
10
dmd/mars.c
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user