aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInvocation.h
blob: 7cd68e81a278c6b503e0e1f86a267cb12a862c54 (plain)
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
40
41
42
43
//===-- CompilerInvocation.h - Compiler Invocation Helper Data --*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
#define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_

#include "clang/Frontend/DiagnosticOptions.h"
#include <string>

namespace clang {

/// CompilerInvocation - Helper class for holding the data necessary to invoke
/// the compiler.
///
/// This class is designed to represent an abstract "invocation" of the
/// compiler, including data such as the include paths, the code generation
/// options, the warning flags, and so on.
class CompilerInvocation {
  /// The location for the output file. This is optional only for compiler
  /// invocations which have no output.
  std::string OutputFile;

  DiagnosticOptions Diags;
  
public:
  CompilerInvocation() {}

  std::string &getOutputFile() { return OutputFile; }
  const std::string &getOutputFile() const { return OutputFile; }

  DiagnosticOptions &getDiagnosticOpts() { return Diags; }
  const DiagnosticOptions &getDiagnosticOpts() const { return Diags; }  
};

} // end namespace clang

#endif