- Sep 10, 2008
-
-
Daniel Dunbar authored
- Added CodeGenTypes::GetFunctionType, taking a CGFunctionInfo. - Updated Obj-C runtimes to use this instead of rolling the llvm::FunctionType by hand. - Killed CodeGenTypes::{ConvertReturnType, DecodeArgumentTypes}. Add ABIArgInfo class to encapsulate ABI decision of how to lower types to LLVM. - Will move to target sometime soon. llvm-svn: 56047
-
Daniel Dunbar authored
to LLVM. - Will move to target sometime soon. llvm-svn: 56046
-
Argyrios Kyrtzidis authored
Implement CodeGen support for the 'CXXConditionDeclExpr' expression node, which represents a 'condition' declaration, e.g: "if (int x=0) {...}". llvm-svn: 56045
-
Daniel Dunbar authored
- Realized these functions will eventually need access to more data, moved to CodeGenModule. Eventually they should probably live together in some other helper class. llvm-svn: 56039
-
Daniel Dunbar authored
- Move actual param attr list creation to CodeGenFunction::ConstructParamAttrList. - Make ReturnTypeUsesSret static. llvm-svn: 56038
-
Daniel Dunbar authored
- Hook so NeXT runtime doesn't depend on ABI. llvm-svn: 56034
-
Daniel Dunbar authored
- Factor out EmitFunction{Pro,Epi}log llvm-svn: 56031
-
Daniel Dunbar authored
StartObjCMethod. llvm-svn: 56030
-
- Sep 09, 2008
-
-
Daniel Dunbar authored
- For the time being this means our emitted code is somewhat worse, especially for aggregates. This will be fixed. llvm-svn: 56013
-
Daniel Dunbar authored
- No functionality change. llvm-svn: 56010
-
Anders Carlsson authored
llvm-svn: 55994
-
Anders Carlsson authored
llvm-svn: 55991
-
Anders Carlsson authored
llvm-svn: 55984
-
Anders Carlsson authored
llvm-svn: 55983
-
Daniel Dunbar authored
- Add CodeGenFunction::EmitAnyExprToTemp o Like EmitAnyExpr, but emits aggregates to a temporary location if none is available. Seems like this should be simpler (even aside from using first class aggregates). - Killed CodeGenFunction::EmitCallArg (just append the pair) - Conversion of RValues to actual call arguments is now isolated in CodeGenFunction::EmitCall. llvm-svn: 55970
-
Daniel Dunbar authored
aliases. - Attributes specific to a definition are only set when the definition is seen. - Alias generation is delayed until the end of the module; necessary since the alias may reference forward. - Fixes: PR2743, <rdr://6140807&6094512> - Improves: <rdr://6095112> (added XFAIL) Also, print module on verification failures. llvm-svn: 55966
-
- Sep 08, 2008
-
-
Daniel Dunbar authored
- Add CGCall.h for dealing with ABI issues related to calls. - Add CGFunctionInfo and CGCallInfo for capturing ABI relevant information about functions and calls. - Isolate LLVM parameter attribute handling inside CGCall.cpp llvm-svn: 55963
-
- Sep 06, 2008
-
-
Daniel Dunbar authored
a many-to-one relationship between TagDecl's and types. llvm-svn: 55870
-
- Sep 05, 2008
-
-
Ted Kremenek authored
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it. This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet). The motivation of this patch is as follows: - Capture more source information, necessary for refactoring/rewriting clients. - Pave the way to resolve ownership issues with RecordDecls with the forthcoming addition of DeclGroups. Current caveats: - Until DeclGroups are in place, we will leak RecordDecls not explicitly referenced by the AST. For example: typedef struct { ... } x; The RecordDecl for the struct will be leaked because the TypedefDecl doesn't refer to it. This will be solved with DeclGroups. - This patch also (temporarily) breaks CodeGen. More below. High-level changes: - As before, TagType still refers to a TagDecl, but it doesn't own it. When a struct/union/class is first referenced, a RecordType and RecordDecl are created for it, and the RecordType refers to that RecordDecl. Later, if a new RecordDecl is created, the pointer to a RecordDecl in RecordType is updated to point to the RecordDecl that defines the struct/union/class. - TagDecl and RecordDecl now how a method 'getDefinition()' to return the TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular enum/struct/class/union. This is useful from going from a RecordDecl* that defines a forward declaration to the RecordDecl* that provides the actual definition. Note that this also works for EnumDecls, except that in this case there is no distinction between forward declarations and definitions (yet). - Clients should no longer assume that 'isDefinition()' returns true from a RecordDecl if the corresponding struct/union/class has been defined. isDefinition() only returns true if a particular RecordDecl is the defining Decl. Use 'getDefinition()' instead to determine if a struct has been defined. - The main changes to Sema happen in ActOnTag. To make the changes more incremental, I split off the processing of enums and structs et al into two code paths. Enums use the original code path (which is in ActOnTag) and structs use the ActOnTagStruct. Eventually the two code paths will be merged, but the idea was to preserve the original logic both for comparison and not to change the logic for both enums and structs all at once. - There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls that correspond to the same type simply have a pointer to that type. If we need to figure out what are all the RecordDecls for a given type we can build a backmap. - The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the changes to RecordDecl. For some reason 'svn' marks the entire file as changed. Why is CodeGen broken: - Codegen assumes that there is an equivalence between RecordDecl* and RecordType*. This was true before because we only created one RecordDecl* for a given RecordType*, but it is no longer true. I believe this shouldn't be too hard to change, but the patch was big enough as it is. I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C). llvm-svn: 55839
-
Ted Kremenek authored
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration. The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType. llvm-svn: 55821
-
Daniel Dunbar authored
- <rdar://problem/6156739> llvm-svn: 55815
-
Daniel Dunbar authored
llvm-svn: 55812
-
- Sep 04, 2008
-
-
Daniel Dunbar authored
- Patch via Thomas Clement, thanks! llvm-svn: 55804
-
Daniel Dunbar authored
references (to match gcc). llvm-svn: 55760
-
Daniel Dunbar authored
llvm-svn: 55759
-
Daniel Dunbar authored
e.g. "(a = b).somefield". llvm-svn: 55758
-
- Sep 03, 2008
-
-
Daniel Dunbar authored
- Currently CodeGen always returns a conservative value for this (-1 or 0 depending on the context). llvm-svn: 55735
-
Daniel Dunbar authored
uses which refer to methods not properties. - Not yet wired in Sema. llvm-svn: 55681
-
- Sep 01, 2008
-
-
Nuno Lopes authored
llvm-svn: 55603
-
- Aug 31, 2008
-
-
Anders Carlsson authored
llvm-svn: 55583
-
Anders Carlsson authored
llvm-svn: 55580
-
- Aug 30, 2008
-
-
Anders Carlsson authored
Add CodeGenFunction::EmitMemSetToZero and make AggExprEmitter::EmitAggregateClear use it. llvm-svn: 55573
-
Anders Carlsson authored
llvm-svn: 55567
-
Daniel Dunbar authored
- Change Obj-C runtime message API, drop the ObjCMessageExpr arg in favor of just result type and selector. Necessary so it can be reused in situations where we don't want to cons up an ObjCMessageExpr. - Update aggregate binary assignment to know about special property ref lvalues. - Add CodeGenFunction::EmitCallArg overload which takes an already emitted rvalue. Add CodeGenFunction::StoreComplexIntoAddr. Disabled logic in Sema for parsing Objective-C dot-syntax that accesses methods. This code does not search in the correct order and the AST node has no way of properly representing its results. Updated StmtDumper to print a bit more information about ObjCPropertyRefExprs. llvm-svn: 55561
-
Daniel Dunbar authored
- Added CodeGenFunction::EmitCall which just takes the callee, return type, and a list of (Value*,QualType) pairs. - Added CodeGenFunction::EmitCallArg which handles emitting code for a call argument and turning it into an appropriate (Value*,QualType) pair. - Changed Objective-C runtime interface so that the actual emission of arguments for message sends is (once again) done in the code to emit a message send. No intended functionality change, this is prep work for better ABI support and for Objective-C property setter support. llvm-svn: 55560
-
- Aug 29, 2008
-
-
Daniel Dunbar authored
- Notably VLAs llvm-svn: 55544
-
Daniel Dunbar authored
Objective-C property references. - This handles property references "more correctly" but setters still don't work. llvm-svn: 55534
-
- Aug 28, 2008
-
-
Daniel Dunbar authored
- PR2727. Also, fix warning in CodeGenTypes for new BlockPointer type. llvm-svn: 55479
-
Daniel Dunbar authored
- Added ASTContext::getObjCEncodingForPropertyDecl. llvm-svn: 55461
-
- Aug 27, 2008
-
-
Daniel Dunbar authored
llvm-svn: 55410
-