From: Manuel Klimek Date: Wed, 25 Apr 2012 13:57:00 +0000 (+0000) Subject: Adds a document describing the various tooling approaches and their pros and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9771a9e5725688306474bfdfd01e4759e3df83c6;p=clang Adds a document describing the various tooling approaches and their pros and cons. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155549 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/Tooling.html b/docs/Tooling.html new file mode 100644 index 0000000000..642f8abf4d --- /dev/null +++ b/docs/Tooling.html @@ -0,0 +1,100 @@ + + + +Writing Clang Tools + + + + +
+ +

Writing Clang Tools

+

Clang provides infrastructure to write tools that need syntactic and semantic +information about a program. This document will give a short introduction of the +different ways to write clang tools, and their pros and cons.

+ + +

LibClang

+ + +

LibClang is a stable high level C interface to clang. When in doubt LibClang +is probably the interface you want to use. Consider the other interfaces only +when you have a good reason not to use LibClang.

+

Canonical examples of when to use LibClang:

+ +

Use LibClang when you...

+ +

Do not use LibClang when you...

+ + + +

Clang Plugins

+ + +

Clang Plugins allow you to run additional actions on the AST as part of +a compilation. Plugins are dynamic libraries that are loaded at runtime by +the compiler, and they're easy to integrate into your build environment.

+

Canonical examples of when to use Clang Plugins:

+ +

Use Clang Plugins when you...

+ +

Do not use Clang Plugins when you...

+ + + +

LibTooling

+ + +

LibTooling is a C++ interface aimed at writing standalone tools, as well as +integrating into services that run clang tools.

+

Canonical examples of when to use LibTooling:

+ +

Use LibTooling when you...

+ +

Do not use LibTooling when you...

+ + +
+ + +