clang  15.0.0git
Public Attributes | List of all members
clang::CreateInvocationOptions Struct Reference

Optional inputs to createInvocation. More...

#include "clang/Frontend/Utils.h"

Collaboration diagram for clang::CreateInvocationOptions:
Collaboration graph
[legend]

Public Attributes

IntrusiveRefCntPtr< DiagnosticsEngineDiags = nullptr
 Receives diagnostics encountered while parsing command-line flags. More...
 
IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS = nullptr
 Used e.g. More...
 
bool RecoverOnError = false
 Whether to attempt to produce a non-null (possibly incorrect) invocation if any errors were encountered. More...
 
bool ProbePrecompiled = false
 Allow the driver to probe the filesystem for PCH files. More...
 
std::vector< std::string > * CC1Args = nullptr
 If set, the target is populated with the cc1 args produced by the driver. More...
 

Detailed Description

Optional inputs to createInvocation.

Definition at line 193 of file Utils.h.

Member Data Documentation

◆ CC1Args

std::vector<std::string>* clang::CreateInvocationOptions::CC1Args = nullptr

If set, the target is populated with the cc1 args produced by the driver.

This may be populated even if createInvocation returns nullptr.

Definition at line 212 of file Utils.h.

Referenced by clang::createInvocation().

◆ Diags

IntrusiveRefCntPtr<DiagnosticsEngine> clang::CreateInvocationOptions::Diags = nullptr

Receives diagnostics encountered while parsing command-line flags.

If not provided, these are printed to stderr.

Definition at line 196 of file Utils.h.

Referenced by clang::createInvocation(), and clang::ASTUnit::LoadFromCommandLine().

◆ ProbePrecompiled

bool clang::CreateInvocationOptions::ProbePrecompiled = false

Allow the driver to probe the filesystem for PCH files.

This is used to replace -include with -include-pch in the cc1 args. FIXME: ProbePrecompiled=true is a poor, historical default. It misbehaves if the PCH file is from GCC, has the wrong version, etc.

Definition at line 209 of file Utils.h.

Referenced by clang::createInvocation(), and clang::ASTUnit::LoadFromCommandLine().

◆ RecoverOnError

bool clang::CreateInvocationOptions::RecoverOnError = false

Whether to attempt to produce a non-null (possibly incorrect) invocation if any errors were encountered.

By default, always return null on errors.

Definition at line 204 of file Utils.h.

Referenced by clang::createInvocation().

◆ VFS

IntrusiveRefCntPtr<llvm::vfs::FileSystem> clang::CreateInvocationOptions::VFS = nullptr

Used e.g.

to probe for system headers locations. If not provided, the real filesystem is used. FIXME: the driver does perform some non-virtualized IO.

Definition at line 200 of file Utils.h.

Referenced by clang::createInvocation(), and clang::ASTUnit::LoadFromCommandLine().


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