| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
These typically come from static data members of class template
specializations. This accomplishes two things:
1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1475
llvm-svn: 189051
|
|
|
|
|
|
|
|
|
|
| |
required as these types may never end up emitting the full class data
This might be able to be optimized further by only doing this in the
absence of a key function, but it doesn't look like GCC is doing that so
I'm not rushing to do it just yet.
llvm-svn: 189022
|
|
|
|
|
|
|
|
| |
more principled approach (the 'requires complete type' callback)
No functionality change intended.
llvm-svn: 189013
|
|
|
|
|
|
| |
This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.
llvm-svn: 189004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- nested lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware
As an example of what compiles:
template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};
auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');
Please see attached tests for more examples.
Some implementation notes:
- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters
- Augment AutoType's constructor (similar to how variadic
template-type-parameters ala TemplateTypeParmDecl are implemented) to
accept an IsParameterPack to encode a generic lambda parameter pack.
- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class
- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that Sema::ActOnLambdaAutoParameter may use it to create the
appropriate list of corresponding TemplateTypeParmDecl for each
auto parameter identified within the generic lambda (also stored
within the current LambdaScopeInfo). Additionally,
a TemplateParameterList data-member was added to hold the invented
TemplateParameterList AST node which will be much more useful
once we teach TreeTransform how to transform generic lambdas.
- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)
- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.
- Teach Sema::ActOnStartOfLambdaDefinition to set the
return type of a lambda without a trailing return type
to 'auto' in C++1y mode, and teach the return type
deduction machinery in SemaStmt.cpp to process either
C++11 and C++14 lambda's correctly depending on the flag.
- various tests were added - but much more will be needed.
A greatful thanks to all reviewers including Eli Friedman,
James Dennett and the ever illuminating Richard Smith. And
yet I am certain that I have allowed unidentified bugs to creep in;
bugs, that I will do my best to slay, once identified!
Thanks!
llvm-svn: 188977
|
|
|
|
|
|
| |
return types
llvm-svn: 188962
|
|
|
|
|
|
|
|
|
|
|
| |
With r185721, calling mangleCXXRTTIName on C code will cause crashes.
This commit fixes crashes on C testing cases when turning on struct-path TBAA.
For C code, we simply use the Decl name without the context. This can
cause two different structs having the same name, and may cause inaccurate but
conservative alias results.
llvm-svn: 188930
|
|
|
|
|
|
| |
CodeGenFunction::InitializeVTablePointer[s]
llvm-svn: 188909
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. We now print the return type of lambdas and return type deduced functions
as "auto". Trailing return types with decltype print the underlying type.
2. Use the lambda or block scope for the PredefinedExpr type instead of the
parent function. This fixes PR16946, a strange mismatch between type of the
expression and the actual result.
3. Verify the type in CodeGen.
4. The type for blocks is still wrong. They are numbered and the name is not
known until CodeGen.
llvm-svn: 188900
|
|
|
|
|
|
| |
implement them for -cxx-abi microsoft
llvm-svn: 188870
|
|
|
|
| |
llvm-svn: 188834
|
|
|
|
|
|
|
|
|
| |
and definition
Based on code review feedback from Eric Christopher (on r188739) and
Adrian Prantl (r188642).
llvm-svn: 188829
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes in TUs that do not have the vtable for that class""""
This reverts commit r188687 (reverts r188642 (reverts 188600 (reverts
188576))).
With added test coverage & fix for -gline-tables-only.
Thanks Michael Gottesman for reverting this patch when it demonstrated
problems & providing a reproduction/details to help me track this down.
llvm-svn: 188739
|
|
|
|
| |
llvm-svn: 188724
|
|
|
|
|
| |
Reviewer: Eli
llvm-svn: 188722
|
|
|
|
|
|
|
|
| |
Refactor the underlying code a bit to remove unnecessary calls to
"hasErrorOccurred" & make them consistently at all the entry points to
the IRGen ASTConsumer.
llvm-svn: 188707
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TUs that do not have the vtable for that class"""
This reverts commit r188642.
This change is causing LTO builds to cause our 16 GB machines to swap and OOM
all weekend. I am going to work with Dave Blaikie to resolve the issue.
Sorry Dave =(.
llvm-svn: 188687
|
|
|
|
| |
llvm-svn: 188672
|
|
|
|
|
|
| |
This is so aggregates can be passed as var args too.
llvm-svn: 188664
|
|
|
|
|
|
| |
parameters of artificial functions
llvm-svn: 188651
|
|
|
|
|
|
|
|
|
|
|
|
| |
do not have the vtable for that class""
This reverts commit r188600.
r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.
llvm-svn: 188642
|
|
|
|
|
|
|
|
|
|
|
|
| |
creating their context
A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).
There are other ways we could consider addressing this (see FIXME).
llvm-svn: 188640
|
|
|
|
|
|
|
|
|
| |
Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)
llvm-svn: 188639
|
|
|
|
|
|
|
|
|
|
| |
Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).
llvm-svn: 188622
|
|
|
|
|
|
| |
enumeration type
llvm-svn: 188612
|
|
|
|
|
|
|
|
| |
_mm256_broadcastsi128_si256 to align with the Intel documentation.
This fixes bug PR 16581 and rdar:14747994.
llvm-svn: 188609
|
|
|
|
|
|
|
|
|
|
| |
have the vtable for that class"
This reverts commit r188576.
Reverting while I investigate a selfhosting buildbot failure on Darwin.
llvm-svn: 188600
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the same name but different lines
Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.
llvm-svn: 188585
|
|
|
|
|
|
|
|
|
| |
vtable for that class
This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.
llvm-svn: 188576
|
|
|
|
|
|
|
| |
This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.
llvm-svn: 188575
|
|
|
|
|
|
| |
This change broke release+asserts build with compiler-rt.
llvm-svn: 188539
|
|
|
|
|
|
| |
result.
llvm-svn: 188501
|
|
|
|
| |
llvm-svn: 188500
|
|
|
|
|
|
| |
for future use
llvm-svn: 188498
|
|
|
|
| |
llvm-svn: 188496
|
|
|
|
| |
llvm-svn: 188494
|
|
|
|
|
|
|
|
|
| |
match the semantics
Rather than having a cast immediately inside the function, push that
type requirement out to the callers.
llvm-svn: 188492
|
|
|
|
|
|
|
| |
(the removed FIXME no longer applies since we made this debug info
optimization not apply to C)
llvm-svn: 188491
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than going through the whole getOrCreateType machinery to
manifest a type, cut straight to the implementation because we know we
have to do work.
While the previous implementation was sufficient for the two cases
(completeness and required completeness) we have already (the general
machinery could inspect the type for those attributes & go down the full
definition path), a pending change (to emit info for types when we emit
their vtables) won't have that luxury & we'll need to force the creation
rather than relying on the general purpose routine.
llvm-svn: 188486
|
|
|
|
|
|
|
| |
It still does only return DICompositeType, but I've no need to make that
change right now.
llvm-svn: 188482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We would crash in CodeGen::CodeGenModule::EmitUuidofInitializer
because our attempt to enter CodeGen::CodeGenModule::EmitConstantValue
will be foiled: the type of the constant value is incomplete.
Instead, create an unnamed type with the proper layout on all platforms.
Punt the problem of wrongly defined struct _GUID types to the user.
(It's impossible because the TU may never get to see the type and thus
we can't verify that it is suitable.)
This fixes PR16856.
Reviewers: rsmith, rnk, thakis
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1375
llvm-svn: 188481
|
|
|
|
|
|
| |
This happens in the caller a few frames up anyway.
llvm-svn: 188475
|
|
|
|
|
|
|
| |
No functionality change, at best a slight (questionable) optimization,
but necessary for correctness of future work.
llvm-svn: 188474
|
|
|
|
| |
llvm-svn: 188456
|
|
|
|
|
|
| |
and ACLE functions
llvm-svn: 188452
|
|
|
|
|
|
|
|
| |
Also add some documentation.
Differential Revision: http://llvm-reviews.chandlerc.com/D1346
llvm-svn: 188403
|
|
|
|
| |
llvm-svn: 188258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It seems that __uuidof introduces a global extern "C" declaration of
type __s_GUID. However, our implementation of __uuidof does not provide
such a declaration and thus must open-code the mangling for __uuidof in
template parameters.
This allows us to codegen scoped COM pointers and other such things.
This fixes PR16836.
Depends on D1356.
Reviewers: rnk, cdavis5x, rsmith
Reviewed By: rnk
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1357
llvm-svn: 188252
|
|
|
|
| |
llvm-svn: 188251
|
|
|
|
|
|
| |
info checking already in CreateType(RecordType)
llvm-svn: 188222
|