clang  16.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? More...
 
bool isObjectiveC () const
 Is the language of the input some dialect of Objective-C? More...
 
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 148 of file FrontendOptions.h.

Member Enumeration Documentation

◆ Format

The input file format.

Enumerator
Source 
ModuleMap 
Precompiled 

Definition at line 158 of file FrontendOptions.h.

◆ HeaderUnitKind

Enumerator
HeaderUnit_None 
HeaderUnit_User 
HeaderUnit_System 
HeaderUnit_Abs 

Definition at line 167 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 174 of file FrontendOptions.h.

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

Member Function Documentation

◆ getFormat()

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

◆ getHeader()

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

◆ getHeaderUnitKind()

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

◆ getLanguage()

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

◆ getPreprocessed()

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

Definition at line 196 of file FrontendOptions.h.

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

Referenced by ParseFrontendArgs().

◆ isHeader()

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

Definition at line 185 of file FrontendOptions.h.

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

◆ isHeaderUnit()

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

Definition at line 186 of file FrontendOptions.h.

References HeaderUnit_None.

◆ isObjectiveC()

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

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

Definition at line 192 of file FrontendOptions.h.

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

◆ isPreprocessed()

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

Definition at line 184 of file FrontendOptions.h.

Referenced by GenerateFrontendArgs(), getHeader(), withFormat(), and withHeaderUnit().

◆ isUnknown()

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

Is the input kind fully-unknown?

Definition at line 189 of file FrontendOptions.h.

References Source, and clang::Unknown.

Referenced by ParseFrontendArgs().

◆ withFormat()

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

Definition at line 211 of file FrontendOptions.h.

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

Referenced by ParseFrontendArgs().

◆ withHeaderUnit()

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

Definition at line 206 of file FrontendOptions.h.

References getFormat(), getLanguage(), InputKind(), isHeader(), and isPreprocessed().

Referenced by ParseFrontendArgs().


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