Mercurial > projects > ldc
comparison gen/toir.cpp @ 464:e381e082d5cb
Fixed problem with using the variable names _arguments and _argptr in non D-style vararg functions.
Fixed problem with compiling with LLVM 2.3
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 03 Aug 2008 16:10:00 +0200 |
parents | 3a5d6ff8c70f |
children | 261b05cf4d1c |
comparison
equal
deleted
inserted
replaced
460:3a5d6ff8c70f | 464:e381e082d5cb |
---|---|
58 if (VarDeclaration* vd = var->isVarDeclaration()) | 58 if (VarDeclaration* vd = var->isVarDeclaration()) |
59 { | 59 { |
60 Logger::println("VarDeclaration %s", vd->toChars()); | 60 Logger::println("VarDeclaration %s", vd->toChars()); |
61 | 61 |
62 // _arguments | 62 // _arguments |
63 if (vd->ident == Id::_arguments) | 63 if (vd->ident == Id::_arguments && p->func()->_arguments) |
64 { | 64 { |
65 Logger::println("Id::_arguments"); | 65 Logger::println("Id::_arguments"); |
66 LLValue* v = p->func()->_arguments; | 66 LLValue* v = p->func()->_arguments; |
67 assert(v); | |
68 return new DVarValue(type, vd, v, true); | 67 return new DVarValue(type, vd, v, true); |
69 } | 68 } |
70 // _argptr | 69 // _argptr |
71 else if (vd->ident == Id::_argptr) | 70 else if (vd->ident == Id::_argptr && p->func()->_argptr) |
72 { | 71 { |
73 Logger::println("Id::_argptr"); | 72 Logger::println("Id::_argptr"); |
74 LLValue* v = p->func()->_argptr; | 73 LLValue* v = p->func()->_argptr; |
75 assert(v); | |
76 return new DVarValue(type, vd, v, true); | 74 return new DVarValue(type, vd, v, true); |
77 } | 75 } |
78 // _dollar | 76 // _dollar |
79 else if (vd->ident == Id::dollar) | 77 else if (vd->ident == Id::dollar) |
80 { | 78 { |