From 06b0a7369fa4be5bfb19fe8db2ffb4ac5377e4a8 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Wed, 25 Apr 2012 13:57:00 +0000 Subject: Adds a document describing the various tooling approaches and their pros and cons. llvm-svn: 155549 --- clang/docs/Tooling.html | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 clang/docs/Tooling.html (limited to 'clang/docs/Tooling.html') diff --git a/clang/docs/Tooling.html b/clang/docs/Tooling.html new file mode 100644 index 00000000000..642f8abf4da --- /dev/null +++ b/clang/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...

+ + +
+ + + -- cgit v1.2.3