summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/MultiplexConsumer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Codegen for threadprivate variablesAlexey Bataev2014-11-111-0/+6
| | | | | | | | | For all threadprivate variables which have constructor/destructor emit call to void __kmpc_threadprivate_register(ident_t * <Current Location>, void *<Original Global Addr>, kmpc_ctor <Constructor>, kmpc_cctor NULL, kmpc_dtor <Destructor>); In expressions all references to such variables are replaced by calls to void *__kmpc_threadprivate_cached(ident_t *<Current Location>, kmp_int32 <Current Thread Id>, void *<Original Global Addr>, size_t <Size of Data>, void ***<Pointer to autogenerated cache – array of private copies of threadprivate variable>); Test test/OpenMP/threadprivate_codegen.cpp checks that codegen is correct. Also it checks that codegen is correct after serialization/deserialization and one of passes verifies debug info. Differential Revision: http://reviews.llvm.org/D4002 llvm-svn: 221663
* Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)David Blaikie2014-08-101-58/+53
| | | | | | | | After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215323
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-171-53/+58
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-171-58/+53
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* DebugInfo: Forward HandleTagDeclRequiredDefinition through MultiplexConsumer ↵David Blaikie2014-07-161-0/+25
| | | | | | | | | | | | | | | | | | | to fix debug info emission in the presence of plugins. When plugins are used the Multiplex(AST)Consumer is employed to dispatch to both the plugin ASTConsumers and the IRGen ASTConsumer. It wasn't dispatching a critical call for debug info, resulting in plugin users having a negative debugging experience. While I'm here, forward a bunch of other missing calls through the consumer that seem like they should be there. To test this, use the example plugin (requires plugins and examples) and split the test case up so that the plugin testing can be done under that requirement while the non-plugin testing will execute even in builds that don't include plugin support or examples. llvm-svn: 213213
* Emit used/dllexport inline method definitions in nested classes (PR19743, ↵Hans Wennborg2014-05-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR11170) The previous code that was supposed to handle this didn't work since parsing of inline method definitions is delayed to the end of the outer class definition. Thus, when HandleTagDeclDefinition() got called for the inner class, the inline functions in that class had not been parsed yet. Richard suggested that the way to do this is by handling inline method definitions through a new ASTConsumer callback. I really wanted to call ASTContext::DeclMustBeEmitted() instead of checking for attributes, but doing that causes us to compute linkage, and then we fail with "error: unsupported: typedef changes linkage of anonymous type, but linkage was already computed" on tests like this: (from SemaCXX/undefined-internal.cpp) :-/ namespace test7 { typedef struct { void bar(); void foo() { bar(); } } A; } Differential Revision: http://reviews.llvm.org/D3809 llvm-svn: 209549
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-131-26/+25
| | | | | | class. llvm-svn: 203758
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-071-4/+3
| | | | | | This compiles cleanly with lldb/lld/clang-tools-extra/llvm. llvm-svn: 203279
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-1/+1
| | | | llvm-svn: 202625
* Note when a decl is used in AST files.Eli Friedman2013-09-051-0/+6
| | | | | | | | | | | | | | | When an AST file is built based on another AST file, it can use a decl from the fist file, and therefore mark the "isUsed" bit. We need to note this in the AST file so that the bit is set correctly when the second AST file is loaded. This patch introduces the distinction between setIsUsed() and markUsed() so that we don't call into the ASTMutationListener callback when it wouldn't be appropriate. Fixes PR16635. llvm-svn: 190016
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-061-0/+8
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* C++1y deduced return types: when we deduce a return type for a function whichRichard Smith2013-05-111-0/+6
| | | | | | | we loaded from PCH, if we're building another PCH, create an update record to patch the return type of the earlier declaration. llvm-svn: 181659
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+0
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Replace MarkVarRequired with a more genericRafael Espindola2012-03-081-2/+2
| | | | | | HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
* Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola2012-03-051-0/+5
| | | | | | | | | | | | In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
* [libclang] Indexing API: Fully index implict template instantiations.Argyrios Kyrtzidis2012-02-101-0/+5
| | | | llvm-svn: 150267
* Add ArrayRef goodness in MultiplexASTMutationListener.Argyrios Kyrtzidis2012-02-101-3/+3
| | | | llvm-svn: 150266
* Update MultiplexASTMutationListener with the missing methods from ↵Argyrios Kyrtzidis2012-02-101-0/+18
| | | | | | ASTMutationListener. llvm-svn: 150265
* ArrayRef goodness in MultiplexConsumer, no functionality change.Argyrios Kyrtzidis2012-02-041-2/+3
| | | | llvm-svn: 149764
* [libclang] Indexing API: If the client requested to get a CXTranslationUnit ↵Argyrios Kyrtzidis2011-11-281-2/+8
| | | | | | | | after indexing, honor all the TU options. llvm-svn: 145229
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-1/+2
| | | | | | parsing or false to abort parsing. llvm-svn: 144943
* [PCH] Overhaul how preprocessed entities are [de]serialized.Argyrios Kyrtzidis2011-09-151-2/+2
| | | | | | | | | | | | | -Use an array of offsets for all preprocessed entities -Get rid of the separate array of offsets for just macro definitions; for references to macro definitions use an index inside the preprocessed entities array. -Deserialize each preprocessed entity lazily, at first request; not in bulk. Paves the way for binary searching of preprocessed entities that will offer efficiency and will simplify things on the libclang side a lot. llvm-svn: 139809
* Add a decl update when a static data member of a class template is ↵Sebastian Redl2011-04-291-0/+6
| | | | | | instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost. llvm-svn: 130488
* Synthesizing the definition of an implicit member is an AST modification, so ↵Sebastian Redl2011-04-241-0/+6
| | | | | | notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103
* Chained PCH: Remember when additional specializations are added to a ↵Sebastian Redl2011-04-141-0/+7
| | | | | | function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there. llvm-svn: 129516
* Add -add-plugin flag, which runs plugins in addition to codegen.Nico Weber2011-01-251-0/+221
llvm-svn: 124227
OpenPOWER on IntegriCloud