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

47 Коммитов

Автор 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
Peter Collingbourne 22a7dfea58 Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30 17:30:44 +00:00
Bob Wilson 10a82cde7c Rip out flags for controlling C++ "production mode" separately.
This is old leftover cruft from the days when C++ was not yet ready
for prime time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-04 05:34:14 +00:00
Eli Friedman 3963cef84a Revert unintentional commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133971 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-28 00:03:31 +00:00
Eli Friedman 0c051221bd Merge some calls to FoldingSetNodeID::AddInteger; assuming my measurements aren't completely off, roughly a 1% speedup on SingleSource/UnitTests/ObjC/trivial-interface.m .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133968 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-27 23:58:21 +00:00
John McCall 8f0e8d2296 The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133104 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15 23:25:17 +00:00
Nick Lewycky e8ba8d78a2 Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
compile time) and .gcda emission (at runtime). --coverage enables both.

This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129956 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 23:44:07 +00:00
Argyrios Kyrtzidis e817771c57 [analyzer] Introduce libclangStaticAnalyzerFrontend and move Checkers/AnalysisConsumer.cpp into Frontend lib.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125499 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 18:13:01 +00:00
Zhongxing Xu 0742f181e5 Revert r123160. There are linking dependency problems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123166 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10 09:23:01 +00:00
Ted Kremenek 21142581d5 Chris Lattner has strong opinions about directory
layout.  :)

Rename the 'EntoSA' directories to 'StaticAnalyzer'.

Internally we will still use the 'ento' namespace
for the analyzer engine (unless there are further
sabre rattlings...).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 19:38:26 +00:00
Ted Kremenek 3a8f40ed5e Rename headers: 'clang/GR' 'clang/EntoSA' and
update Makefile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-23 07:22:02 +00:00
Argyrios Kyrtzidis a7af5ea88a [analyzer] Refactoring: Move checkers into lib/GR/Checkers and their own library, libclangGRCheckers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:52:56 +00:00
Argyrios Kyrtzidis bce30c533a [analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> libclangGRCore
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122421 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-22 18:52:29 +00:00
Daniel Dunbar 6dbcaf3849 build: Add support for a CLANG_ORDER_FILE build variable to specify the path to
the order file to use for the clang executable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 00:42:38 +00:00
Daniel Dunbar b08fab82a6 Driver: Set TOOL_NO_EXPORTS when building a "production" compiler, we don't
currently expect that to be useful for plugins, and this is important for
startup performance:
--
ddunbar@lordcrumb:tmp$ touch empty.c
ddunbar@lordcrumb:tmp$ runN 100 ~/llvm.obj.64/Release/bin/clang -c empty.c
name	  avg  	  min  	  med  	  max  	   SD  	 total 
user	 0.0054	 0.0052	 0.0054	 0.0055	 0.0000	 0.5350
 sys	 0.0084	 0.0090	 0.0078	 0.0087	 0.0008	 0.8390
wall	 0.0149	 0.0149	 0.0149	 0.0149	 0.0003	 1.4943
ddunbar@lordcrumb:tmp$ runN 100 ~/llvm.obj.64/Release/bin/clang -c empty.c
name	  avg  	  min  	  med  	  max  	   SD  	 total 
user	 0.0036	 0.0036	 0.0036	 0.0038	 0.0000	 0.3646
 sys	 0.0072	 0.0071	 0.0068	 0.0070	 0.0006	 0.7158
wall	 0.0123	 0.0123	 0.0122	 0.0136	 0.0003	 1.2262
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:42:03 +00:00
Peter Collingbourne 1b7255de78 Move ExecuteCompilerInvocation to a new library FrontendTool
r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:31: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 4557e473c9 Revert Sebastian's build-breaking patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:31:01 +00:00
Sebastian Redl 93c972945b Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 17:55:49 +00:00
Zhongxing Xu c6238d2786 Reapply r108617.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108668 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 01:31:21 +00:00
Benjamin Kramer ee30965ce9 Revert r108617, it broke the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108621 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 13:51:58 +00:00
Zhongxing Xu 69b81941aa Prepare the analyzer for the callee in another translation unit:
Let AnalysisContext contain a TranslationUnit.
  Let CallEnter refer to an AnalysisContext instead of a FunctionDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 11:12:42 +00:00
Daniel Dunbar 7bad56cd0c build/Darwin: Enable version information for clang executable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 19:33:44 +00:00
Nick Lewycky 431495df8d Clang do so have plugins, we can't prune exports. Fixes plugin support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108054 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-10 20:19:47 +00:00
Daniel Dunbar c4dec1c58e Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 20:44:43 +00:00
Daniel Dunbar afed099bd2 Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 20:34:18 +00:00
Daniel Dunbar 4cbbd94d0a Frontend: Add CodeGenAction support for handling LLVM IR. - This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality. For example, 'llvm-as' is: $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
  $ clang -cc1 -emit-llvm    FOO.bc -o -
and 'opt' is, e.g.:
  $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
  $ clang -cc1 -S -o - FOO.ll

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:27:59 +00:00
Daniel Dunbar 5d93ed3c7a Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-01 18:21:41 +00:00
Jeffrey Yasskin 3352406820 Allow users to set CPPFLAGS and CXXFLAGS on the make command line.
Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-12 22:55:16 +00:00
Zhongxing Xu 0c98670e24 Fix linking problem on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-29 03:25:47 +00:00
Ted Kremenek 1309f9a3b2 Split libAnalysis into two libraries: libAnalysis and libChecker.
(1) libAnalysis is a generic analysis library that can be used by
    Sema.  It defines the CFG, basic dataflow analysis primitives, and
    inexpensive flow-sensitive analyses (e.g. LiveVariables).

(2) libChecker contains the guts of the static analyzer, incuding the
    path-sensitive analysis engine and domain-specific checks.

Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.

This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker.  More changes pending.  :)

