summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch PPCallbacks to take the new MacroDefinition instead of ↵Richard Smith2015-05-041-2/+2
| | | | | | MacroDirective*, in order to preserve full information on module macro expansion. llvm-svn: 236404
* Rename MacroDefinition -> MacroDefinitionRecord, ↵Richard Smith2015-05-044-67/+63
| | | | | | | | | | Preprocessor::MacroDefinition -> MacroDefinition. clang::MacroDefinition now models the currently-defined value of a macro. The previous MacroDefinition type, which represented a record of a macro definition directive for a detailed preprocessing record, is now called MacroDefinitionRecord. llvm-svn: 236400
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-291-2/+2
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* Revert r235749 - Accidentally commited cruft from the wrong path.Lang Hames2015-04-241-1/+0
| | | | llvm-svn: 235750
* [CodeGen] Make AsmPrinter's OutStreamer member a unique_ptr.Lang Hames2015-04-241-0/+1
| | | | | | | AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a reference for this is crufty. llvm-svn: 235749
* clang-format: Add default fallback style.Daniel Jasper2015-04-171-0/+1
| | | | | | Thanks to Michael Schlottke. llvm-svn: 235162
* clang-format: add an option for fallback style in vimrcDaniel Jasper2015-04-161-0/+4
| | | | | | | | | | | | With this patch, clang-format.py will search and use existing .clang-format file if there is one and fallback to the specific format style if not. It should cover the projects which don't have .clang-format files in their source. As the option fallback-style is available in clang 3.5 or later, it is safe to use. Patch by "Chilledheart" (http://reviews.llvm.org/D8489). llvm-svn: 235080
* [OPENMP] Codegen for 'copyin' clause in 'parallel' directive.Alexey Bataev2015-04-161-0/+9
| | | | | | | | | | | | | | | Emits the following code for the clause at the beginning of the outlined function for implicit threads: if (<not a master thread>) { ... <thread local copy of var> = <master thread local copy of var>; ... } <sync point>; Checking for a non-master thread is performed by comparing of the address of the thread local variable with the address of the master's variable. Master thread always uses original variables, so you always know the address of the variable in the master thread. Differential Revision: http://reviews.llvm.org/D9026 llvm-svn: 235075
* [OPENMP] Codegen for 'lastprivate' clause in 'for' directive.Alexey Bataev2015-04-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | #pragma omp for lastprivate(<var>) for (i = a; i < b; ++b) <BODY>; This construct is translated into something like: <last_iter> = alloca i32 <lastprivate_var> = alloca <type> <last_iter> = 0 ; No initializer for simple variables or a default constructor is called for objects. ; For arrays perform element by element initialization by the call of the default constructor. ... OMP_FOR_START(...,<last_iter>, ..); sets <last_iter> to 1 if this is the last iteration. <BODY> ... OMP_FOR_END if (<last_iter> != 0) { <var> = <lastprivate_var> ; Update original variable with the lastprivate value. } call __kmpc_cancel_barrier() ; an implicit barrier to avoid possible data race. Differential Revision: http://reviews.llvm.org/D8658 llvm-svn: 235074
* Use raw_pwrite_stream in clang.Rafael Espindola2015-04-141-3/+12
| | | | | | This is a small improvement to -emit-pth and allows llvm to start requiring it. llvm-svn: 234897
* [libclang] Add functions to get information about fields.Argyrios Kyrtzidis2015-04-133-21/+116
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 234762
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-115-10/+10
| | | | | | | | | | | | | | | | | | | | Summary: The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix Reviewers: dblaikie Reviewed By: dblaikie Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D8926 llvm-svn: 234678
* [OPENMP] Codegen for 'reduction' clause in 'parallel' directive.Alexey Bataev2015-04-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit a code for reduction clause. Next code should be emitted for reductions: static kmp_critical_name lock = { 0 }; void reduce_func(void *lhs[<n>], void *rhs[<n>]) { ... *(Type<i> *)lhs[i] = RedOp<i>(*(Type<i> *)lhs[i], *(Type<i> *)rhs[i]); ... } ... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n> - 1]}; switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) { case 1: ... <LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]); ... __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>); break; case 2: ... Atomic(<LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i])); ... break; default: ; } Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation. Differential Revision: http://reviews.llvm.org/D8915 llvm-svn: 234583
* Propagate usage of std:unique_ptr a bit. NFC.Rafael Espindola2015-04-091-5/+5
| | | | llvm-svn: 234538
* Update for LLVM api changes.Rafael Espindola2015-04-091-10/+9
| | | | llvm-svn: 234536
* Gating clang-fuzzer on the same conditions required to build the LLVMFuzzer ↵Aaron Ballman2015-04-061-16/+18
| | | | | | library. Otherwise, we can run into a situation where clang-fuzzer attempts to build, but its dependency was never built. llvm-svn: 234170
* Update for llvm commit r233648.Eric Christopher2015-03-311-3/+2
| | | | llvm-svn: 233649
* [scan-build] Be friendly to "" in the argument list.Anna Zaks2015-03-281-0/+5
| | | | | | Do not fail when "" is one of the compilation arguments. llvm-svn: 233465
* Make the clang-fuzzer use the CompilerInstance directly.Manuel Klimek2015-03-281-5/+16
| | | | | | Going through the driver is too slow. llvm-svn: 233459
* Add initial version of a clang-fuzzer.Manuel Klimek2015-03-283-0/+51
| | | | llvm-svn: 233455
* Refactor: Simplify boolean expressions in libclangDmitri Gribenko2015-03-231-1/+1
| | | | | | | | Simplify boolean expresions using true and false with clang-tidy. Patch by Richard. llvm-svn: 232996
* [OPENMP] Codegen for 'copyprivate' clause ('single' directive).Alexey Bataev2015-03-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is at least one 'copyprivate' clause is associated with the single directive, the following code is generated: ``` i32 did_it = 0; \\ for 'copyprivate' clause if(__kmpc_single(ident_t *, gtid)) { SingleOpGen(); __kmpc_end_single(ident_t *, gtid); did_it = 1; \\ for 'copyprivate' clause } <copyprivate_list>[0] = &var0; ... <copyprivate_list>[n] = &varn; call __kmpc_copyprivate(ident_t *, gtid, <copyprivate_list_size>, <copyprivate_list>, <copy_func>, did_it); ... void<copy_func>(void *LHSArg, void *RHSArg) { Dst = (void * [n])(LHSArg); Src = (void * [n])(RHSArg); Dst[0] = Src[0]; ... Dst[n] = Src[n]; } ``` All list items from all 'copyprivate' clauses are gathered into single <copyprivate list> (<copyprivate_list_size> is a size in bytes of this list) and <copy_func> is used to propagate values of private or threadprivate variables from the 'single' region to other implicit threads from outer 'parallel' region. Differential Revision: http://reviews.llvm.org/D8410 llvm-svn: 232932
* [OPENMP] CodeGen of the 'linear' clause for the 'omp simd' directive.Alexander Musman2015-03-211-0/+10
| | | | | | | | | The linear variable is privatized (similar to 'private') and its value on current iteration is calculated, similar to the loop counter variables. Differential revision: http://reviews.llvm.org/D8375 llvm-svn: 232890
* Update for llvm api change.Rafael Espindola2015-03-201-1/+2
| | | | llvm-svn: 232843
* Fix incremental linking with ninja and CMake 3.2+, see LLVM r232662 for detailsReid Kleckner2015-03-191-1/+1
| | | | llvm-svn: 232739
* Update for llvm API change.Rafael Espindola2015-03-161-2/+3
| | | | llvm-svn: 232430
* [libclang] During member ref expression visitation, ignore base anonymous ↵Argyrios Kyrtzidis2015-03-131-2/+15
| | | | | | | | | | struct/union fields. Otherwise they will shadow the real field that that we are interested in. rdar://19783938 llvm-svn: 232141
* clang-format: Recognize the .ts (TypeScript) extension as JavaScript.Daniel Jasper2015-03-111-1/+1
| | | | | | Patch by Martin Probst. Thank you. llvm-svn: 231926
* Update clang for llvm r231861.Eric Christopher2015-03-101-2/+2
| | | | llvm-svn: 231862
* Make helper functions static. NFC.Benjamin Kramer2015-03-101-1/+1
| | | | llvm-svn: 231811
* Teach raw_ostream to accept SmallString.Yaron Keren2015-03-101-1/+1
| | | | | | | | | | | | | | Saves adding .str() call to any raw_ostream << SmallString usage and a small step towards making .str() consistent in the ADTs by removing one of the SmallString::str() use cases, discussion at http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html I'll update the Phabricator patch http://reviews.llvm.org/D6372 for review of the Twine SmallString support, it's more complex than this one. llvm-svn: 231763
* Replace Sema's map of locally-scoped extern "C" declarations with a DeclContextRichard Smith2015-03-071-0/+1
| | | | | | | | | | of extern "C" declarations. This is simpler and vastly more efficient for modules builds (we no longer need to load *all* extern "C" declarations to determine if we have a redeclaration). No functionality change intended. llvm-svn: 231538
* Clang side change following r231392.Zachary Turner2015-03-051-1/+1
| | | | | | | Changes call to PrintStackTrace(FILE*) to call PrintStackTrace(raw_ostream&) llvm-svn: 231393
* Migrate clang-format-vs plugin project to VS 2013Hans Wennborg2015-03-032-6/+3
| | | | | | | | | | The plugin still works fine in versions starting from 2010, but this was needed to make the project _build_ in VS 2013, which is the blessed version for building LLVM projects these days. http://reviews.llvm.org/D8021 llvm-svn: 231084
* Add missing include.Benjamin Kramer2015-03-011-0/+1
| | | | llvm-svn: 230910
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-257-19/+11
| | | | llvm-svn: 230454
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-257-11/+19
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 llvm-svn: 230423
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-247-18/+15
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. llvm-svn: 230309
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-247-15/+18
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. llvm-svn: 230305
* Cleanup: remove artificial division between lookup results and const lookupRichard Smith2015-02-211-1/+1
| | | | | | | results. No-one was ever modifying a lookup result, and it would not be reasonable to do so. llvm-svn: 230123
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-216-15/+8
| | | | | | | | This reverts commit 230099. The Linux configure+make build variant still needs some work. llvm-svn: 230103
* configure+make: Rearange clangCodeGen to come before clangAST.Adrian Prantl2015-02-211-2/+2
| | | | | | Follow-up to r230089. llvm-svn: 230099
* configure+make: Add ipo to the dependencies of libclang.Adrian Prantl2015-02-211-1/+1
| | | | | | Follow-up to r230089. llvm-svn: 230096
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-206-7/+14
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 2. llvm-svn: 230089
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-205-13/+6
| | | | | | | | This reverts commit r230067. Investigating another batch of problems found by the bots. llvm-svn: 230073
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-205-6/+13
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. llvm-svn: 230067
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-201-1/+0
| | | | | | | | | This reverts commit r230044 while dealing with buildbot breakage. Conflicts: test/Modules/module_container.m llvm-svn: 230052
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-201-0/+1
| | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 llvm-svn: 230044
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-152-3/+3
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Update APIs that return a pair of iterators to return an iterator_range instead.Benjamin Kramer2015-02-062-9/+3
| | | | | | Convert uses of those APIs into ranged for loops. NFC. llvm-svn: 228404
OpenPOWER on IntegriCloud