| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Providing linkage name for function static variable confuses gdb, so don't do that.
llvm-svn: 103779
|
| |
|
|
|
|
| |
correctly.
llvm-svn: 103771
|
| |
|
|
| |
llvm-svn: 103761
|
| |
|
|
|
|
| |
This fixes bunch of failures in gdb testsuite.
llvm-svn: 103745
|
| |
|
|
|
|
|
|
|
|
|
|
| |
methods for which the key function is guaranteed to be in another
translation unit. Unfortunately, this guarantee isn't the case when
dealing with shared libraries that fail to export these virtual method
definitions.
I'm reopening PR6747 so we can consider this again at a later point in
time.
llvm-svn: 103741
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.
The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).
From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).
Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.
Fixes PR7114 and PR6564.
llvm-svn: 103718
|
| |
|
|
|
|
|
|
|
| |
This fixes recent regressions reported by gdb testsuite.
Tighter verification of debug info generated by FE found these regressions.
Refactor code to extract line number and column number from SourceLocation.
llvm-svn: 103678
|
| |
|
|
|
|
| |
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.
llvm-svn: 103533
|
| |
|
|
| |
llvm-svn: 103517
|
| |
|
|
|
|
| |
- Fixes PR7098.
llvm-svn: 103514
|
| |
|
|
| |
llvm-svn: 103484
|
| |
|
|
| |
llvm-svn: 103475
|
| |
|
|
| |
llvm-svn: 103448
|
| |
|
|
|
|
|
| |
reference dot-syntax notation in a varierty of cases.
Fixes radar 7964490.
llvm-svn: 103440
|
| |
|
|
|
|
| |
This fixes radar 7959934.
llvm-svn: 103408
|
| |
|
|
| |
llvm-svn: 103368
|
| |
|
|
| |
llvm-svn: 103355
|
| |
|
|
|
|
| |
in the generated bitcode.
llvm-svn: 103353
|
| |
|
|
|
|
|
|
|
| |
variable.
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.
llvm-svn: 103320
|
| |
|
|
| |
llvm-svn: 103280
|
| |
|
|
|
|
| |
a property of a c++ class object (radar 7957369).
llvm-svn: 103279
|
| |
|
|
| |
llvm-svn: 103273
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
available_externally linkage, since they may not have been given a
strong definition in another translation unit. Without this patch, the
following test case fails to link with a GCC-compiled libstdc++:
#include <sstream>
int main() { std::basic_stringbuf<char> bs; }
Fixes the last problem with the Boost.IO library.
llvm-svn: 103208
|
| |
|
|
| |
llvm-svn: 103204
|
| |
|
|
|
|
|
| |
us to find local variables, too. Fixes the last remaining
Boost.Rational failure.
llvm-svn: 103203
|
| |
|
|
|
|
| |
C++ object properties. (still radar 7468090).
llvm-svn: 103182
|
| |
|
|
|
|
| |
fixing PR7063.
llvm-svn: 103171
|
| |
|
|
|
|
| |
in the near future.
llvm-svn: 103169
|
| |
|
|
| |
llvm-svn: 103168
|
| |
|
|
|
|
|
| |
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.
llvm-svn: 103166
|
| |
|
|
|
|
| |
picking a more consistent pattern.
llvm-svn: 103142
|
| |
|
|
|
|
|
|
|
| |
function attributes like byval get applied to the function
definition. This fixes PR7058 and makes i386 llvm/clang bootstrap
pass all the same tests as x86-64 bootstrap for me (the llvmc
tests still fail in both).
llvm-svn: 103131
|
| |
|
|
|
|
|
| |
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).
llvm-svn: 103123
|
| |
|
|
|
|
|
|
| |
reference type, make sure that the initializer we build is the
of the appropriate type for the *reference*, not for the thing that it
refers to. Fixes PR7050.
llvm-svn: 103115
|
| |
|
|
|
|
|
|
| |
destructors, place the __cxa_atexit call after the __cxa_guard_release
call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging
something related.
llvm-svn: 103088
|
| |
|
|
|
|
|
| |
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.
llvm-svn: 103087
|
| |
|
|
|
|
|
| |
whitespace which makes this patch unreadable. Will recommit without the
whitespace.
llvm-svn: 103086
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.
The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.
However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:
struct A { A(const A&); };
struct B {
A array[2][3];
};
then we generate an implicit copy assignment operator for B that looks
something like this:
B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }
CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.
Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.
Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.
llvm-svn: 103079
|
| |
|
|
| |
llvm-svn: 103078
|
| |
|
|
| |
llvm-svn: 103077
|
| |
|
|
| |
llvm-svn: 103072
|
| |
|
|
|
|
|
|
| |
they're unreachable. This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't. Fixes PR7044.
llvm-svn: 103052
|
| |
|
|
| |
llvm-svn: 103028
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
typedef int functype(int, int);
functype func;
also instantiate the synthesized function parameters for the resulting
function declaration.
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025
|
| |
|
|
|
|
| |
(radar 7495203).
llvm-svn: 103022
|
| |
|
|
|
|
|
|
|
| |
not just the inner expression. This is important if the expression has any
temporaries. Fixes PR 7028.
Basically a symptom of really tragic method names.
llvm-svn: 102998
|
| |
|
|
|
|
|
| |
variabe. Blocks and their construction/destruction is
wip though.
llvm-svn: 102985
|
| |
|
|
|
|
| |
variable. Surprisingly, this does seem to be the right way to solve this.
llvm-svn: 102961
|
| |
|
|
|
|
|
| |
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.
llvm-svn: 102942
|
| |
|
|
|
|
| |
pointer width instead of hardcoding for 64-bit.
llvm-svn: 102921
|