| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
EmitCXXConstructorCall instead.
llvm-svn: 102881
|
|
|
|
| |
llvm-svn: 102880
|
|
|
|
| |
llvm-svn: 102871
|
|
|
|
| |
llvm-svn: 102870
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
assignment operators.
Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.
This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:
- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.
This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.
Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.
llvm-svn: 102853
|
|
|
|
| |
llvm-svn: 102849
|
|
|
|
| |
llvm-svn: 102848
|
|
|
|
| |
llvm-svn: 102846
|
|
|
|
| |
llvm-svn: 102845
|
|
|
|
|
|
| |
initialize the bases.
llvm-svn: 102842
|
|
|
|
| |
llvm-svn: 102747
|
|
|
|
|
|
|
|
|
| |
a class with virtual bases. Just a patch until Sema starts (correctly) doing
most of this analysis.
Fixes PR 6622.
llvm-svn: 102692
|
|
|
|
| |
llvm-svn: 102676
|
|
|
|
| |
llvm-svn: 102674
|
|
|
|
| |
llvm-svn: 102293
|
|
|
|
| |
llvm-svn: 102289
|
|
|
|
| |
llvm-svn: 102286
|
|
|
|
| |
llvm-svn: 102285
|
|
|
|
|
|
| |
GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases.
llvm-svn: 102284
|
|
|
|
| |
llvm-svn: 102282
|
|
|
|
| |
llvm-svn: 102281
|
|
|
|
|
|
| |
implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now).
llvm-svn: 102279
|
|
|
|
| |
llvm-svn: 102275
|
|
|
|
|
|
| |
use the new version.
llvm-svn: 102274
|
|
|
|
| |
llvm-svn: 102273
|
|
|
|
| |
llvm-svn: 102272
|
|
|
|
|
|
| |
for derived-to-base casts.
llvm-svn: 102270
|
|
|
|
| |
llvm-svn: 102007
|
|
|
|
| |
llvm-svn: 101921
|
|
|
|
|
|
| |
we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base.
llvm-svn: 101911
|
|
|
|
|
|
| |
function.
llvm-svn: 101909
|
|
|
|
|
|
| |
functionality change right now.
llvm-svn: 101872
|
|
|
|
|
|
| |
CodeGenFunction::GetAddressOfBaseClass is not ambiguous.
llvm-svn: 101869
|
|
|
|
|
|
|
|
| |
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
|
|
|
|
|
|
| |
initializes a virtual base or not.
llvm-svn: 101004
|
|
|
|
|
|
|
|
| |
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920
|
|
|
|
| |
llvm-svn: 99869
|
|
|
|
|
|
| |
as seen in PR6628 but for arrays this time.
llvm-svn: 99867
|
|
|
|
| |
llvm-svn: 99866
|
|
|
|
|
|
| |
temporaries code.
llvm-svn: 99865
|
|
|
|
|
|
| |
when synthesizing a copy constructor. Fixes PR6628.
llvm-svn: 99864
|
|
|
|
|
|
| |
verified that clang bootstraps with this.
llvm-svn: 99800
|
|
|
|
| |
llvm-svn: 99798
|
|
|
|
| |
llvm-svn: 99791
|
|
|
|
|
|
| |
vtable.
llvm-svn: 99790
|
|
|
|
|
|
| |
-fdump-vtable-layouts since it doesn't work 100% yet :)
llvm-svn: 99787
|
|
|
|
|
|
| |
pointer for all bases, even those without a vtable pointer :)
llvm-svn: 99777
|
|
|
|
| |
llvm-svn: 99776
|
|
|
|
|
|
| |
vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.
llvm-svn: 99775
|
|
|
|
| |
llvm-svn: 99773
|