- Jun 20, 2016
-
-
Vassil Vassilev authored
Handles the cases where old __va_list_tag is coming from a module and the new is not, needing an update record. Fixes https://llvm.org/bugs/show_bug.cgi?id=27890 Patch by Cristina Cristescu, Richard Smith and me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273159 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 31, 2016
-
-
Manman Ren authored
When we import a module that defines a builtin identifier from prefix header and precompile the prefix header, the macro information related to the identifier is lost. If we don't precompile the prefix header, the source file can still see the macro information. The reason is that we write out the identifier in the pch but not the macro information since the macro is not defined locally. This is related to r251565. In that commit, if we read a builtin identifier from a module that wasn't "interesting" to that module, we will still write it out to a PCH that imports that module. The fix is to write exported module macros for PCH as well. rdar://24666630 Differential Revision: http://reviews.llvm.org/D20383 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271310 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 13, 2016
-
-
Richard Smith authored
a base class via a using-declaration. If a class has a using-declaration declaring either a constructor or an assignment operator, eagerly declare its special members in case they need to displace a shadow declaration from a using-declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269398 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 09, 2016
-
-
Dmitry Polukhin authored
Support OpenMP version 4.5 syntax for #pragma omp declare target. Syntax: #pragma omp declare target (extended-list) new-line or #pragma omp declare target clause[ [,] clause ... ] new-line Where clause is one of the following: to(extended-list) link(list) Differential Revision: http://reviews.llvm.org/D20011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268925 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 29, 2016
-
-
Manman Ren authored
a selector, the entry should be complete, containing everything introduced by that module and all modules it imports. Before writing out the method pool of a module, we sync up the out of date selectors by pulling in methods for the selectors, from all modules it imports. In ReadMethodPool, after pulling in the method pool entry for module A, this lets us skip the modules that module A imports. rdar://problem/25900131 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268091 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 28, 2016
-
-
Vassil Vassilev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267882 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 27, 2016
-
-
Nico Weber authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267744 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
The Decl::isUsed has a value for every decl. In non-module builds it is very difficult (but possible) to break this invariant but when we walk up the redecl chain we find the neccessary information. When deserializing the decls from a module it is much more difficult to update correctly this invariant. The patch centralizes the information whether a decl is used in the canonical decl marking the entire entity as being used. Fixes https://llvm.org/bugs/show_bug.cgi?id=27401 Patch by Cristina Cristescu and me. Thanks to Richard Smith who helped to debug and understand the issue! Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267691 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
table for a module / PCH, never map from a normal declaration of a class to an injected-class-name declaration (or vice versa). Those declarations live in distinct lookup tables and should not be confused. We really shouldn't be using a CXXRecordDecl to represent an injected-class-name in the first place; I've filed PR27532 so we don't forget. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267632 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 18, 2016
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266687 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 14, 2016
-
-
Richard Smith authored
an offset from the current record rather than as an absolute bit number. This gives a minor .pcm file size reduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266269 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
a table entry in the corresponding decl, store an offset from the current record to the relevant CXX_BASE_SPECIFIERS record. This results in fewer indirections and a minor .pcm file size reduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266266 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 13, 2016
-
-
Richard Smith authored
of a table entry in the corresponding decl, store an offset from the current record to the relevant CXX_CTOR_INITIALIZERS record. This results in fewer indirections and a minor .pcm file size reduction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266254 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
[modules] Add some missing blockinfo records. No functionality change except to llvm-bcanalyzer output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266176 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
[modules] Refactor handling of cases where we write an offset to a prior record into the bitstream and simplify a little, in preparation for doing this in more cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266160 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 08, 2016
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265857 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 06, 2016
-
-
Vassil Vassilev authored
Fixes https://llvm.org/bugs/show_bug.cgi?id=27186 Patch reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265597 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
ASTWriter."), reverted in r265526, with a fix for an iterator invalidation bug (thanks, MSan!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265564 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dmitry Polukhin authored
Add parsing, sema analysis for 'declare target' construct for OpenMP 4.0 (4.5 support will be added in separate patch). The declare target directive specifies that variables, functions (C, C++ and Fortran), and subroutines (Fortran) are mapped to a device. The declare target directive is a declarative directive. In Clang declare target is implemented as implicit attribute for the declaration. The syntax of the declare target directive is as follows: #pragma omp declare target declarations-definition-seq #pragma omp end declare target Based on patch from Michael Wong http://reviews.llvm.org/D15321 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265530 91177308-0d34-0410-b5e6-96231b3b80d8
-
Dmitry Polukhin authored
This reverts commit r265518. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265526 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265518 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 02, 2016
-
-
Richard Smith authored
a separate class. The goal is for this class to have a separate lifetime from the AST writer so that it can meaningfully track pending statement nodes and context for more compact encoding of various types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265195 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 30, 2016
-
-
Vassil Vassilev authored
In some cases a slot for an identifier is requested but it gets written to another module, causing an assertion. At the point when we start serializing Rtypes, we have no imported IdentifierID for float_round_style. We start serializing stuff and allocate an ID for it. Then, during the serialization process, we pull in the identifier info for it from TSchemaHelper. Finally, WriteIdentifierTable decides that the identifier has not changed since it was deserialized, so doesn't emit it. Fixes https://llvm.org/bugs/show_bug.cgi?id=27041 Discussed on IRC with Richard Smith. Agreed on post commit review if needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264913 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 27, 2016
-
-
Richard Smith authored
bit from the top bit to the bottom bit, so that we don't need 6 VBR6 hunks for each macro location. Reduces libstdc++ module size by about 1%. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264540 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264533 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 21, 2016
-
-
Faisal Vali authored
Implement lambda capture of *this by copy. For e.g.: struct A { int d = 10; auto foo() { return [*this] (auto a) mutable { d+=a; return d; }; } }; auto L = A{}.foo(); // A{}'s lifetime is gone. // Below is still ok, because *this was captured by value. assert(L(10) == 20); assert(L(100) == 120); If the capture was implicit, or [this] (i.e. *this was captured by reference), this code would be otherwise undefined. Implementation Strategy: - amend the parser to accept *this in the lambda introducer - add a new king of capture LCK_StarThis - teach Sema::CheckCXXThisCapture to handle by copy captures of the enclosing object (i.e. *this) - when CheckCXXThisCapture does capture by copy, the corresponding initializer expression for the closure's data member direct-initializes it thus making a copy of '*this'. - in codegen, when assigning to CXXThisValue, if *this was captured by copy, make sure it points to the corresponding field member, and not, unlike when captured by reference, what the field member points to. - mark feature as implemented in svn Much gratitude to Richard Smith for his carefully illuminating reviews! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263921 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 16, 2016
-
-
Vassil Vassilev authored
When clang adds argument dependent lookup candidates, it can perform template instantiation. For example, it can instantiate a templated friend function and register it in the enclosing namespace's lookup table. Fixes https://llvm.org/bugs/show_bug.cgi?id=24954 Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263634 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 03, 2016
-
-
Nico Weber authored
Like r262539, but for pointers_to_members. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262552 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
pragma ms_struct has an effect on struct decls, and the effect is serialized correctly already. But the "is ms_struct currently on" state wasn't before this change. This uses the same approach as `pragma clang optimize`: When writing a module, the state isn't serialized, only when writing a pch file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262539 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 01, 2016
-
-
John McCall authored
to allow arbitrary data to be associated with a parameter. Also, fix a bug where we apparently haven't been serializing this information for the last N years. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262278 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 24, 2016
-
-
Nico Weber authored
r261297 called hasUserProvidedDefaultConstructor() to check if defining a const object is ok. This is incorrect for this example: struct X { template<typename ...T> X(T...); int n; }; const X x; // formerly OK, now bogus error Instead, track if a class has a defaulted default constructor, and disallow a const object for classes that either have defaulted default constructors or if they need an implicit constructor. Bug report and fix approach by Richard Smith, thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261770 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 19, 2016
-
-
Nico Weber authored
C++11 requires const objects to have a user-provided constructor, even for classes without any fields. DR 253 relaxes this to say "If the implicit default constructor initializes all subobjects, no initializer should be required." clang is currently the only compiler that implements this C++11 rule, and e.g. libstdc++ relies on something like DR 253 to compile in newer versions. This change makes it possible to build code that says `const vector<int> v;' again when using libstdc++5.2 and _GLIBCXX_DEBUG (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60284). Fixes PR23381. http://reviews.llvm.org/D16552 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261297 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 06, 2016
-
-
Richard Smith authored
[modules] Compress files embedded into a .pcm file, to reduce the disk usage of -fembed-all-files mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259976 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 05, 2016
-
-
Richard Smith authored
name lookup information have changed since deserialization. For a C++ modules build, we do not need to re-emit the identifier into the serialized identifier table if only the name lookup information has changed (and in all cases, we don't need to re-emit the macro information if only the name lookup information has changed). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259901 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 04, 2016
-
-
Ben Langmuir authored
Per review feedback the name was wrong and it can be used outside Objective-C. Unfortunately, making the internal struct visible broke some ASTMatchers tests that assumed that the first record decl would be from user code, rather than a builtin type. I'm worried that this will also affect users' code. So this patch adds a typedef to wrap the internal struct and only makes the typedef visible to namelookup. This is sufficient to allow the ASTReader to merge the decls we need without making the struct itself visible. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259734 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 03, 2016
-
-
Quentin Colombet authored
Original message: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259721 91177308-0d34-0410-b5e6-96231b3b80d8
-
Quentin Colombet authored
This breaks some internal bots in stage2: clang seg fault. Looking with Ben to see what is going on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259715 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ben Langmuir authored
The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259624 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 09, 2016
-
-
Xiuli Pan authored
Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257254 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 06, 2016
-
-
John McCall authored
By storing the instantiated expression back in the ParmVarDecl, we remove the last need for separately storing the sub-expression of a CXXDefaultArgExpr. This makes PCH/Modules merging quite simple: CXXDefaultArgExpr records are serialized as references to the ParmVarDecl, and we ignore redundant attempts to overwrite the instantiated expression. This has some extremely marginal impact on user-facing semantics. However, the major effect is that it avoids IRGen errors about conflicting definitions due to lambdas in the argument being instantiated multiple times while sharing the same mangling. It should also slightly improve memory usage and module file size. rdar://23810407 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256983 91177308-0d34-0410-b5e6-96231b3b80d8
-