clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
Tooling
ArgumentsAdjusters.h
Go to the documentation of this file.
1
//===--- ArgumentsAdjusters.h - Command line arguments adjuster -*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file declares typedef ArgumentsAdjuster and functions to create several
11
// useful argument adjusters.
12
// ArgumentsAdjusters modify command line arguments obtained from a compilation
13
// database before they are used to run a frontend action.
14
//
15
//===----------------------------------------------------------------------===//
16
17
#ifndef LLVM_CLANG_TOOLING_ARGUMENTSADJUSTERS_H
18
#define LLVM_CLANG_TOOLING_ARGUMENTSADJUSTERS_H
19
20
#include <functional>
21
#include <string>
22
#include <vector>
23
24
namespace
clang {
25
namespace
tooling {
26
27
/// \brief A sequence of command line arguments.
28
typedef
std::vector<std::string>
CommandLineArguments
;
29
30
/// \brief A prototype of a command line adjuster.
31
///
32
/// Command line argument adjuster is responsible for command line arguments
33
/// modification before the arguments are used to run a frontend action.
34
typedef
std::function<CommandLineArguments(const CommandLineArguments &)>
35
ArgumentsAdjuster
;
36
37
/// \brief Gets an argument adjuster that converts input command line arguments
38
/// to the "syntax check only" variant.
39
ArgumentsAdjuster
getClangSyntaxOnlyAdjuster
();
40
41
/// \brief Gets an argument adjuster which removes output-related command line
42
/// arguments.
43
ArgumentsAdjuster
getClangStripOutputAdjuster
();
44
45
enum class
ArgumentInsertPosition
{
BEGIN
,
END
};
46
47
/// \brief Gets an argument adjuster which inserts \p Extra arguments in the
48
/// specified position.
49
ArgumentsAdjuster
getInsertArgumentAdjuster
(
const
CommandLineArguments
&Extra,
50
ArgumentInsertPosition
Pos);
51
52
/// \brief Gets an argument adjuster which inserts an \p Extra argument in the
53
/// specified position.
54
ArgumentsAdjuster
getInsertArgumentAdjuster
(
55
const
char
*Extra,
56
ArgumentInsertPosition
Pos =
ArgumentInsertPosition::END
);
57
58
/// \brief Gets an argument adjuster which adjusts the arguments in sequence
59
/// with the \p First adjuster and then with the \p Second one.
60
ArgumentsAdjuster
combineAdjusters
(
ArgumentsAdjuster
First,
61
ArgumentsAdjuster
Second);
62
63
}
// namespace tooling
64
}
// namespace clang
65
66
#endif // LLVM_CLANG_TOOLING_ARGUMENTSADJUSTERS_H
67
clang::tooling::ArgumentInsertPosition::BEGIN
clang::tooling::getInsertArgumentAdjuster
ArgumentsAdjuster getInsertArgumentAdjuster(const CommandLineArguments &Extra, ArgumentInsertPosition Pos)
Gets an argument adjuster which inserts Extra arguments in the specified position.
Definition:
ArgumentsAdjusters.cpp:56
clang::tooling::combineAdjusters
ArgumentsAdjuster combineAdjusters(ArgumentsAdjuster First, ArgumentsAdjuster Second)
Gets an argument adjuster which adjusts the arguments in sequence with the First adjuster and then wi...
Definition:
ArgumentsAdjusters.cpp:79
clang::tooling::getClangStripOutputAdjuster
ArgumentsAdjuster getClangStripOutputAdjuster()
Gets an argument adjuster which removes output-related command line arguments.
Definition:
ArgumentsAdjusters.cpp:38
clang::tooling::ArgumentInsertPosition
ArgumentInsertPosition
Definition:
ArgumentsAdjusters.h:45
clang::tooling::ArgumentsAdjuster
std::function< CommandLineArguments(const CommandLineArguments &)> ArgumentsAdjuster
A prototype of a command line adjuster.
Definition:
ArgumentsAdjusters.h:35
clang::tooling::ArgumentInsertPosition::END
clang::tooling::CommandLineArguments
std::vector< std::string > CommandLineArguments
A sequence of command line arguments.
Definition:
ArgumentsAdjusters.h:28
clang::tooling::getClangSyntaxOnlyAdjuster
ArgumentsAdjuster getClangSyntaxOnlyAdjuster()
Gets an argument adjuster that converts input command line arguments to the "syntax check only" varia...
Definition:
ArgumentsAdjusters.cpp:23
Generated on Mon Aug 31 2015 10:45:07 for clang by
1.8.6