forked from include-what-you-use/include-what-you-use
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iwyu_driver.h
39 lines (29 loc) · 1.07 KB
/
iwyu_driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//===--- iwyu_driver.h - iwyu driver implementation -----------*- C++ -*---===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef INCLUDE_WHAT_YOU_USE_IWYU_DRIVER_H_
#define INCLUDE_WHAT_YOU_USE_IWYU_DRIVER_H_
#include <functional>
#include <memory>
namespace clang {
class FrontendAction;
namespace driver {
class ToolChain;
}
}
namespace include_what_you_use {
using clang::FrontendAction;
using clang::driver::ToolChain;
typedef std::function<std::unique_ptr<FrontendAction>(const ToolChain&)>
ActionFactory;
// Use Clang's Driver to parse the command-line arguments, set up the state for
// the compilation, and execute the right action. IWYU action type is injected
// via factory callback.
bool ExecuteAction(int argc, const char** argv, ActionFactory make_iwyu_action);
} // namespace include_what_you_use
#endif // INCLUDE_WHAT_YOU_USE_IWYU_DRIVER_H_