Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 798:92ea3015ace6
Use toParent instead of toParent2 to determine whether inside a function body.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 29 Nov 2008 17:06:36 +0100 |
parents | 340acf1535d0 |
children | c62c6936635b |
comparison
equal
deleted
inserted
replaced
797:340acf1535d0 | 798:92ea3015ace6 |
---|---|
970 // if the variable is a function local static variable with a runtime initializer | 970 // if the variable is a function local static variable with a runtime initializer |
971 // we must do lazy initialization, which involves a boolean flag to make sure it happens only once | 971 // we must do lazy initialization, which involves a boolean flag to make sure it happens only once |
972 // FIXME: I don't think it's thread safe ... | 972 // FIXME: I don't think it's thread safe ... |
973 | 973 |
974 bool doLazyInit = false; | 974 bool doLazyInit = false; |
975 Dsymbol* par = vd->toParent2(); | 975 Dsymbol* par = vd->toParent(); |
976 | 976 |
977 if (par && par->isFuncDeclaration() && vd->init) | 977 if (par && par->isFuncDeclaration() && vd->init) |
978 { | 978 { |
979 if (ExpInitializer* einit = vd->init->isExpInitializer()) | 979 if (ExpInitializer* einit = vd->init->isExpInitializer()) |
980 { | 980 { |