summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* [clang] Add llvm-ifs in test depsVitaly Buka2019-10-081-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374110 91177308-0d34-0410-b5e6-96231b3b80d8
* [Clang][Bundler] Use llvm-objcopy for creating fat object filesSergey Dmitriev2019-08-261-0/+1
| | | | | | | | clang-offload-bundler currently uses partial linking for creating fat object files, but such technique cannot be used on Windows due to the absence of partial linking support in the linker. This patch changes implementation to use llvm-objcopy for merging device and host objects instead of doing partial linking. This is one step forward towards enabling OpenMP offload on Windows. Differential Revision: https://reviews.llvm.org/D66485 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369955 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve behavior in the case of stack exhaustion.Richard Smith2019-08-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clang performs various recursive operations (such as template instantiation), and may use non-trivial amounts of stack space in each recursive step (for instance, due to recursive AST walks). While we try to keep the stack space used by such steps to a minimum and we have explicit limits on the number of such steps we perform, it's impractical to guarantee that we won't blow out the stack on deeply recursive template instantiations on complex ASTs, even with only a moderately high instantiation depth limit. The user experience in these cases is generally terrible: we crash with no hint of what went wrong. Under this patch, we attempt to do better: * Detect when the stack is nearly exhausted, and produce a warning with a nice template instantiation backtrace, telling the user that we might run slowly or crash. * For cases where we're forced to trigger recursive template instantiation in arbitrarily-deeply-nested contexts, check whether we're nearly out of stack space and allocate a new stack (by spawning a new thread) after producing the warning. Reviewers: rnk, aaron.ballman Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66361 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369940 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix breakage introduced by D60974JF Bastien2019-07-011-0/+1
| | | | | | D60974 added tests which incorrectly assume that llvm-readelf is available. This is a bad assumption, it should instead declare the dependency explicitly in the tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364855 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Add llvm-dwarfdump to clang test dependenciesSven van Haastregt2019-06-211-0/+1
| | | | | | | | Commit r363496 ("[Clang] Harmonize Split DWARF options with llc", 2019-06-15) introduced the use of llvm-dwarfdump in the clang tests, so ensure the clang tests are dependent on llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364021 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][NewPM] Fixing remaining -O0 tests that are broken under new PMLeonard Chan2019-06-191-0/+1
| | | | | | | | | | | | | | - CodeGen/flatten.c will fail under new PM becausec the new PM AlwaysInliner seems to intentionally inline functions but not call sites marked with alwaysinline (D23299) - Tests that check remarks happen to check them for the inliner which is not turned on at O0. These tests just check that remarks work, but we can make separate tests for the new PM with -O1 so we can turn on the inliner and check the remarks with minimal changes. Differential Revision: https://reviews.llvm.org/D62225 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363846 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-scan-deps] initial outline of the tool that runs preprocessor to findAlex Lorenz2019-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | dependencies over a JSON compilation database This commit introduces an outline for the clang-scan-deps tool that will be used to implement fast dependency discovery phase using implicit modules for explicit module builds. The initial version of the tool works by computing non-modular header dependencies for files in the compilation database without any optimizations (i.e. without source minimization from r362459). The tool spawns a number of worker threads to run the clang compiler workers in parallel. The immediate goal for clang-scan-deps is to create a ClangScanDeps library which will be used to build up this tool to use the source minimization and caching multi-threaded filesystem to implement the optimized non-incremental dependency scanning phase for a non-modular build. This will allow us to do benchmarks and comparisons for performance that the minimization and caching give us Differential Revision: https://reviews.llvm.org/D60233 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363204 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in r362328 -- append to dependency list instead of overwrite it.Don Hinton2019-06-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362334 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Fix plugin testsDon Hinton2019-06-021-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recommit of r361790 that was temporarily reverted in r361793 due to bot breakage. Summary: The following changes were required to fix these tests: 1) Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior. 2) Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate `check-` targets, which don't make sense for the plugins because they aren't tests and don't have `RUN` statements. Here's a list of the `clang-check-anlysis*` targets with this change: ``` $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3 ``` 3) Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set. Reviewed By: NoQ Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62445 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362328 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert [test] Fix plugin testsDon Hinton2019-05-281-6/+20
| | | | | | | | This reverts r361790 (git commit fe5eaab2b5b4523886bd63aebcfea8cfce586fa1) It's causing buildbot breakage, so reverting while I investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361793 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Fix plugin testsDon Hinton2019-05-281-20/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following changes were required to fix these tests: 1) Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior. 2) Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate `check-` targets, which don't make sense for the plugins because they aren't tests and don't have `RUN` statements. Here's a list of the `clang-check-anlysis*` targets with this change: ``` $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3 ``` 3) Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set. Reviewed By: NoQ Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62445 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361790 91177308-0d34-0410-b5e6-96231b3b80d8
* [Analysis] Only run plugins tests if plugins are actually enabledPetr Hosek2019-05-171-1/+2
| | | | | | | | | | | | | | When plugins aren't enabled, don't try to run plugins tests. Don't enable plugins unconditionally based on the platform, instead check if LLVM shared library is actually being built which may not be the case for every host configuration, even if the host itself supports plugins. This addresses test failures introduced by r360891/D59464. Differential Revision: https://reviews.llvm.org/D62050 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360991 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang/test] Add missing dependency on llvm-cxxfilt.David L. Jones2019-05-161-0/+1
| | | | | | This tool is needed by clang/test/CodeGen/Output/ppc-mmintrin.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360939 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland "[analyzer] Add an example plugin for checker dependency handling"Kristof Umann2019-05-161-13/+15
| | | | | | | | | | | | Buildbots complained that they couldn't find the newly added plugins. The solution was to move the check-clang cmake target closer to the bottom of the file, after the new dependencies are added. Differential Revision: https://reviews.llvm.org/D59464 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360891 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[analyzer] Add a test for plugins using checker dependencies"Kristof Umann2019-05-151-3/+1
| | | | | | | Buildbots don't seem to find the new plugin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360805 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Add a test for plugins using checker dependenciesKristof Umann2019-05-151-1/+3
| | | | | | | | | | | | Also, I moved the existing analyzer plugin to test/ as well, in order not to give the illusion that the analyzer supports plugins -- it's capable of handling them, but does not _support_ them. Differential Revision: https://reviews.llvm.org/D59464 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360799 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r359717, "Make check-clang depend on the clang-check binary always"Nico Weber2019-05-011-1/+1
| | | | | | | | | | | | The Tooling tests do have a lit.local.cfg with if not config.root.clang_staticanalyzer: config.unsupported = True so what's wrong isn't the missing dep, but that lit prints a warning for the binary missing. This will need a different kind of fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359739 91177308-0d34-0410-b5e6-96231b3b80d8
* Make check-clang depend on the clang-check binary alwaysNico Weber2019-05-011-3/+5
| | | | | | | | | | | | | | | | | check-clang (the target that runs all clang tests) used to only depend on clang-check (a binary like clang-tidy, clang-refactor, etc) if the static analyzer is enabled. However, several lit tests call clang-check unconditionally, so always depend on it. Fixes a "could not find clang-check" lit warning in clean builds with the static analyzer disabled. Also sort the deps in the CMake file and put just one dep on each line. Differential Revision: https://reviews.llvm.org/D61324 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359717 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved everything SMT-related to LLVM and updated the cmake scripts.Mikhail R. Gadelha2019-03-251-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D54978 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356929 91177308-0d34-0410-b5e6-96231b3b80d8
* [build] Rename clang-headers to clang-resource-headersShoaib Meenai2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The current install-clang-headers target installs clang's resource directory headers. This is different from the install-llvm-headers target, which installs LLVM's API headers. We want to introduce the corresponding target to clang, and the natural name for that new target would be install-clang-headers. Rename the existing target to install-clang-resource-headers to free up the install-clang-headers name for the new target, following the discussion on cfe-dev [1]. I didn't find any bots on zorg referencing install-clang-headers. I'll send out another PSA to cfe-dev to accompany this rename. [1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits Tags: #clang, #sanitizers, #lldb, #openmp, #llvm Differential Revision: https://reviews.llvm.org/D58791 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355340 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit 1440a848a635849b97f7a5cfa0ecc40d37451f5b.Mikhail R. Gadelha2019-02-091-1/+1
| | | | | | | | and commit a1853e834c65751f92521f7481b15cf0365e796b. They broke arm and aarch64 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353590 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the SMT API to LLVMMikhail R. Gadelha2019-02-071-1/+1
| | | | | | | | Moved everything SMT-related to LLVM and updated the cmake scripts. Differential Revision: https://reviews.llvm.org/D54978 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353373 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer][CrossTU][NFC] Generalize to external definitions instead of ↵Rafael Stahl2019-01-101-1/+1
| | | | | | | | | | | | | | | | external functions Summary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421 Reviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille Reviewed By: xazax.hun, martong Subscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350852 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Fix bots by removing new check-clang-analyzer commands from CHECK-ALLGeorge Karpenkov2018-08-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339709 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] [NFC] Introduce separate targets for testing the analyzer: ↵George Karpenkov2018-08-131-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | check-clang-analyzer and check-clang-analyzer-z3 Current testing setup for analyzer tests with Z3 is rather inconvenient: There's no way to run the analyzer tests separately (I use LIT_FILTER=Analysis ninja check-clang, but a direct target is nicer). When Clang is built with Z3 support, there's no way to *not* run tests with Z3 solver, and this is often desired, as tests with Z3 solver take a very long time. This patch introduces two extra targets: - check-clang-analyzer - check-clang-analyzer-z3 which solve those problems. Differential Revision: https://reviews.llvm.org/D50594 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339629 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for multiarch runtimes layoutPetr Hosek2018-06-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a support for multiarch style runtimes layout, so in addition to the existing layout where runtimes get installed to: lib/clang/$version/lib/$os Clang now allows runtimes to be installed to: lib/clang/$version/$target/lib This also includes libc++, libc++abi and libunwind; today those are assumed to be in Clang library directory built for host, with the new layout it is possible to install libc++, libc++abi and libunwind into the runtime directory built for different targets. The use of new layout is enabled by setting the LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both projects and runtimes layouts. The runtimes CMake build has been further modified to use the new layout when building runtimes for multiple targets. Differential Revision: https://reviews.llvm.org/D45604 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335809 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Add test dependency on llvm-asShoaib Meenai2018-06-261-0/+1
| | | | | | | r335618 added tests that invoke llvm-as, so we should also ensure that running clang tests rebuilds llvm-as. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335686 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply: Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Thanks to Stella Stamenova for helping make this work on Windows. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335295 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add python tool to dump and construct header maps"Bruno Cardoso Lopes2018-06-211-1/+0
| | | | | | | | | | | This reverts commit fcfa2dd517ec1a6045a81e8247e346d630a22618. Broke bots: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11315 http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/10411/steps/test-check-all/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335196 91177308-0d34-0410-b5e6-96231b3b80d8
* Add python tool to dump and construct header mapsBruno Cardoso Lopes2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Header maps are binary files used by Xcode, which are used to map header names or paths to other locations. Clang has support for those since its inception, but there's not a lot of header map testing around. Since it's a binary format, testing becomes pretty much brittle and its hard to even know what's inside if you don't have the appropriate tools. Add a python based tool that allows creating and dumping header maps based on a json description of those. While here, rewrite tests to use the tool and remove the binary files from the tree. This tool was initially written by Daniel Dunbar. Differential Revision: https://reviews.llvm.org/D46485 rdar://problem/39994722 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335177 91177308-0d34-0410-b5e6-96231b3b80d8
* [ThinLTO/CFI] Include TYPE_ID summaries into GLOBALVAL_SUMMARY_BLOCKVitaly Buka2018-02-141-0/+1
| | | | | | | | | | | | | | Summary: TypeID summaries are used by CFI and need to be serialized by ThinLTO indexing for later use by LTO Backend. Reviewers: tejohnson, pcc Subscribers: mehdi_amini, inglorion, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D42611 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325182 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Follow-up to rL320494.Don Hinton2017-12-121-2/+2
| | | | | | EXISTS requires full paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320519 91177308-0d34-0410-b5e6-96231b3b80d8
* [debuginfo-tests] Add support for moving debuginfo-tests from clang/test to ↵Don Hinton2017-12-121-0/+9
| | | | | | | | | | | | | | | | | | | | | llvm/projects or monorepo. Summary: The new version of debuginfo-tests will have it's own lit.cfg.py file which is incompatible with the one in clang/test. This change supports both the old and new versions, and can be used until the bots actually move debuginfo-tests to either clang/test or the monorepo. This is a prerequisite for D40971. Reviewers: zturner, aprantl Subscribers: mgorny, JDevlieghere, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D41055 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320494 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-revert "Refactor debuginfo-tests."Zachary Turner2017-11-211-8/+0
| | | | | | | | | | This is still breaking greendragon. At this point I give up until someone can fix the greendragon bots, and I will probably abandon this effort in favor of using a private github repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318722 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit "Refactor debuginfo-tests" again.Zachary Turner2017-11-201-0/+8
| | | | | | | | | | | | This was reverted due to the tests being run twice on some build bots. Each run had a slightly different configuration due to the way in which it was being invoked. This fixes the problem (albeit in a somewhat hacky way). Hopefully in the future we can get rid of the workflow of running debuginfo-tests as part of clang, and then this hack can go away. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318697 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-revert "Refactor debuginfo-tests"Zachary Turner2017-11-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | This is still broken because it causes certain tests to be run twice with slightly different configurations, which is wrong in some cases. You can observe this by running: ninja -nv check-all | grep debuginfo-tests And seeing that it passes clang/test and clang/test/debuginfo-tests to lit, which causes it to run debuginfo-tests twice. The fix is going to involve either: a) figuring out that we're running in this "deprecated" configuration, and then deleting the clang/test/debuginfo-tests path, which should cause it to behave identically to before, or: b) make lit smart enough that it doesn't descend into a sub-suite if that sub-suite already has a lit.cfg file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318486 91177308-0d34-0410-b5e6-96231b3b80d8
* Resubmit "Refactor debuginfo-tests"Zachary Turner2017-11-161-0/+7
| | | | | | | | | | This was reverted due to some failures on specific darwin buildbots, the issue being that the new lit configuration was not setting the SDKROOT environment variable. We've tested a fix locally and confirmed that it works, so this patch resubmits everything with the fix applied. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318435 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Update test_debuginfo.pl script to point to new tree location."Zachary Turner2017-11-131-7/+0
| | | | | | | | This reverts the aforementioned patch and 2 subsequent follow-ups, as some buildbots are still failing 2 tests because of it. Investigation is ongoing into the cause of the failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318112 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for skipped CMake configuration on debuginfo-tests.Zachary Turner2017-11-101-0/+7
| | | | | | | This should have been part of the change to debuginfo-tests, but it was left out. This should get the buildbots green. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317931 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Enable clang-func-mapping as a test dep with the analyzerVedant Kumar2017-09-221-1/+1
| | | | | | | clang-func-mapping should not be a test dependency when the static analyzer isn't being built. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314036 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Cross Translation Unit support libraryGabor Horvath2017-09-221-0/+1
| | | | | | | | | | | | | | | | | | | This patch introduces a class that can help to build tools that require cross translation unit facilities. This class allows function definitions to be loaded from external AST files based on an index. In order to use this functionality an index is required. The index format is a flat text file but it might be replaced with a different solution in the near future. USRs are used as names to look up the functions definitions. This class also does caching to avoid redundant loading of AST files. Right now only function defnitions can be loaded using this API because this is what the in progress cross translation unit feature of the Static Analyzer requires. In to future this might be extended to classes, types etc. Differential Revision: https://reviews.llvm.org/D34512 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313975 91177308-0d34-0410-b5e6-96231b3b80d8
* [lit] Rename lld and clang lit configs to end in .pyZachary Turner2017-09-211-4/+8
| | | | | | | | | | This follows in line with a previous patch of renaming LLVM's. Working on these files is difficult in certain operating systems and/or environments that don't like handling python code with a non .py file extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313892 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] add clang-refactor tool with initial testing support andAlex Lorenz2017-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | local-rename action This commit introduces the clang-refactor tool alongside the local-rename action which uses the existing renaming engine used by clang-rename. The tool doesn't actually perform the source transformations yet, it just provides testing support. This commit also moves only one test from clang-rename over to test/Refactor. I will continue to move the other tests throughout development of clang-refactor. The following options are supported by clang-refactor: -v: use verbose output -selection: The source range that corresponds to the portion of the source that's selected (currently only special command test:<file> is supported). Please note that a follow-up commit will migrate clang-refactor to libTooling's common option parser, so clang-refactor will be able to use the common interface with compilation database and options like -p, -extra-arg, etc. The testing support provided by clang-refactor is described below: When -selection=test:<file> is given, clang-refactor will parse the selection commands from that file. The selection commands are grouped and the specified refactoring action invoked by the tool. Each command in a group is expected to produce an identical result. The precise syntax for the selection commands is described in a comment in TestSupport.h. Differential Revision: https://reviews.llvm.org/D36574 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313244 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang's tests should depend on clang-diffAlex Lorenz2017-07-211-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308735 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Move clang-rename into the clang repositoryAlex Lorenz2017-06-301-0/+1
| | | | | | | | | | | | | The core engine of clang-rename will be used for local and global renames in the new refactoring engine, as mentioned in http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.html. The clang-rename tool is still supported but might get deprecated in the future. Differential Revision: https://reviews.llvm.org/D34696 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306840 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r292662, "IRGen: Start using the WriteThinLTOBitcode pass."Peter Collingbourne2017-01-261-0/+1
| | | | | | The internal build issue has been resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293231 91177308-0d34-0410-b5e6-96231b3b80d8
* IRGen: When loading the main module in the distributed ThinLTO backend, look ↵Peter Collingbourne2017-01-261-0/+1
| | | | | | | | for the module containing the summary. Differential Revision: https://reviews.llvm.org/D29067 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293209 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Add HAVE_LIBZ to canonicalized booleansMichal Gorny2017-01-251-1/+2
| | | | | | Canonicalize HAVE_LIBZ as well to fix buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293053 91177308-0d34-0410-b5e6-96231b3b80d8
* [test] Port clang tests to canonicalized booleansMichal Gorny2017-01-251-2/+8
| | | | | | | | | | | Use the new llvm_canonicalize_cmake_booleans() function to canonicalize booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables used to hold canonicalized values with in-place canonicalization. Use implicit logic in Python code to avoid overrelying on exact 0/1 values. Differential Revision: https://reviews.llvm.org/D28529 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293052 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "IRGen: Start using the WriteThinLTOBitcode pass."Martin Bohme2017-01-231-1/+0
| | | | | | | | | | | | | Summary: This reverts commit r292662. This change broke internal builds. Will provide a reproducer internally. Subscribers: pcc, mehdi_amini, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D29025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292791 91177308-0d34-0410-b5e6-96231b3b80d8