Tom Care
68625cf3ee
Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 21:35:27 +00:00
Michael J. Spencer
f5ddcc0aca
PrintFunctionNames: Fix Windows (MSV{S,C} and mingw) build.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113835 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 06:39:35 +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
Benjamin Kramer
f0a5d6fe7d
clang-interpreter: libFrontend depends on libSerialization. Fix linux build by changing the link order.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 15:21:38 +00:00
Benjamin Kramer
06b901be05
Update clang-interpreter for recent DiagnosticClient ownership changes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 13:48:56 +00:00
Zhongxing Xu
579855f186
Add back clang-wpa. It is useful for experimenting with inter-file analysis.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112014 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 01:15:20 +00:00
Peter Collingbourne
07a57e0c0f
Add Serialization dependency to clang-interpreter
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:31:31 +00:00
Daniel Dunbar
30216ac9a9
Remove wpa 'example', it isn't being maintained.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 15:21:41 +00:00
Daniel Dunbar
f56a488a6b
Frontend: Change PluginASTAction::ParseArgs to take a CompilerInstance object
...
for use in reporting diagnostics.
- We don't want to use the Action's own CompilerInstance, because that is only
initialized during file processing and I like that invariant.
Also, if ParseArgs returns false then abandon execution.
Also, remove unused PluginASTAction::PrintHelp virtual method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 15:31:28 +00:00
Dan Gohman
1890eb81a6
Make a variable static.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 21:12:29 +00:00
Dan Gohman
b02d96bd7c
Use an export file. Plugins must export llvm::Registry symbols.
...
Also, don't link in all the clang libraries statically.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 21:12:10 +00:00
Peter Collingbourne
fa9fe0c62a
Fix clang-interpreter build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 17:59:51 +00:00
Zhongxing Xu
2ce43c8f43
Make a bunch of new data structures for the new analysis
...
engine of the new translation unit. State marshal is there but no real
work is done. End nodes are passed back.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:52:13 +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
Nick Lewycky
5ac7b29416
PrintFunctionNames is a plugin, it should pull in symbols from the clang binary
...
that loads it, not by linking against them directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-10 20:24:23 +00:00
Peter Collingbourne
f9c833940a
Fix CMake build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-09 23:06:34 +00:00
Zhongxing Xu
65d336b6b9
Add skeleton code to make wpa call the analysis engine.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06 09:18:02 +00:00
Zhongxing Xu
dc01a153f2
Collect function definitions in the Indexer when indexing through the ASTs.
...
Add an API to get an Entity associated with a name in the global namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06 05:55:13 +00:00
Zhongxing Xu
bed95e25b7
Create a ASTUnitTU class to interface ASTUnit to the Indexer.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 11:52:15 +00:00
Zhongxing Xu
81cc955f12
add -analyze-function option.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 07:03:03 +00:00
Zhongxing Xu
9b80ceba0f
add -view-call-graph option to wpa.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 06:58:30 +00:00
Zhongxing Xu
6d956dfcc7
Change CallGraph::Prog to be a reference. idx::Program means to be a global object to the Index library.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107461 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02 06:39:46 +00:00
Daniel Dunbar
3177aae51a
Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 16:59:23 +00:00
Daniel Dunbar
9b414d3e2d
Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
...
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 17:48:49 +00:00
Daniel Dunbar
c9f362d73b
Makefiles: Remove unnecessary early include of Makefile.config.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 20:57:22 +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
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
Daniel Dunbar
b15894eb2a
Update LINK_COMPONENTS for examples.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105607 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 15:38:01 +00:00
Benjamin Kramer
a4f0a80e73
Tip of the day: save before commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 11:55:38 +00:00
Benjamin Kramer
9e8635a86d
Fix -Wcast-qual warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101895 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-20 11:50:39 +00:00
Douglas Gregor
7969f936a1
clang-wpa fixes for Diagnostic
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 04:03:12 +00:00
Douglas Gregor
f45d67364e
Unbreak build
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 01:25:58 +00:00
Douglas Gregor
caff6ea818
Grrrr
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:48 +00:00
Douglas Gregor
f9b14a7af9
Try to de-bork build of WPA
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 21:47:24 +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
Kovarththanan Rajaratnam
dab10acd56
Wire up Daniel's new spiffy C interpreter into the CMake build system
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97311 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-27 07:46:49 +00:00
Kovarththanan Rajaratnam
87992993eb
Add comment
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-27 07:06:44 +00:00
Kovarththanan Rajaratnam
acf8444fb8
Add header + comments
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-27 07:05:56 +00:00
Daniel Dunbar
e22462867c
Add a minimal C interpreter example.
...
- Demonstrates how to build a standalone tool which loads source code using the
Driver and Frontend libraries, and then uses CodeGen and the JIT to actually
execute the code.
- Still more complicated than it should be, but hey its only 153 lines. :)
--
ddunbar@ozzy:tmp$ cat hello.c
#include <stdio.h>
int main() { printf("hello world\n"); return 0; }
ddunbar@ozzy:tmp$ clang-interpreter hello.c
hello world
--
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 08:49:05 +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
b469546a3b
Fix -plugin command line argument syntax for clang -cc1 change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92780 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:42:23 +00:00
Douglas Gregor
04f81b1fa0
Fix CMake build on windows, from Cedric Venet
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-20 20:56:30 +00:00
Daniel Dunbar
dd63b28107
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91176 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 23:04:35 +00:00
Daniel Dunbar
bb3503a146
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06 09:56:30 +00:00
Daniel Dunbar
8fd57fea85
Fix layering violation by moving Analysis/CallGraph to Index
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:20:04 +00:00
Daniel Dunbar
5262fda30b
Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 01:45:44 +00:00