This change also exposed a layering violation between AnalysisContext
and MemRegion.  BlockInvocationContext shouldn't explicitly know about
BlockDataRegions.  For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet).  We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94406 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:41:41 +00:00
Chris Lattner 0bb46d285c -fno-rtti is now the default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:31 +00:00
Daniel Dunbar 3f693d25d4 Don't build/install clang++ in CLANG_IS_PRODUCTION build mode yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18 17:52:48 +00:00
Daniel Dunbar 2108577809 Implement clang -cc1.
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 22:20:12 +00:00
Daniel Dunbar c88aa79a6b Put CompilerInvocation testing code in clang-cc instead of clang for now, I can't bear to link all of clang into 'clang' yet. :)
- Still triggered by a magic leading -cc1 argument, as before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 07:18:13 +00:00
Daniel Dunbar 217acbfa35 Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89333 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 07:37:51 +00:00
Daniel Dunbar f4961da8e3 Use TOOLALIAS so that clang++ gets 'built'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 00:21:33 +00:00
Daniel Dunbar f44c585632 Push "clang-is-production" logic up to tools/driver, and make it hittable by
defining the CLANG_IS_PRODUCTION Makefile variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 22:31:13 +00:00
Daniel Dunbar 7ec3dafdda Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 03:07:05 +00:00
Daniel Dunbar 073777f3ab Move <root>/Driver into <root>/tools/clang-cc.
Again, I tried to update cmake but it is untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67605 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 03:00:12 +00:00
Daniel Dunbar 510d73200e Driver: Use custom diag printer to drop dependency on libFrontend and
libLex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67155 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 02:11:26 +00:00
Douglas Gregor a393e9eedc Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-16 23:06:59 +00:00
Daniel Dunbar 4ad4b3ebbe Driver: Use standard Diagnostic interface for diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 08:55:43 +00:00
Daniel Dunbar 2c6f6f3c17 Driver: More Option implementation.
- Add Options.def file, collects option information.

 - Actual option instantiation is handled lazily by OptTable to allow
   the driver to not need to instantiate all options.

 - cast<> support for Option, other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 08:33:23 +00:00
Daniel Dunbar 3ede8d0a7d Stub out some structure for C++ driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65867 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 19:59:07 +00:00