summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert qualified interface types correctly.Anders Carlsson2008-08-241-3/+5
| | | | llvm-svn: 55287
* Handle static initializers in Objective-C++ methods.Anders Carlsson2008-08-231-2/+16
| | | | llvm-svn: 55250
* Add CodeGen support for CXXZeroInitValueExpr.Argyrios Kyrtzidis2008-08-233-0/+12
| | | | llvm-svn: 55249
* Drop a dead call to isConstantExpr()Daniel Dunbar2008-08-231-8/+6
| | | | llvm-svn: 55244
* NeXT: Clean up constant CFString handling.Daniel Dunbar2008-08-233-89/+32
| | | | | | | | - Use CodeGenModule::GetAddrOfConstantCFString Some tweaks of CodeGenModule::GetAddrOfConstantCFString llvm-svn: 55243
* Implement Obj-C ivar references to aggregates.Daniel Dunbar2008-08-235-1/+52
| | | | | | | | | | | Implement Obj-C lvalue message sends (aggregate returns). Update several places to emit more precise ErrorUnsupported warnings for currently unimplemented Obj-C features (main missing chunks are property references, Obj-C exception handling, and the for ... in syntax). llvm-svn: 55234
* NeXT: Fix message sends which return structures.Daniel Dunbar2008-08-232-70/+106
| | | | | | - Simplify the sending code a bit. llvm-svn: 55232
* NeXT: Implement super message sends.Daniel Dunbar2008-08-231-6/+65
| | | | llvm-svn: 55225
* Trim CGObjCRuntime::GenerateMessageSend[Super]Daniel Dunbar2008-08-238-144/+128
| | | | | | | | | | | | | | | | | | - Returns an RValue. - Reduced to only taking the CodeGenFunction, Expr, and Receiver. - Becomes responsible for emitting the arguments. Add CodeGenFunction::EmitCallExprExt - Takes optional extra arguments to insert at the head of the call. - This allows the Obj-C runtimes to call into this and isolates the argument and call instruction generation code to one place. Upshot is that we now pass structures (more) correctly. Also, fix one aspect of generating methods which take structure arguments (for NeXT). This probably needs to be merged with the SetFunctionAttributes code in CodeGenModule.cpp llvm-svn: 55223
* Move [LR]Value into CGValue.hDaniel Dunbar2008-08-232-182/+210
| | | | | | - No (intended) functional change. llvm-svn: 55221
* NeXT: Emit property metadata (classes, protocols, categories).Daniel Dunbar2008-08-231-36/+150
| | | | llvm-svn: 55209
* NeXT: Emit category metadata.Daniel Dunbar2008-08-221-30/+97
| | | | llvm-svn: 55197
* Add preliminary (and probably broken) codegen support for C++ static ↵Anders Carlsson2008-08-223-1/+147
| | | | | | initializers. llvm-svn: 55180
* NeXT: Emit [meta]class protocol references.Daniel Dunbar2008-08-211-11/+18
| | | | | | | Updated ObjCProtocolDecl::protocol_iterator to match that of ObjCInterfaceDecl. llvm-svn: 55143
* Preliminary support for Obj-C classes in NeXT runtime.Daniel Dunbar2008-08-211-91/+612
| | | | | | | | - Functional for simple cases but there are some glaring omissions (protocols, properties, and other language extensions). - The code needs a fair bit of cleaning. llvm-svn: 55108
* Move all Obj-C runtime interaction into CodeGenFunction.Daniel Dunbar2008-08-203-41/+10
| | | | | | | - Drop duplicate (and broken) code for sending messages. - Add EmitObjCProtocolExpr to CodeGenFunction. llvm-svn: 55024
* Add ExplicitCastExpr to replace the current CastExpr, and have ↵Argyrios Kyrtzidis2008-08-181-1/+1
| | | | | | | | | | | ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr): Expr -> CastExpr -> ExplicitCastExpr -> ImplicitCastExpr llvm-svn: 54955
* Add NeXT runtime support for generating methods.Daniel Dunbar2008-08-166-50/+93
| | | | | | | | | | | | | Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an ImplicitParamDecl. Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in CodeGenFunction). Change the Objective-C method generation to use EmitParmDecl for implicit parameters. llvm-svn: 54838
* Add CodeGen support for AddrLabelExpr in initializers.Daniel Dunbar2008-08-162-4/+13
| | | | llvm-svn: 54837
* Change WarnUnsupported to ErrorUnsupported (in name and in practice).Daniel Dunbar2008-08-1611-29/+28
| | | | | | | - We are beyond the point where this shows up often and when it does generating miscompiled files is bad. llvm-svn: 54836
* Change ObjCRuntime::LookupClass -> GetClass, and now takes theDaniel Dunbar2008-08-164-48/+58
| | | | | | | | | | | | | ObjCInterfaceDecl. Change ObjCRuntime::GenerateMessageSendSuper to take the ObjCInterfaceDecl for the super class, instead of just its name. Change EmitObjCMessageExpr to make the right runtime calls for super sends in class methods (i.e. a super send with the class object as the receiver). llvm-svn: 54833
* Clean up CodeGenModule interface.Daniel Dunbar2008-08-153-100/+112
| | | | | | | | | | | - Add CodeGenModule::EmitTopLevelDecl which uses switch on kind instead of ugly & slow dyn_cast chains. - Drop some simple forwarding methods into the ObjC runtime. - Privatize appropriate methods. llvm-svn: 54827
* Change CGObjCRuntime methods to take appropriate clang Decls.Daniel Dunbar2008-08-155-311/+206
| | | | | | | | | - This is in prep for implementation class support for the NeXT runtime, for which the existing methods don't provide enough information (and additionally make too many assumptions about how things should be emitted). llvm-svn: 54824
* Infinite loops considered harmful. Daniel Dunbar2008-08-151-1/+1
| | | | | | - Thanks Thomas llvm-svn: 54818
* Update some isIntegerConstantExpr uses to useDaniel Dunbar2008-08-131-5/+2
| | | | | | getIntegerConstantExprValue where appropriate. llvm-svn: 54771
* Add GetAddrOfConstantCString methodDaniel Dunbar2008-08-136-32/+68
| | | | | | | | | | | | | | | | | | - Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this. Rename getStringForStringLiteral to GetStringForStringLiteral. Add GetAddrOfConstantStringFromLiteral - This combines GetAddrOfConstantString and GetStringForStringLiteral. This method can be, but is not yet, more efficient. Change GetAddrOfConstantString to not add terminating '\0' - <rdar://problem/6140956> llvm-svn: 54768
* Implement Obj-C protocol metadata generation for NeXT.Daniel Dunbar2008-08-131-28/+420
| | | | | | - Near complete, only properties are missing. llvm-svn: 54715
* Change ObjCRuntime GenerateProtocol[Ref] methods to takeDaniel Dunbar2008-08-139-68/+59
| | | | | | | | | | | ObjCProtocolDecl directly. Implement CodeGen support for forward protocol decls (no-ops are so nice to implement). Also moved CGObjCRuntime.h out of CodeGenModule.h llvm-svn: 54709
* Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadataDaniel Dunbar2008-08-121-11/+125
| | | | | | - Matches llvm-gcc and seem to be expected by otool. llvm-svn: 54669
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-121-1/+0
| | | | | | | - Was unused and generated a unnecessary load of self (missed file) llvm-svn: 54668
* Drop Sender from GenerateMessageSend*Daniel Dunbar2008-08-124-47/+17
| | | | | | | | | - Was unused and generated a unnecessary load of self Update NeXT runtime to get proper object & selector types from ASTContext. llvm-svn: 54667
* Protocol related tweaksDaniel Dunbar2008-08-123-5/+28
| | | | | | | - Implement type conversion of ObjCQualifiedIdType - Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter llvm-svn: 54666
* Add @selector(...) codegen support.Daniel Dunbar2008-08-121-0/+5
| | | | llvm-svn: 54665
* Add NeXT support for (simple) message sends.Daniel Dunbar2008-08-121-18/+108
| | | | llvm-svn: 54664
* Add ObjC constant string support for NeXT.Daniel Dunbar2008-08-125-26/+159
| | | | | | | | | | Changed CGObjCRuntime::GenerateConstantString interface to take std::string instead of char* and size. Change ObjC functions which call on GenerateConstantString to bitcast result to appropriate type. llvm-svn: 54659
* Fix compilation warning with help from David Chisnall.Mike Stump2008-08-111-1/+4
| | | | llvm-svn: 54654
* Add LangOptions::NeXTRuntime.Daniel Dunbar2008-08-114-7/+92
| | | | | | | | | - Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. llvm-svn: 54651
* Change CodeGenModule to only create ObjC runtime for ObjC filesDaniel Dunbar2008-08-116-20/+35
| | | | | | | - Changed CodeGenModule::getObjCRuntime to return reference. - Added CodeGenModule::hasObjCRuntime predicate. llvm-svn: 54645
* Add -fexceptions to DriverDaniel Dunbar2008-08-111-0/+6
| | | | | | | | | | | - Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language. Update CodeGen to set unwind attribute on functions definitions based on LangOptions.Exceptions. - Still need to set attributes appropriately on calls. llvm-svn: 54643
* Update for IRBuilder template change (update LLVM!)Daniel Dunbar2008-08-112-10/+14
| | | | llvm-svn: 54642
* More #include cleaningDaniel Dunbar2008-08-119-41/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* More #include cleaningDaniel Dunbar2008-08-118-1/+16
| | | | | | | | - Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h - Moved Sema::getCurMethodDecl() out of line (dependent on ObjCMethodDecl via dyn_cast). llvm-svn: 54629
* More #include cleaningDaniel Dunbar2008-08-119-9/+15
| | | | | | - Remove internal uses of AST.h llvm-svn: 54628
* More #include cleaningDaniel Dunbar2008-08-116-0/+8
| | | | | | | | - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation llvm-svn: 54627
* Add dummy Mac Objective-C runtime interface.Daniel Dunbar2008-08-116-8/+229
| | | | | | - Not currently accessible and completely non-functional. llvm-svn: 54624
* Back out r54608 (inline string literals were getting an extra '\0')Daniel Dunbar2008-08-104-37/+33
| | | | | | | | | | | | | | | temporarily, I assumed GetAddrForConstantString literal was being used consistently but it doesn't look like it is. Factored out a CodeGenModule::getStringForStringLiteral which handles extracting a std::string for the bytes of a StringLiteral, padded to match the type. Update EmitLValue to use getStringForStringLiteral, this was previously not padding strings correctly. Good thing we only emit strings in 4 different places! llvm-svn: 54621
* Fix crash during initialization of a bitfield which followed a zeroDaniel Dunbar2008-08-101-2/+8
| | | | | | | | length element. Fix some 80-col violations. llvm-svn: 54610
* Bug fix, inline string literals were getting an extra '\0'.Daniel Dunbar2008-08-101-1/+1
| | | | llvm-svn: 54608
* rename PreDefinedExpr -> PredefinedExprChris Lattner2008-08-104-11/+11
| | | | llvm-svn: 54605
* 80 colsNico Weber2008-08-091-1/+1
| | | | llvm-svn: 54599
OpenPOWER on IntegriCloud