From ce5605ecf76d8cde6372138f830bb144d174ced9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 30 Mar 2008 23:25:33 +0000 Subject: some cleanups on top of David's patch. There are still two remaining open issues I've communicated to him: 1) self can be assigned to, and his patch didn't handle it correctly. 2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses all parent class ivars) and flattens classes. If A derives from B, and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}. David, please review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48970 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 3e811a73b7..5f47bb78c6 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -26,7 +26,7 @@ using namespace CodeGen; CodeGenFunction::CodeGenFunction(CodeGenModule &cgm) : CGM(cgm), Target(CGM.getContext().Target), SwitchInsn(NULL), - CaseRangeBlock(NULL) {} + CaseRangeBlock(NULL) {} ASTContext &CodeGenFunction::getContext() const { return CGM.getContext(); @@ -64,11 +64,11 @@ void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) { for (unsigned i=0 ; iparam_size() ; i++) { ParamTypes.push_back(ConvertType(OMD->getParamDecl(i)->getType())); } - CurFn = CGM.getObjCRuntime()->MethodPreamble(ConvertType(OMD->getResultType()), - llvm::PointerType::getUnqual(llvm::Type::Int32Ty), - ParamTypes.begin(), - OMD->param_size(), - OMD->isVariadic()); + CurFn =CGM.getObjCRuntime()->MethodPreamble(ConvertType(OMD->getResultType()), + llvm::PointerType::getUnqual(llvm::Type::Int32Ty), + ParamTypes.begin(), + OMD->param_size(), + OMD->isVariadic()); llvm::BasicBlock *EntryBB = new llvm::BasicBlock("entry", CurFn); // Create a marker to make it easy to insert allocas into the entryblock -- cgit v1.2.3-18-g5258