Граф коммитов

42 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor ba8be8c422 Kill the last vestiges of clangIndex
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154675 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-13 17:26:32 +00:00
Ted Kremenek 30660a8985 Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator.  We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 20:06:33 +00:00
Ted Kremenek 153221717e serialized diagnostics: implement full deserialization of clang diagnostics via the libclang API.
I've tested it on simple cases and it works.  Test cases to follow as well as a few tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144269 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-10 08:43:12 +00:00
Ted Kremenek 3ddef060a9 [libclang] Move implementation of functions for manipulation CXSourceLocations and CXSourceRanges into a separate file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 22:05:42 +00:00
Ted Kremenek 1edabbc32a [libclang] Add CXDiagnosticImpl to represent a super class for the implementation backing a CXDiagnostic. This allows CXStoredDiagnostic
to be just one possible implementation of a CXDiagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143368 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-31 21:40:19 +00:00
Argyrios Kyrtzidis 4e7064fa7e [libclang] Introduce a new high level API for indexing clients that assumes
more of the work involved in indexing a translation unit and simplifies client
implementations.

Only C/ObjC for now, C++ (and comments) to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142233 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 19:48:19 +00:00
Argyrios Kyrtzidis aed123ec3c [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,
and a callback and finds all identifier references of the cursor in the file.

rdar://7948304

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141277 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 07:00:54 +00:00
Argyrios Kyrtzidis 6e8090356f Fix CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134918 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 20:28:59 +00:00
Argyrios Kyrtzidis 96210199a5 [libclang] Fix linker error in buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134847 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 21:35:58 +00:00
Argyrios Kyrtzidis 69325d5b7c [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.
This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.

<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.

Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.

Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.

rdar://9735086.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 20:00:58 +00:00
Chandler Carruth 944eadbf3f Remove more unnecessary dependencies now that the Frontend -> ARCMigrate
edge has been broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133343 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-18 09:07:35 +00:00
Chandler Carruth ba45fabfce Remove ARCMigrate from more builds that it isn't needed in now that the
layering problem has been addressed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133217 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 23:53:28 +00:00
John McCall ae446421df ARCMigrate depends on libAnalysis, and on unhelpful linkers must appear
before it on the link line.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133145 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 04:30:11 +00:00
John McCall 979b423b37 Grr. Of course libARCMigrate depends on libRewrite. This is a lot to be
linking unnecessarily into libclang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133129 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 01:29:56 +00:00
John McCall a586c74b6a libFrontend depends on ARCMigrate, so link it into libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133116 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-16 00:38:00 +00:00
Oscar Fuentes 4656b63243 libclang output name is now libclang. This solves a name collision
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129239 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 02:29:27 +00:00
Oscar Fuentes 6656457a0a Fix LIBCLANG_LINK_FLAGS for Darwin.
The previous syntax created a list with the usual semicolon as
separator, which breaks the link command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127579 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-14 14:32:16 +00:00
Oscar Fuentes 0b34dbaafe Build libclang as a static library too. Now tested on Windows!
On Windows only the shared library is created. The reason for this is
that clang.lib the static library would clash with clang.lib the
export library of the dll.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127566 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 15:10:24 +00:00
Oscar Fuentes d9e9b8f195 Reverting "Build libclang as a static library too."
This reverts commit r127556. It breaks the build for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127564 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-13 04:28:29 +00:00
Oscar Fuentes 29f4bacada Build libclang as a static library too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-12 22:01:58 +00:00
Douglas Gregor 8435bf9375 CMake: add version information into the clang executable and libclang
shared library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 19:24:02 +00:00
Peter Collingbourne 4b93d660c6 Re-instate r125819 and r125820 with no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 23:03:58 +00:00
Rafael Espindola 96b1d4b4eb Revert 125820 and 125819 to fix PR9266.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:39:31 +00:00
Peter Collingbourne 906c73ffbc Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
This removes the final dependency edge from any lib outside of CodeGen
to core.  As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 02:25:12 +00:00
NAKAMURA Takumi 886e1606c2 CMake: LLVM_NO_RTTI must be obsolete now!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:15:32 +00:00
Oscar Fuentes 5ffcf5de8f CMake: libclang shall be named libclang.so, not liblibclang.so.
It is not possible to simply change that target name to `clang'
because we already have one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124972 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05 20:00:13 +00:00
Ted Kremenek ed12273563 Move CXString creation/management routines into
their own .cpp file and make the interpretation
of its flags private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119319 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 01:56:27 +00:00
Michael J. Spencer 560a921b85 Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 23:54:41 +00:00
Michael J. Spencer 5a7f34958c CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:13:16 +00:00
Douglas Gregor ec9bf47565 Clean up CMake dependencies
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 15:44:58 +00:00
Ted Kremenek 3064ef9e60 Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.
Implements <rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 21:34:58 +00:00
Ted Kremenek 95f33555a6 Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 01:42:22 +00:00
John McCall 1951085672 Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 18:27:03 +00:00
Sebastian Redl 857281328f Reintroduce the serialization library, with fixed dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 20:43:28 +00:00
Douglas Gregor 2d490f2d8a Don't pass -avoid-version to Darwin linker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 11:08:45 +00:00
Douglas Gregor 73dfa3d30a Add Darwin dylib versioning support to libclang when build with CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 20:52:32 +00:00
John Thompson 4156a4cbd5 Rename clang.dll to libclang.dll, to fix Windows build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108067 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-11 03:23:30 +00:00
Chris Lattner 746d99132b don't make libclang depend on codegen. Patch by Peter Collingbourne!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105901 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-12 22:54:45 +00:00
Douglas Gregor eb5dc498da Teach the PrintFunctionNames example to be a proper module, so that
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 19:23:49 +00:00
Ted Kremenek 8e0ac174c8 Add CXType and an initial set of supporting functions to libclang. This exposes details of
Clang's representation of the C type system to clients.  It is nowhere near complete, and will
be expanded on demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 21:29:26 +00:00
Daniel Dunbar cdb65d8724 Fix NON_ANSI_COMPILE_FLAGS setting, for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102811 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-01 00:06:42 +00:00
Daniel Dunbar f51f20fa34 Rename 'CIndex' to 'libclang', since it has basically become our stable public
(C) API, and will likely grow further in this direction in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 21:51:10 +00:00