clang 20.0.0git
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  Format { Source , ModuleMap , Precompiled }
 The input file format. More...
 
enum  HeaderUnitKind { HeaderUnit_None , HeaderUnit_User , HeaderUnit_System , HeaderUnit_Abs }
 

Public Member Functions

constexpr InputKind (Language L=Language::Unknown, Format F=Source, bool PP=false, HeaderUnitKind HU=HeaderUnit_None, bool HD=false)
 
Language getLanguage () const
 
Format getFormat () const
 
HeaderUnitKind getHeaderUnitKind () const
 
bool isPreprocessed () const
 
bool isHeader () const
 
bool isHeaderUnit () const
 
bool isUnknown () const
 Is the input kind fully-unknown?
 
bool isObjectiveC () const
 Is the language of the input some dialect of Objective-C?
 
InputKind getPreprocessed () const
 
InputKind getHeader () const
 
InputKind withHeaderUnit (HeaderUnitKind HU) const
 
InputKind withFormat (Format F) const
 

Detailed Description

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

Definition at line 157 of file FrontendOptions.h.

Member Enumeration Documentation

◆ Format

The input file format.

Enumerator
Source 
ModuleMap 
Precompiled 

Definition at line 160 of file FrontendOptions.h.

◆ HeaderUnitKind

Enumerator
HeaderUnit_None 
HeaderUnit_User 
HeaderUnit_System 
HeaderUnit_Abs 

Definition at line 169 of file FrontendOptions.h.

Constructor & Destructor Documentation

◆ InputKind()

constexpr clang::InputKind::InputKind ( Language  L = Language::Unknown,
Format  F = Source,
bool  PP = false,
HeaderUnitKind  HU = HeaderUnit_None,
bool  HD = false 
)
inlineconstexpr

Definition at line 188 of file FrontendOptions.h.

Member Function Documentation

◆ getFormat()

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

◆ getHeader()

InputKind clang::InputKind::getHeader ( ) const
inline

Definition at line 215 of file FrontendOptions.h.

References getFormat(), getHeaderUnitKind(), getLanguage(), and isPreprocessed().

Referenced by ParseFrontendArgs().

◆ getHeaderUnitKind()

HeaderUnitKind clang::InputKind::getHeaderUnitKind ( ) const
inline

◆ getLanguage()

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

◆ getPreprocessed()

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

Definition at line 210 of file FrontendOptions.h.

References getFormat(), getHeaderUnitKind(), getLanguage(), and isHeader().

Referenced by ParseFrontendArgs().

◆ isHeader()

bool clang::InputKind::isHeader ( ) const
inline

Definition at line 199 of file FrontendOptions.h.

Referenced by getPreprocessed(), withFormat(), and withHeaderUnit().

◆ isHeaderUnit()

bool clang::InputKind::isHeaderUnit ( ) const
inline

Definition at line 200 of file FrontendOptions.h.

References HeaderUnit_None.

Referenced by clang::FrontendAction::BeginSourceFile().

◆ isObjectiveC()

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

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

Definition at line 206 of file FrontendOptions.h.

References clang::ObjC, and clang::ObjCXX.

◆ isPreprocessed()

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

◆ isUnknown()

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

Is the input kind fully-unknown?

Definition at line 203 of file FrontendOptions.h.

References Source, and clang::Unknown.

Referenced by ParseFrontendArgs().

◆ withFormat()

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

Definition at line 225 of file FrontendOptions.h.

References getHeaderUnitKind(), getLanguage(), isHeader(), and isPreprocessed().

Referenced by ParseFrontendArgs().

◆ withHeaderUnit()

InputKind clang::InputKind::withHeaderUnit ( HeaderUnitKind  HU) const
inline

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