Commit Graph

21 Commits

Author SHA1 Message Date
Richard Smith 5205a8cfd8 Don't eagerly deserialize every templated function (and every static data
member inside a class template) when loading a PCH file or module.

llvm-svn: 178496
2013-04-01 20:22:16 +00:00
Argyrios Kyrtzidis 83a6e3bfab [PCH] Deserializing the DeclContext of a template parameter is not safe
until recursive loading is finished.

Otherwise we may end up with a template trying to deserialize a template
parameter that is in the process of getting loaded.

rdar://13135282

llvm-svn: 175329
2013-02-16 00:48:59 +00:00
Andy Gibbs c6e68daac0 Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
llvm-svn: 166280
2012-10-19 12:44:48 +00:00
Richard Smith b15fe3a5e4 PR13811: Add a FunctionParmPackExpr node to handle references to function
parameter packs where the reference is not being expanded but the pack has
been. Previously, Clang would segfault in such cases.

llvm-svn: 163672
2012-09-12 00:56:43 +00:00
Douglas Gregor 9f21889a7d Canonicalize the declaration we write to a PCH file for an
InjectedClassNameType; otherwise, it won't be properly wired to the
original (canonical) declaration when it is deserialized. Fixes
<rdar://problem/11112464>.

llvm-svn: 153442
2012-03-26 15:52:37 +00:00
Anders Carlsson 80756f6240 When serializing a DeclRefExpr, always store the number of explicit template
arguments at the same offset, since it's needed when creating the empty
DeclRefExpr when deserializing. Fixes a memory corruption issue that would lead
to random bugs and crashes.

llvm-svn: 127125
2011-03-06 18:19:42 +00:00
Anders Carlsson 6774b1f1c1 Add -fcxx-exceptions to all tests that use C++ exceptions.
llvm-svn: 126599
2011-02-28 00:40:07 +00:00
Anders Carlsson 479d6f51e3 Pass -fexceptions to all tests that use try/catch/throw.
llvm-svn: 126037
2011-02-19 19:23:03 +00:00
Douglas Gregor 87866ceda7 Implement proper (de-)serialization for explicit template argument
lists with zero template arguments. Fixes some seriously scary
crashers in C++ PCH.

llvm-svn: 124862
2011-02-04 12:01:24 +00:00
Douglas Gregor d4c5ed038c Make the deserialization of C++ base class specifiers lazy, improving
the performance of C++ PCH and reducing stack depth in the reader.

llvm-svn: 117732
2010-10-29 22:39:52 +00:00
Douglas Gregor f86c939bff When de-serializing a type that is supposed to be canonical, call
getCanonicalType() to make sure that the type we got back is actually
canonical. This is the case for most types, which always build a
canonical type when given canonical components. However, some types that
involve expressions in their canonicalization (e.g., array types with
dependent sizes) don't always build canonical types from canonical
components, because there is no such thing as a "canonical"
expression. Therefore, we do this extra mapping to ensure that the
canonical types we store are actually canonical.

llvm-svn: 117344
2010-10-26 00:51:02 +00:00
Argyrios Kyrtzidis d05f3e3730 Fix a C++ PCH problem which was exposed by r113019. CXXBaseOrMemberInitializer's IsWritten and source order is not set.
llvm-svn: 113161
2010-09-06 19:04:27 +00:00
Daniel Dunbar 4c60857426 tests: Avoid unnecessary redirection.
llvm-svn: 110709
2010-08-10 19:33:56 +00:00
Argyrios Kyrtzidis 7f76d11dcc Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
included the PCH, as God intended.

llvm-svn: 110324
2010-08-05 09:48:16 +00:00
Argyrios Kyrtzidis 839bbacfb2 Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
redeclaration. That way we are sure that the full redeclarations chain is loaded.

When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.

llvm-svn: 110125
2010-08-03 17:30:10 +00:00
Argyrios Kyrtzidis b1d38e3f4a Support NonTypeTemplateParmDecl for PCH.
llvm-svn: 106860
2010-06-25 16:25:09 +00:00
Argyrios Kyrtzidis bfcacee9b3 Support a couple more C++ Exprs for PCH.
llvm-svn: 106727
2010-06-24 08:57:31 +00:00
Argyrios Kyrtzidis 818c5db054 Support C++ class template specializations and partial specializations for PCH.
llvm-svn: 106625
2010-06-23 13:48:30 +00:00
Argyrios Kyrtzidis 69da4a8f07 Support emitting/reading function templates to/from PCH.
llvm-svn: 106534
2010-06-22 09:55:07 +00:00
Argyrios Kyrtzidis 26b72453f7 Include a hack to allow loading of templated CXXRecordDecls and test template reading from PCH.
llvm-svn: 106393
2010-06-19 19:29:21 +00:00
Argyrios Kyrtzidis 106caf92cd Initial support for writing templates to PCH.
llvm-svn: 106391
2010-06-19 19:28:53 +00:00