| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.
Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.
Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.
llvm-svn: 181677
|
|
|
|
|
|
|
| |
For fun, I added a comedy "actually obey the C++11 POD rules" option
which nobody is allowed to use.
llvm-svn: 173744
|
|
|
|
|
|
|
|
| |
never key functions. We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.
llvm-svn: 173515
|
|
|
|
| |
llvm-svn: 173514
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
following:
sizeof=132, dsize=132, align=4
nvsize=132, nvalign=4
Is not indented, so when classes are nested there is no way to know to
which class it belongs.
Fix this problem by indenting the size summary properly for each class.
llvm-svn: 169654
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
|
|
|
|
|
|
|
| |
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/12582052>; test case in LLDB.
llvm-svn: 166824
|
|
|
|
|
|
| |
Patch by Jeremiah Zanin.
llvm-svn: 165849
|
|
|
|
| |
llvm-svn: 163983
|
|
|
|
| |
llvm-svn: 163325
|
|
|
|
|
|
| |
While there fix a dead assert.
llvm-svn: 163031
|
|
|
|
|
|
| |
instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.
llvm-svn: 163013
|
|
|
|
| |
llvm-svn: 161243
|
|
|
|
|
|
|
|
|
|
|
| |
By C++ standard, the vtable should be generated if the first non-inline
virtual function is defined in the TU. Current version of clang doesn't
generate vtable if the first virtual function is defaulted, because the
key function is regarded as the defaulted function.
Patch by Li Kan!
llvm-svn: 161236
|
|
|
|
|
|
|
|
| |
instead.
No functionality change.
llvm-svn: 159719
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
|
|
|
|
|
|
|
| |
working knowledge of the Microsoft ABI. Based on a patch by
Dmitry Sokolov.
llvm-svn: 155905
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.
This change errs on the side of value, making op-> return T* and op* return
T&.
(reviewed by Richard Smith)
llvm-svn: 155808
|
|
|
|
|
|
|
|
|
| |
the external source to complete the Decl if it
hasn't been completed already.
This fixes a crash in LLDB.
llvm-svn: 152807
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
| |
been completed yet, then complete it if possible.
This fixes some assertion failures encountered by
LLDB.
llvm-svn: 150020
|
|
|
|
|
|
|
| |
the alignment (because it's not encoded in DWARF). In this case, make
an educated guess at the alignment.
llvm-svn: 149161
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
provide the layout of records, rather than letting Clang compute
the layout itself. LLDB provides the motivation for this feature:
because various layout-altering attributes (packed, aligned, etc.)
don't get reliably get placed into DWARF, the record layouts computed
by LLDB from the reconstructed records differ from the actual layouts,
and badness occurs. This interface lets the DWARF data drive layout,
so we don't need the attributes preserved to get the answer write.
The testing methodology for this change is fun. I've introduced a
variant of -fdump-record-layouts called -fdump-record-layouts-simple
that always has the simple C format and provides size/alignment/field
offsets. There is also a -cc1 option -foverride-record-layout=<file>
to take the output of -fdump-record-layouts-simple and parse it to
produce a set of overridden layouts, which is introduced into the AST
via a testing-only ExternalASTSource (called
LayoutOverrideSource). Each test contains a number of records to lay
out, which use various layout-changing attributes, and then dumps the
layouts. We then run the test again, using the preprocessor to
eliminate the layout-changing attributes entirely (which would give us
different layouts for the records), but supplying the
previously-computed record layouts. Finally, we diff the layouts
produced from the two runs to be sure that they are identical.
Note that this code makes the assumption that we don't *have* to
provide the offsets of bases or virtual bases to get the layout right,
because the alignment attributes don't affect it. I believe this
assumption holds, but if it does not, we can extend
LayoutOverrideSource to also provide base offset information.
Fixes the Clang side of <rdar://problem/10169539>.
llvm-svn: 149055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.
Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.
Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.
Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.
llvm-svn: 148178
|
|
|
|
|
|
| |
Original message: Make sure adding a field to a struct never reduces its size. PR11745.
llvm-svn: 148070
|
|
|
|
| |
llvm-svn: 148068
|
|
|
|
| |
llvm-svn: 148056
|
|
|
|
|
|
| |
the definition of that class. Fixes PR11613 / <rdar://problem/10604077>.
llvm-svn: 146976
|
|
|
|
|
|
|
|
|
|
| |
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"
llvm-svn: 146679
|
|
|
|
|
|
|
| |
fields by just following what comment says.
// rdar://10513599
llvm-svn: 146414
|
|
|
|
|
|
| |
<rdar://problem/10494810> and PR9560.
llvm-svn: 145673
|
|
|
|
| |
llvm-svn: 145544
|
|
|
|
|
|
| |
Based on work by Dmitry Sokolov!
llvm-svn: 144072
|
|
|
|
|
|
| |
again.
llvm-svn: 143800
|
|
|
|
| |
llvm-svn: 143768
|
|
|
|
| |
llvm-svn: 142694
|
|
|
|
| |
llvm-svn: 142326
|
|
|
|
|
|
| |
doing this while I was trying to review his patch.
llvm-svn: 142325
|
|
|
|
|
|
|
|
| |
of a pointer.
Passing a pointer was a bad idea as it collides with the overload for void*.
llvm-svn: 141971
|
|
|
|
|
|
|
|
|
|
|
| |
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.
llvm-svn: 141561
|
|
|
|
|
|
|
| |
for better self-documenting code, since the semantics
are subtly different from getDefinition().
llvm-svn: 141355
|
|
|
|
|
|
|
|
| |
definition. Assert this. Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition. Fixes PR10912.
llvm-svn: 141350
|
|
|
|
|
|
|
| |
line options.
- <rdar://problem/10120602>, PR9631
llvm-svn: 141211
|
|
|
|
| |
llvm-svn: 141165
|
|
|
|
|
|
| |
Patch from r4start at gmail.com (with some minor modifications by me).
llvm-svn: 140623
|
|
|
|
|
|
| |
happen when RecordLayoutBuilder is used by Codegen, not Sema.
llvm-svn: 139162
|
|
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes cases where the anonymous bitfield is followed by a bitfield member.
E.g.,
struct t4
{
char foo;
long : 0;
char bar : 1;
};
rdar://9859156
llvm-svn: 136991
|
|
|
|
| |
llvm-svn: 136944
|
|
|
|
| |
llvm-svn: 136907
|