| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Previously designated anonymous fields were found via name lookup. This redesign uses the fact that an IndirectFieldDecl declaration will always follow an anonymous implicit field to remove the special case of name lookup.
llvm-svn: 122387
|
|
|
|
|
|
|
| |
information caused token-annotation to fail in funny ways. Fixes
<rdar://problem/8595386>.
llvm-svn: 122338
|
|
|
|
|
|
|
| |
don't provide their own explicit visibility attributes should get them
from the template. Fixes rdar://problem/8778497.
llvm-svn: 122136
|
|
|
|
|
|
|
|
|
|
|
| |
visibility. Fixes PR8713.
I've disabled a test which was testing that you can #pragma pop visibility
to get out of a namespace's visibility attribute. We should probably just
diagnose that as an error unless it's instrumental to someone's system
headers.
llvm-svn: 121459
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"inline", we weren't giving the definition weak linkage because the
"inline" bit wasn't propagated. This was a longstanding FIXME that,
somehow, hadn't triggered a bug in the wild. Fix this problem by
tracking whether any declaration was marked "inline", and clean up the
semantics of GNU's "extern inline" semantics calculation based on this
change.
Fixes <rdar://problem/8740363>.
llvm-svn: 121373
|
|
|
|
|
|
| |
unsigned integer" warnings.
llvm-svn: 121143
|
|
|
|
|
|
| |
introduced in r121023.
llvm-svn: 121025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:
- Linkage is a language concept, and is evaluated many times during
semantic analysis and codegen, while visibility is only a
code-generation concept that is evaluated only once per (unique)
declaration. Hence, we *must* optimize linkage calculations but
don't need to optimize visibility computation.
- Once we know the linkage of a declaration, subsequent
redeclarations can't change that linkage. Hence, cache
invalidation is far simpler than for visibility, where a later
redeclaration can completely change the visibility.
- We have 3 spare bits in Decl to store the linkage cache, so the
cache doesn't increase the size of declarations. With the
visibility+linkage cache, NamedDecl got larger.
llvm-svn: 121023
|
|
|
|
|
|
|
|
|
| |
and visibility of declarations, because it was extremely messy and it
increased the size of NamedDecl.
An improved implementation is forthcoming.
llvm-svn: 121012
|
|
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
|
|
|
| |
llvm-svn: 120897
|
|
|
|
| |
llvm-svn: 120828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations.
The motivation for this patch is that linkage/visibility computations
are linear in the number of redeclarations of an entity, and we've run
into a case where a single translation unit has > 6500 redeclarations
of the same (unused!) external variable. Since each redeclaration
involves a linkage check, the resulting quadratic behavior makes Clang
slow to a crawl. With this change, a simple test with 512
redeclarations of a variable syntax-checks ~20x faster than
before.
That said, I hate this change, and will probably end up reverting it
in a few hours. Reasons to hate it:
- It makes NamedDecl larger, since we don't have enough free bits in
Decl to squeeze in the extra information about caching.
- There are way too many places where we need to invalidate this
cache, because the visibility of a declaration can change due to
redeclarations (!). Despite self-hosting and passing the testsuite,
I have no confidence that I've found all of places where this cache
needs to be invalidated.
llvm-svn: 120808
|
|
|
|
|
|
| |
- Negative ChainingSize doesn't make sense, make it unsigned.
llvm-svn: 119943
|
|
|
|
|
|
|
|
|
|
|
| |
A new AST node is introduced:
def IndirectField : DDecl<Value>;
IndirectFields are injected into the anonymous's parent scope and chain back to
the original field. Name lookup for anonymous entities now result in an
IndirectFieldDecl instead of a FieldDecl.
There is no functionality change, the code generated should be the same.
llvm-svn: 119919
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.
But don't get too excited about that happening now.
llvm-svn: 118385
|
|
|
|
| |
llvm-svn: 118293
|
|
|
|
|
|
| |
check that the TargetNestedNameDecl is the same first.
llvm-svn: 118239
|
|
|
|
| |
llvm-svn: 118034
|
|
|
|
|
|
|
| |
with their own explicit visibility attributes. Basically we only want to
apply a single visibility attribute from any particular ancestry.
llvm-svn: 117998
|
|
|
|
|
|
|
|
| |
isInlined() just gives meaningless results for non-definitions.
Fixes rdar://problem/8614470
llvm-svn: 117887
|
|
|
|
|
|
|
|
|
|
| |
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.
More of rdar://problem/8613093
llvm-svn: 117781
|
|
|
|
|
|
|
|
| |
whether it's a declaration or not, then ignores that information for
declarations unless it was explicitly given. It's not totally clear
how that should be mapped into a sane system, but make an effort.
llvm-svn: 117780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for namespace-scope variable declarations.
Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.
Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.
llvm-svn: 117729
|
|
|
|
|
|
| |
declared", it breaks things.
llvm-svn: 117653
|
|
|
|
|
|
|
|
|
|
|
|
| |
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.
Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.
llvm-svn: 117644
|
|
|
|
|
|
|
| |
of its context without considering global settings like -fvisibility=hidden.
Fixes PR8492.
llvm-svn: 117628
|
|
|
|
|
|
| |
Part 2 of rdar://problem/8595231
llvm-svn: 117567
|
|
|
|
|
|
| |
and it's too much trouble to push for. Fixes PR8478.
llvm-svn: 117532
|
|
|
|
|
|
|
|
| |
attribute.
Part of rdar://problem/8595231
llvm-svn: 117526
|
|
|
|
|
|
| |
type-based visibility.
llvm-svn: 117500
|
|
|
|
|
|
| |
eliminate some excessive recursion and deserialization.
llvm-svn: 117476
|
|
|
|
|
|
|
|
|
|
|
| |
- tags with C linkage should ignore visibility=hidden
- functions and variables with explicit visibility attributes should
ignore the linkage of their types
Either of these should be sufficient to fix PR8457.
Also, FileCheck-ize a test case.
llvm-svn: 117351
|
|
|
|
|
|
|
|
|
| |
completed.
In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.
llvm-svn: 117239
|
|
|
|
|
|
|
|
| |
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.
llvm-svn: 117147
|
|
|
|
|
|
|
|
|
| |
redeclarations of main appropriately rather than allowing it to be
overloaded. Also, disallowing declaring main as a template.
Fixes GCC DejaGNU g++.old-deja/g++.other/main1.C.
llvm-svn: 117029
|
|
|
|
| |
llvm-svn: 116866
|
|
|
|
|
|
| |
failures.
llvm-svn: 116859
|
|
|
|
|
|
| |
decl directly without iterating over the redeclarations.
llvm-svn: 116837
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iterate over them,
instead of deserializing the complete declaration context of the record.
Iterating over the fields of a record is very common (e.g to determine the layout), unfortunately we needlessly deserialize every declaration
that the declaration context of the record contains; this can be bad for large C++ classes that contain a lot of methods.
Fix this by allow deserialization of just the fields when we want to iterate over them.
Progress for rdar://7260160.
llvm-svn: 116507
|
|
|
|
|
|
| |
bit by me).
llvm-svn: 116122
|
|
|
|
|
|
| |
CXXRecordDecl::DefinitionData, rather than having Sema mark the bit.
llvm-svn: 114993
|
|
|
|
|
|
|
|
|
| |
Another beating by boost in this test case: http://llvm.org/PR8117
A function specialization wasn't properly initialized if it wasn't canonical.
I wish there was a nice little test case but this was boost.
llvm-svn: 113481
|
|
|
|
|
|
|
|
|
|
|
| |
PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099
Fix issues like:
-When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing.
-In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl()
-In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else.
llvm-svn: 113391
|
|
|
|
|
|
| |
it did not include the initializer expression.
llvm-svn: 112739
|
|
|
|
|
|
| |
semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.
llvm-svn: 112563
|
|
|
|
|
|
| |
This lets us remove Sema.h's dependency on Expr.h and Decl.h.
llvm-svn: 112156
|
|
|
|
| |
llvm-svn: 111238
|
|
|
|
|
|
| |
instantiated with unique-external parameters.
llvm-svn: 111012
|
|
|
|
| |
llvm-svn: 110860
|