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.
llvm-svn: 48970
This commit is contained in:
@@ -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 ; i<OMD->param_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
|
||||
|
||||
Reference in New Issue
Block a user