blob: 815f3cc43865cfa7b7a35edb2cf1f6e82e23aee6 [file] [log] [blame]
Chris Lattner97e8b6f2007-10-07 06:04:32 +00001//===--- ASTConsumers.h - ASTConsumer implementations -----------*- C++ -*-===//
Reid Spencer5f016e22007-07-11 17:01:13 +00002//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner0bc735f2007-12-29 19:59:25 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Reid Spencer5f016e22007-07-11 17:01:13 +00007//
8//===----------------------------------------------------------------------===//
9//
Chris Lattner97e8b6f2007-10-07 06:04:32 +000010// AST Consumers.
Reid Spencer5f016e22007-07-11 17:01:13 +000011//
12//===----------------------------------------------------------------------===//
13
Chris Lattner97e8b6f2007-10-07 06:04:32 +000014#ifndef DRIVER_ASTCONSUMERS_H
15#define DRIVER_ASTCONSUMERS_H
Reid Spencer5f016e22007-07-11 17:01:13 +000016
Eli Friedman7df3d712008-02-16 23:17:23 +000017#include <string>
Ted Kremenekea75c552007-11-28 21:32:21 +000018#include <iosfwd>
Ted Kremenek1b5a4bd2007-11-27 21:46:50 +000019
Chris Lattnere66b65c2008-02-06 01:42:25 +000020namespace llvm {
21 class Module;
22 namespace sys { class Path; }
23}
Reid Spencer5f016e22007-07-11 17:01:13 +000024namespace clang {
25
Chris Lattner556beb72007-09-15 22:56:56 +000026class ASTConsumer;
Chris Lattnerc0508f92007-09-15 23:21:08 +000027class Diagnostic;
Ted Kremenekdca24662007-12-05 00:26:13 +000028class FileManager;
Chris Lattner45e8cbd2007-11-28 05:34:05 +000029struct LangOptions;
Reid Spencer5f016e22007-07-11 17:01:13 +000030
Ted Kremenekea75c552007-11-28 21:32:21 +000031ASTConsumer *CreateASTPrinter(std::ostream* OS = NULL);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000032
Chris Lattner3d4997d2007-09-15 23:02:28 +000033ASTConsumer *CreateASTDumper();
Ted Kremenekfdfc1982007-12-19 22:24:34 +000034
Ted Kremenek80de08f2007-09-19 21:29:43 +000035ASTConsumer *CreateASTViewer();
Ted Kremenekfdfc1982007-12-19 22:24:34 +000036
Ted Kremenek5f39c2d2008-02-22 20:00:31 +000037ASTConsumer *CreateCFGDumper(bool ViewGraphs, const std::string& FName);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000038
Ted Kremenekbfc10c92008-02-22 20:13:09 +000039ASTConsumer *CreateLiveVarAnalyzer(const std::string& fname);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000040
Chris Lattnerc0508f92007-09-15 23:21:08 +000041ASTConsumer *CreateDeadStoreChecker(Diagnostic &Diags);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000042
Ted Kremenek2bf55142007-09-17 20:49:30 +000043ASTConsumer *CreateUnitValsChecker(Diagnostic &Diags);
Ted Kremeneke603df42008-01-08 18:04:06 +000044
Ted Kremenekcb330932008-02-18 21:21:23 +000045ASTConsumer *CreateGRSimpleVals(Diagnostic &Diags,
46 const std::string& Function,
Ted Kremenekffe0f432008-03-07 22:58:01 +000047 bool Visualize = false, bool TrimGraph = false);
Ted Kremenek2fff37e2008-03-06 00:08:09 +000048
49ASTConsumer* CreateCFRefChecker(Diagnostic &Diags,
50 const std::string& FunctionName);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000051
Fariborz Jahanianb4b2f0c2008-01-18 01:15:54 +000052ASTConsumer *CreateCodeRewriterTest(const std::string& InFile,
Steve Naroff4f943c22008-03-10 20:43:59 +000053 Diagnostic &Diags,
54 const LangOptions &LOpts);
Ted Kremenekfdfc1982007-12-19 22:24:34 +000055
56ASTConsumer *CreateSerializationTest(Diagnostic &Diags,
57 FileManager& FMgr,
Ted Kremenekacc9f332007-12-05 21:34:36 +000058 const LangOptions &LOpts);
Ted Kremeneka1fa3a12007-12-13 00:37:31 +000059
Ted Kremenekf06c9282007-12-19 23:49:37 +000060ASTConsumer *CreateASTSerializer(const std::string& InFile,
61 const std::string& EmitDir,
Ted Kremenekfdfc1982007-12-19 22:24:34 +000062 Diagnostic &Diags,
63 const LangOptions &LOpts);
Ted Kremenek055c2752007-09-06 23:00:42 +000064
Reid Spencer5f016e22007-07-11 17:01:13 +000065} // end clang namespace
66
67#endif