Incremental getterization of Decl.h.

Swift SVN r882
This commit is contained in:
John McCall
2011-11-18 00:17:20 +00:00
parent de3c3ff04d
commit d74f17259c
12 changed files with 109 additions and 61 deletions

View File

@@ -217,7 +217,7 @@ FuncTypeInfo::getFunctionType(IRGenModule &IGM, bool NeedsData) const {
/// Form an r-value which refers to the given global function.
RValue IRGenFunction::emitRValueForFunction(FuncDecl *Fn) {
if (!Fn->Context->isLocalContext()) {
if (!Fn->getDeclContext()->isLocalContext()) {
llvm::Function *Function = IGM.getAddrOfGlobalFunction(Fn);
llvm::Value *Data = llvm::UndefValue::get(IGM.Int8PtrTy);
return RValue::forScalars(Function, Data);
@@ -371,7 +371,7 @@ static RValue emitBuiltinCall(IRGenFunction &IGF, FuncDecl *Fn, Expr *Arg,
RValue IRGenFunction::emitApplyExpr(ApplyExpr *E, const TypeInfo &ResultInfo) {
// Check for a call to a builtin.
if (ValueDecl *Fn = E->getCalledValue())
if (Fn->Context == IGM.Context.TheBuiltinModule)
if (Fn->getDeclContext() == IGM.Context.TheBuiltinModule)
return emitBuiltinCall(*this, cast<FuncDecl>(Fn), E->getArg(),
ResultInfo);