clang 8.0.0

Public Types | Public Member Functions | List of all members
clang::InputKind Class Reference

The kind of a file that we've been handed as an input. More...

`#include "clang/Frontend/FrontendOptions.h"`

## Public Types
enum | Language { Unknown, Asm, LLVM_IR, C, CXX, ObjC, ObjCXX, OpenCL, CUDA, RenderScript, HIP }
| The language for the input, used to select and validate the language standard and possible actions. More...
enum | Format { Source, ModuleMap, Precompiled }
| The input file format. More...

## Public Member Functions
constexpr | InputKind (Language L=Unknown, Format F=Source, bool PP=false)
Language | getLanguage () const
Format | getFormat () const
bool | isPreprocessed () const
bool | isUnknown () const
| Is the input kind fully-unknown? More...
bool | isObjectiveC () const
| Is the language of the input some dialect of Objective-C? More...
InputKind | getPreprocessed () const
InputKind | withFormat (Format F) const

## Detailed Description

The kind of a file that we've been handed as an input.

Definition at line 137 of file FrontendOptions.h.

## Member Enumeration Documentation

## ◆ Format

enum clang::InputKind::Format

The input file format.

Enumerator
Source |
ModuleMap |
Precompiled |

Definition at line 169 of file FrontendOptions.h.

## ◆ Language

enum clang::InputKind::Language

The language for the input, used to select and validate the language standard and possible actions.

Enumerator
Unknown |
Asm | Assembly: we accept this only so that we can preprocess it.
LLVM_IR | LLVM IR: we accept this so that we can run the optimizer on it, and compile it to assembly or object code.
C | Languages that the frontend can parse and compile.
CXX |
ObjC |
ObjCXX |
OpenCL |
CUDA |
RenderScript |
HIP |

Definition at line 146 of file FrontendOptions.h.

## Constructor & Destructor Documentation

## ◆ InputKind()

constexpr clang::InputKind::InputKind | ( | Language | L = `Unknown`,
|  | Format | F = `Source`,
|  | bool | PP = `false`
| ) |  |
| inline

Definition at line 175 of file FrontendOptions.h.

## Member Function Documentation

## ◆ getFormat()

Format clang::InputKind::getFormat | ( |  | ) | const
| inline

Definition at line 180 of file FrontendOptions.h.

Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::InitializeSourceManager(), and ParseFrontendArgs().

## ◆ getLanguage()

Language clang::InputKind::getLanguage | ( |  | ) | const
| inline

Definition at line 179 of file FrontendOptions.h.

Referenced by clang::FrontendAction::BeginSourceFile(), GetInputKindName(), getOptimizationLevel(), and clang::CompilerInvocation::setLangDefaults().

## ◆ getPreprocessed()

InputKind clang::InputKind::getPreprocessed | ( |  | ) | const
| inline

Definition at line 189 of file FrontendOptions.h.

Referenced by ParseFrontendArgs().

## ◆ isObjectiveC()

bool clang::InputKind::isObjectiveC | ( |  | ) | const
| inline

Is the language of the input some dialect of Objective-C?

Definition at line 187 of file FrontendOptions.h.

Referenced by clang::CompilerInvocation::setLangDefaults().

## ◆ isPreprocessed()

bool clang::InputKind::isPreprocessed | ( |  | ) | const
| inline

Definition at line 181 of file FrontendOptions.h.

Referenced by clang::FrontendInputFile::isPreprocessed().

## ◆ isUnknown()

bool clang::InputKind::isUnknown | ( |  | ) | const
| inline

Is the input kind fully-unknown?

Definition at line 184 of file FrontendOptions.h.

Referenced by ParseFrontendArgs().

## ◆ withFormat()

InputKind clang::InputKind::withFormat | ( | Format | F | ) | const
| inline

Definition at line 193 of file FrontendOptions.h.

Referenced by ParseFrontendArgs().

The documentation for this class was generated from the following file:

- include/clang/Frontend/FrontendOptions.h