summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* Replace llvm::MutexGuard/UniqueLock with their standard equivalentsBenjamin Kramer2019-08-071-1/+1
| | | | | | | All supported platforms have <mutex> now, so we don't need our own copies any longer. No functionality change intended. llvm-svn: 368149
* libclang/CIndexer.cpp: Use loadquery() on AIX for path to libraryHubert Tong2019-03-231-0/+59
| | | | | | | | | | | | | | | | | | | Summary: `dladdr` is not available on AIX. Similar functionality is presented through `loadquery`. This patch replaces a use of `dladdr` with a version based on `loadquery`. Reviewers: sfertile, xingxue, jasonliu Reviewed By: xingxue Subscribers: jsji, lhames, majnemer, asb, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59233 llvm-svn: 356843
* Fix file headers. NFCFangrui Song2019-03-011-1/+1
| | | | llvm-svn: 355176
* Make clang/test/Index/pch-from-libclang.c pass in more placesNico Weber2019-01-311-5/+4
| | | | | | | | | | | | | | | - fixes the test on macOS with LLVM_ENABLE_PIC=OFF - together with D57343, gets the test to pass on Windows - makes it run everywhere (it seems to just pass on Linux) The main change is to pull out the resource directory computation into a function shared by all 3 places that do it. In CIndexer.cpp, this now works no matter if libclang is in lib/ or bin/ or statically linked to a binary in bin/. Differential Revision: https://reviews.llvm.org/D57345 llvm-svn: 352803
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* IWYU for llvm-config.h in clang. See r331124 for details.Nico Weber2018-04-301-1/+0
| | | | llvm-svn: 331177
* s/LLVM_ON_WIN32/_WIN32/, clangNico Weber2018-04-271-3/+3
| | | | | | | | | | | LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 331069
* Try to fix libclang reproducer tests after r329465Hans Wennborg2018-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | They were failing on Windows because the output YAML didn't parse: YAML:1:664: error: Unrecognized escape code! {"toolchain":"D:\\buildslave\\clang-x64-ninja-win7\\stage1", "libclang.operation":"complete", "libclang.opts":1, "args":["clang", "-fno-spell-checking", "D:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\test\Index\create-libclang-completion-reproducer.c", "-Xclang", "-detailed-preprocessing-record", "-fallow-editor-placeholders"], "invocation-args":["-code-completion-at=D:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\test\Index\create-libclang-completion-reproducer.c:10:1"], "unsaved_file_hashes":[{"name":"D:\\buildslave\\clang-x64-ninja-win7\\llvm\\tools\\clang\\test\\Index\\create-libclang-completion-reproducer.c", "md5":"aee23773de90e665992b48209351d70e"}]} This adds some more escaping to try to make it work. llvm-svn: 329558
* Recommit r329442: Generate Libclang invocation reproducers using a newAlex Lorenz2018-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | -cc1gen-reproducer driver option The recommit fixes: - An MSAN failure (CCPrintOptions wasn't initialized in the Driver) - Ensures that the strings in the libclang invocation files are escaped Original message: This commit is a follow up to the previous work that recorded Libclang invocations into temporary files: r319702. It adds a new -cc1 mode to clang: -cc1gen-reproducer. The goal of this mode is to generate Clang reproducer files for Libclang tool invocation. The JSON format in the invocation files is not really intended to be stable, so Libclang and Clang should be of the same version when generating reproducers. The new mode emits the information about the temporary files and Libclang-specific information to stdout using JSON. rdar://35322614 Differential Revision: https://reviews.llvm.org/D40983 llvm-svn: 329465
* [libclang] Record code-completion invocations to a temporary file whenAlex Lorenz2017-12-071-0/+9
| | | | | | | | | | | | | requested by client This is a follow up to r319702 which records parsing invocations. These files are not emitted by default, and the client has to specify the invocation emission path first. rdar://35322543 llvm-svn: 320085
* [libclang] Store unsaved file hashes when recording parsing invocationsAlex Lorenz2017-12-051-1/+21
| | | | | | | | | | | | Storing the contents of unsaved files is too expensive. Instead a hash is stored with a record invocation. When a reproducer is generated, Clang will compare the stored hashes to the new hashes to determine if the contents of a file has changed. This way we'll know when a reproducer was generated for a different source to the one that triggered the original crash. rdar://35322543 llvm-svn: 319729
* [libclang] Record parsing invocation to a temporary file when requestedAlex Lorenz2017-12-041-0/+55
| | | | | | | | | | | | | | | | | | by client This patch extends libclang by allowing it to record parsing operations to a temporary JSON file. The file is deleted after parsing succeeds. When a crash happens during parsing, the file is preserved and the client will be able to use it to generate a reproducer for the crash. These files are not emitted by default, and the client has to specify the invocation emission path first. rdar://35322543 Differential Revision: https://reviews.llvm.org/D40527 llvm-svn: 319702
* [NFC] Header cleanupMehdi Amini2016-07-181-12/+3
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* libclang: Remove clang::RemapFiles, it's dead code.Benjamin Kramer2013-06-131-61/+0
| | | | llvm-svn: 183902
* libclang: Port CIndexer::getClangResourcesPath to PathV2. No functionality ↵Benjamin Kramer2013-06-131-14/+12
| | | | | | change. llvm-svn: 183901
* Sort #include lines for tools/...Chandler Carruth2012-12-041-4/+2
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* remove unneeded config.h includesDylan Noblesmith2011-12-221-1/+1
| | | | llvm-svn: 147195
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated ↵NAKAMURA Takumi2011-03-081-0/+5
| | | | | | one. llvm-svn: 127283
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120297
* c-index-test: Be available on Cygwin by using Win32's logic.NAKAMURA Takumi2010-11-091-1/+12
| | | | llvm-svn: 118479
* This patch remove the Win32 XFAIL from remap-complete.cFrancois Pichet2010-10-121-1/+2
| | | | | | The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode. llvm-svn: 116286
* Eliminate CIndexer::getClangPath(), since libclang no longer dependsDouglas Gregor2010-10-111-37/+17
| | | | | | | | | | | on the presence of a 'clang' executable. Simplify CIndexer::getClangResourcesPath() a bit. Patch up the CMake makefiles to install headers into two locations in the build tree, for those silly cases where 'clang' will end up looking into the wrong build directory for headers. llvm-svn: 116260
* When handling raw_ostream errors manually, use clear_error() so thatDan Gohman2010-05-271-0/+1
| | | | | | raw_ostream doesn't try to do its own error handling. llvm-svn: 104880
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-0/+154
(C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
OpenPOWER on IntegriCloud