- Feb 01, 2010
-
-
Sebastian Redl authored
In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function. llvm-svn: 94999
-
Devang Patel authored
llvm-svn: 94991
-
- Jan 31, 2010
-
-
Eli Friedman authored
not quite sure what we want to do about the AST representation; comments welcome. llvm-svn: 94967
-
Eli Friedman authored
llvm-svn: 94965
-
Anders Carlsson authored
llvm-svn: 94964
-
Douglas Gregor authored
(necessarily simultaneous) changes: - CXXBaseOrMemberInitializer now contains only a single initializer rather than a set of initialiation arguments + a constructor. The single initializer covers all aspects of initialization, including constructor calls as necessary but also cleanup of temporaries created by the initializer (which we never handled before!). - Rework + simplify code generation for CXXBaseOrMemberInitializers, since we can now just emit the initializer as an initializer. - Switched base and member initialization over to the new initialization code (InitializationSequence), so that it - Improved diagnostics for the new initialization code when initializing bases and members, to match the diagnostics produced by the previous (special-purpose) code. - Simplify the representation of type-checked constructor initializers in templates; instead of keeping the fully-type-checked AST, which is rather hard to undo at template instantiation time, throw away the type-checked AST and store the raw expressions in the AST. This simplifies instantiation, but loses a little but of information in the AST. - When type-checking implicit base or member initializers within a dependent context, don't add the generated initializers into the AST, because they'll look like they were explicit. - Record in CXXConstructExpr when the constructor call is to initialize a base class, so that CodeGen does not have to infer it from context. This ensures that we call the right kind of constructor. There are also a few "opportunity" fixes here that were needed to not regress, for example: - Diagnose default-initialization of a const-qualified class that does not have a user-declared default constructor. We had this diagnostic specifically for bases and members, but missed it for variables. That's fixed now. - When defining the implicit constructors, destructor, and copy-assignment operator, set the CurContext to that constructor when we're defining the body. llvm-svn: 94952
-
Anders Carlsson authored
When performing a derived-to-base cast that we know will not change the offset, we don't need to null check the input pointer. Fixes PR5965. llvm-svn: 94942
-
Anders Carlsson authored
When doing a base-to-derived cast we don't need to null check the derived value if the class offset is 0. llvm-svn: 94939
-
Anders Carlsson authored
llvm-svn: 94938
-
- Jan 30, 2010
-
-
Anders Carlsson authored
llvm-svn: 94920
-
Anders Carlsson authored
llvm-svn: 94917
-
- Jan 29, 2010
-
-
Devang Patel authored
llvm-svn: 94849
-
Devang Patel authored
llvm-svn: 94817
-
Douglas Gregor authored
llvm-svn: 94811
-
Anders Carlsson authored
llvm-svn: 94800
-
Anders Carlsson authored
Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular). llvm-svn: 94799
-
Anders Carlsson authored
Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext). llvm-svn: 94798
-
Daniel Dunbar authored
the ABI spec, this turns out to simplify the code. We still have some annoying code which mismatches the spec with regard to empty structures. llvm-svn: 94796
-
Anders Carlsson authored
llvm-svn: 94791
-
Devang Patel authored
llvm-svn: 94760
-
- Jan 28, 2010
-
-
Devang Patel authored
llvm-svn: 94758
-
Devang Patel authored
llvm-svn: 94756
-
Devang Patel authored
llvm-svn: 94755
-
Anders Carlsson authored
llvm-svn: 94754
-
Devang Patel authored
llvm-svn: 94753
-
Devang Patel authored
llvm-svn: 94751
-
Devang Patel authored
llvm-svn: 94712
-
Devang Patel authored
llvm-svn: 94710
-
- Jan 27, 2010
-
-
Ken Dyck authored
now that the "InBytes" part of the name is implied by the return type, rename it to getDeclAlign(). llvm-svn: 94681
-
David Chisnall authored
Unique ObjC strings (GNU Runtime); fix for PR6142. Note: Doing this in the runtime-specific code is a bit ugly. It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code. llvm-svn: 94676
-
Anders Carlsson authored
Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094. llvm-svn: 94656
-
- Jan 26, 2010
-
-
Mike Stump authored
to the declaring class from the nearest virtual base class. WIP. llvm-svn: 94606
-
Mike Stump authored
to the declaring class from the nearest virtual base class. WIP. This fixes 40% of all the problems remaining in one of my testcases. llvm-svn: 94592
-
Ken Dyck authored
llvm-svn: 94579
-
Ken Dyck authored
that are in character units. llvm-svn: 94577
-
Ken Dyck authored
llvm-svn: 94571
-
Ken Dyck authored
llvm-svn: 94564
-
Ken Dyck authored
llvm-svn: 94563
-
Anders Carlsson authored
llvm-svn: 94555
-
Anders Carlsson authored
llvm-svn: 94554
-