summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Remove the DeclaredInCondition bit now that it's no longer used.Nick Lewycky2010-08-062-4/+0
| | | | llvm-svn: 110432
* Add an environment variable that makes libclang use chaining for PCH.Sebastian Redl2010-08-061-1/+3
| | | | llvm-svn: 110414
* Collect namespaces that need updating in a PCH chain. WIPSebastian Redl2010-08-051-0/+5
| | | | llvm-svn: 110378
* Write various C++-specific records to chained PCHs. Tests will come later.Sebastian Redl2010-08-052-22/+87
| | | | llvm-svn: 110357
* Store the pending implicit instantiations in the PCH and perform them at the ↵Argyrios Kyrtzidis2010-08-052-0/+35
| | | | | | | | end of the translation unit that included the PCH, as God intended. llvm-svn: 110324
* Support #pragma weak for PCH.Argyrios Kyrtzidis2010-08-052-0/+43
| | | | llvm-svn: 110323
* Make sure C++ variable definitions are actually passed to the consumer when ↵Argyrios Kyrtzidis2010-08-051-1/+2
| | | | | | loaded from PCH. llvm-svn: 110322
* Give clang_codeCompleteAt() an "options" parameter, and add a newDouglas Gregor2010-08-051-3/+11
| | | | | | | | | flags enumeration + default-generating function that allows code-completion to be customized via the libclang API. Plus, turn on spell-checking when performing code completion. llvm-svn: 110319
* Implement #pragma GCC visibility.Eli Friedman2010-08-052-1/+3
| | | | llvm-svn: 110315
* Activate selectors in chained PCH. Chained PCH now works for Objective-C.Sebastian Redl2010-08-041-1/+5
| | | | llvm-svn: 110262
* Bring stats for the method pool back.Sebastian Redl2010-08-042-11/+18
| | | | llvm-svn: 110247
* Implement per-file reading of the selector table. This disables statistics ↵Sebastian Redl2010-08-042-75/+83
| | | | | | about method pool hits for the moment. llvm-svn: 110245
* When chaining, only write interesting selectors to the PCH.Sebastian Redl2010-08-042-11/+47
| | | | llvm-svn: 110229
* Store the IDs of selectors in the PCH file explicitly.Sebastian Redl2010-08-042-33/+60
| | | | llvm-svn: 110219
* When performing in-process code completion, don't free the remappedDouglas Gregor2010-08-041-0/+1
| | | | | | | file buffers until the code completion results are destroyed; diagnostics may end up referring into the source. llvm-svn: 110216
* Add code-completion support directly to ASTUnit, which performs codeDouglas Gregor2010-08-042-33/+134
| | | | | | | | | | | | | | completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). llvm-svn: 110210
* When we try (but fail) to build a precompiled preamble, wait for aDouglas Gregor2010-08-041-8/+31
| | | | | | | | | short "cooling off" period (defaulting to 5 reparses) before trying to build a precompiled preamble again. Previously, if we failed to build the precompiled preamble at any time, we just gave up the whole charade any never tried again. llvm-svn: 110187
* Incomplete promotion of selector info to per-file data.Sebastian Redl2010-08-032-52/+40
| | | | | | Store all selectors in the selector hash table instead of only those from the method pool. llvm-svn: 110158
* When using a precompiled preamble, keep track of the top-levelDouglas Gregor2010-08-031-7/+47
| | | | | | | | | | declarations that we saw when creating the precompiled preamble, and provide those declarations in addition to the declarations parsed in the main source file when traversing top-level declarations. This makes the use of precompiled preambles a pure optimization, rather than changing the semantics of the parsed translation unit. llvm-svn: 110131
* PR7795: Fix the definition of __WCHAR_MAX__ with -fshort-wchar.Eli Friedman2010-08-031-1/+1
| | | | llvm-svn: 110126
* Apart from storing/retrieving the previous redeclaration from PCH, also ↵Argyrios Kyrtzidis2010-08-034-18/+144
| | | | | | | | | | | | 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
* Send AST dumping/printing to stdout instead of stderr.Argyrios Kyrtzidis2010-08-031-1/+1
| | | | llvm-svn: 110123
* Avoid writing a VTABLE_USES record in PCH if there are no entries.Argyrios Kyrtzidis2010-08-032-12/+16
| | | | llvm-svn: 110122
* fix some undefined behavior, PR7779.Chris Lattner2010-08-031-3/+4
| | | | llvm-svn: 110116
* Reshuffle the PCH generator action and consumer, so that we can re-useDouglas Gregor2010-08-033-41/+77
| | | | | | it while generating precompiled preambles. No functionality change. llvm-svn: 110108
* Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static ↵Ted Kremenek2010-08-031-0/+1
| | | | | | analysis) that doesn't prune CFG edges. llvm-svn: 110087
* Simplify global method pool implementation in Sema. No functionality change.Sebastian Redl2010-08-021-38/+5
| | | | llvm-svn: 110078
* When using a precompiled preamble, save the diagnostics produced whenDouglas Gregor2010-08-021-15/+41
| | | | | | | | creating the preamble and "replay" them when reusing the preamble. Also, fix a thinko in the copying of the preamble when building the precompiled preamble. llvm-svn: 110061
* Query only the latest version of an identifier in the PCH chain. Make sure ↵Sebastian Redl2010-08-022-22/+7
| | | | | | this version holds the entire declaration chain. This is a much saner solution than trying to merge the info from all elements, and makes redeclarations work properly. Expand the declarations test case to cover more compliated cases. llvm-svn: 110052
* Read/write in PCH Sema's StdNamespace and StdBadAlloc and use a LazyDeclPtr ↵Argyrios Kyrtzidis2010-08-022-0/+27
| | | | | | for them that will deserialize them when needed. llvm-svn: 110031
* Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by JonathanDaniel Dunbar2010-08-011-0/+8
| | | | | | Gray. llvm-svn: 109994
* Implement dependency analysis for the precompiled preamble. If any ofDouglas Gregor2010-07-311-14/+91
| | | | | | | the files in the precompiled preamble have changed since it was build, force the preamble to be rebuilt. llvm-svn: 109937
* Add some timers to ASTUnit that are only enabled when the LIBCLANG_TIMING ↵Douglas Gregor2010-07-301-15/+55
| | | | | | environment variable is set. llvm-svn: 109890
* Safely get a data pointer for vectors that might be empty.Sebastian Redl2010-07-301-6/+15
| | | | llvm-svn: 109867
* Refactor the way PCHReader tracks whether we are in recursive loading.Argyrios Kyrtzidis2010-07-302-22/+16
| | | | | | | | | | -Replace CurrentlyLoadingTypeOrDecl with a counting scheme (NumCurrentElementsDeserializing) -Provide outside access to the mechanism by adding methods StartedDeserializing/FinishedDeserializing to ExternalASTSource. These are preparation for the next commit. llvm-svn: 109856
* Make macro weirdness in chained PCH work. This required changing the way ↵Sebastian Redl2010-07-306-42/+76
| | | | | | PCHReader and PCHWriter are initialized to correctly pick up all initializer. On the upside, this means that there is far less repetition in the dependent PCH now. llvm-svn: 109823
* Change the name to something less terrible; suggestion by Doug. No ↵Argyrios Kyrtzidis2010-07-291-1/+1
| | | | | | functionality change. llvm-svn: 109797
* Implement PCH support for offsetof(base-specifier).Argyrios Kyrtzidis2010-07-292-5/+6
| | | | llvm-svn: 109785
* Merge PCHWriterDecl.cpp's isRequiredDecl and ↵Argyrios Kyrtzidis2010-07-291-52/+1
| | | | | | | | | | | | | | | CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar. This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext, thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen. This fixes current (and avoids future) codegen-from-PCH bugs. llvm-svn: 109784
* Store latest redeclaration for each redeclarable template declarationPeter Collingbourne2010-07-292-0/+7
| | | | | | | This patch adds a Latest field to RedeclarableTemplateDecl's CommonBase class which is used to store the latest redeclaration. llvm-svn: 109755
* Refactor redeclarable template declarationsPeter Collingbourne2010-07-292-37/+39
| | | | | | | | | | | This patch refactors much of the common code in ClassTemplateDecl and FunctionTemplateDecl into a common base class RedeclarableTemplateDecl together with support functions in a template class RedeclarableTemplate. The patch also includes similar refactoring for these classes' PCH reader and writer implementations. llvm-svn: 109754
* Turn off precompiled preamble support for C++Douglas Gregor2010-07-281-1/+2
| | | | llvm-svn: 109680
* Support extended vector types in chained PCH.Sebastian Redl2010-07-281-5/+6
| | | | llvm-svn: 109675
* Record macros in dependent PCHs. Also add various info tables to dependent ↵Sebastian Redl2010-07-272-9/+71
| | | | | | PCHs; tests for this to follow. llvm-svn: 109554
* Revert r109546, it broke linux build.Argyrios Kyrtzidis2010-07-271-2/+52
| | | | llvm-svn: 109550
* Merge PCHWriterDecl.cpp's isRequiredDecl and ↵Argyrios Kyrtzidis2010-07-271-52/+2
| | | | | | | | | | | | CodeGenModule::MayDeferGeneration into a new function, DeclIsRequiredFunctionOrFileScopedVar. This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes. This fixes current (and avoids future) codegen-from-PCH bugs. llvm-svn: 109546
* Update the list of lexical decls in the TU for chained PCHs. This makes ↵Sebastian Redl2010-07-273-5/+27
| | | | | | -ast-print show the decls from the dependent PCH. llvm-svn: 109524
* Fix use-after-free with precompiled preamblesDouglas Gregor2010-07-271-3/+9
| | | | llvm-svn: 109505
* Always deserialize from PCH file scoped variables with non trivial ↵Argyrios Kyrtzidis2010-07-271-0/+8
| | | | | | | | constructor/destructor. Fixes http://llvm.org/PR7692 llvm-svn: 109501
* PTH generation: Don't save the leading '#' token in a null directive. This ↵Ted Kremenek2010-07-271-4/+9
| | | | | | unbreaks using PTH with Boost (<rdar://problem/8227989>). llvm-svn: 109484
OpenPOWER on IntegriCloud