diff options
Diffstat (limited to 'include/clang/Driver')
-rw-r--r-- | include/clang/Driver/Action.h | 317 | ||||
-rw-r--r-- | include/clang/Driver/CC1Options.td | 718 | ||||
-rw-r--r-- | include/clang/Driver/CLCompatOptions.td | 342 | ||||
-rw-r--r-- | include/clang/Driver/CMakeLists.txt | 3 | ||||
-rw-r--r-- | include/clang/Driver/Compilation.h | 202 | ||||
-rw-r--r-- | include/clang/Driver/Driver.h | 468 | ||||
-rw-r--r-- | include/clang/Driver/DriverDiagnostic.h | 28 | ||||
-rw-r--r-- | include/clang/Driver/Job.h | 174 | ||||
-rw-r--r-- | include/clang/Driver/Makefile | 10 | ||||
-rw-r--r-- | include/clang/Driver/Multilib.h | 175 | ||||
-rw-r--r-- | include/clang/Driver/Options.h | 51 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 2133 | ||||
-rw-r--r-- | include/clang/Driver/Phases.h | 37 | ||||
-rw-r--r-- | include/clang/Driver/SanitizerArgs.h | 73 | ||||
-rw-r--r-- | include/clang/Driver/Tool.h | 137 | ||||
-rw-r--r-- | include/clang/Driver/ToolChain.h | 418 | ||||
-rw-r--r-- | include/clang/Driver/Types.def | 96 | ||||
-rw-r--r-- | include/clang/Driver/Types.h | 97 | ||||
-rw-r--r-- | include/clang/Driver/Util.h | 32 |
19 files changed, 0 insertions, 5511 deletions
diff --git a/include/clang/Driver/Action.h b/include/clang/Driver/Action.h deleted file mode 100644 index fc31d4b..0000000 --- a/include/clang/Driver/Action.h +++ /dev/null @@ -1,317 +0,0 @@ -//===--- Action.h - Abstract compilation steps ------------------*- 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_DRIVER_ACTION_H -#define LLVM_CLANG_DRIVER_ACTION_H - -#include "clang/Driver/Types.h" -#include "clang/Driver/Util.h" -#include "llvm/ADT/SmallVector.h" - -namespace llvm { -namespace opt { - class Arg; -} -} - -namespace clang { -namespace driver { - -/// Action - Represent an abstract compilation step to perform. -/// -/// An action represents an edge in the compilation graph; typically -/// it is a job to transform an input using some tool. -/// -/// The current driver is hard wired to expect actions which produce a -/// single primary output, at least in terms of controlling the -/// compilation. Actions can produce auxiliary files, but can only -/// produce a single output to feed into subsequent actions. -class Action { -public: - typedef ActionList::size_type size_type; - typedef ActionList::iterator iterator; - typedef ActionList::const_iterator const_iterator; - - enum ActionClass { - InputClass = 0, - BindArchClass, - CudaDeviceClass, - CudaHostClass, - PreprocessJobClass, - PrecompileJobClass, - AnalyzeJobClass, - MigrateJobClass, - CompileJobClass, - BackendJobClass, - AssembleJobClass, - LinkJobClass, - LipoJobClass, - DsymutilJobClass, - VerifyDebugInfoJobClass, - VerifyPCHJobClass, - - JobClassFirst=PreprocessJobClass, - JobClassLast=VerifyPCHJobClass - }; - - static const char *getClassName(ActionClass AC); - -private: - ActionClass Kind; - - /// The output type of this action. - types::ID Type; - - ActionList Inputs; - - unsigned OwnsInputs : 1; - -protected: - Action(ActionClass Kind, types::ID Type) - : Kind(Kind), Type(Type), OwnsInputs(true) {} - Action(ActionClass Kind, std::unique_ptr<Action> Input, types::ID Type) - : Kind(Kind), Type(Type), Inputs(1, Input.release()), OwnsInputs(true) { - } - Action(ActionClass Kind, std::unique_ptr<Action> Input) - : Kind(Kind), Type(Input->getType()), Inputs(1, Input.release()), - OwnsInputs(true) {} - Action(ActionClass Kind, const ActionList &Inputs, types::ID Type) - : Kind(Kind), Type(Type), Inputs(Inputs), OwnsInputs(true) {} -public: - virtual ~Action(); - - const char *getClassName() const { return Action::getClassName(getKind()); } - - bool getOwnsInputs() { return OwnsInputs; } - void setOwnsInputs(bool Value) { OwnsInputs = Value; } - - ActionClass getKind() const { return Kind; } - types::ID getType() const { return Type; } - - ActionList &getInputs() { return Inputs; } - const ActionList &getInputs() const { return Inputs; } - - size_type size() const { return Inputs.size(); } - - iterator begin() { return Inputs.begin(); } - iterator end() { return Inputs.end(); } - const_iterator begin() const { return Inputs.begin(); } - const_iterator end() const { return Inputs.end(); } -}; - -class InputAction : public Action { - virtual void anchor(); - const llvm::opt::Arg &Input; - -public: - InputAction(const llvm::opt::Arg &Input, types::ID Type); - - const llvm::opt::Arg &getInputArg() const { return Input; } - - static bool classof(const Action *A) { - return A->getKind() == InputClass; - } -}; - -class BindArchAction : public Action { - virtual void anchor(); - /// The architecture to bind, or 0 if the default architecture - /// should be bound. - const char *ArchName; - -public: - BindArchAction(std::unique_ptr<Action> Input, const char *ArchName); - - const char *getArchName() const { return ArchName; } - - static bool classof(const Action *A) { - return A->getKind() == BindArchClass; - } -}; - -class CudaDeviceAction : public Action { - virtual void anchor(); - /// GPU architecture to bind -- e.g 'sm_35'. - const char *GpuArchName; - /// True when action results are not consumed by the host action (e.g when - /// -fsyntax-only or --cuda-device-only options are used). - bool AtTopLevel; - -public: - CudaDeviceAction(std::unique_ptr<Action> Input, const char *ArchName, - bool AtTopLevel); - - const char *getGpuArchName() const { return GpuArchName; } - bool isAtTopLevel() const { return AtTopLevel; } - - static bool classof(const Action *A) { - return A->getKind() == CudaDeviceClass; - } -}; - -class CudaHostAction : public Action { - virtual void anchor(); - ActionList DeviceActions; - -public: - CudaHostAction(std::unique_ptr<Action> Input, - const ActionList &DeviceActions); - ~CudaHostAction() override; - - const ActionList &getDeviceActions() const { return DeviceActions; } - - static bool classof(const Action *A) { return A->getKind() == CudaHostClass; } -}; - -class JobAction : public Action { - virtual void anchor(); -protected: - JobAction(ActionClass Kind, std::unique_ptr<Action> Input, types::ID Type); - JobAction(ActionClass Kind, const ActionList &Inputs, types::ID Type); - -public: - static bool classof(const Action *A) { - return (A->getKind() >= JobClassFirst && - A->getKind() <= JobClassLast); - } -}; - -class PreprocessJobAction : public JobAction { - void anchor() override; -public: - PreprocessJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == PreprocessJobClass; - } -}; - -class PrecompileJobAction : public JobAction { - void anchor() override; -public: - PrecompileJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == PrecompileJobClass; - } -}; - -class AnalyzeJobAction : public JobAction { - void anchor() override; -public: - AnalyzeJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == AnalyzeJobClass; - } -}; - -class MigrateJobAction : public JobAction { - void anchor() override; -public: - MigrateJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == MigrateJobClass; - } -}; - -class CompileJobAction : public JobAction { - void anchor() override; -public: - CompileJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == CompileJobClass; - } -}; - -class BackendJobAction : public JobAction { - void anchor() override; -public: - BackendJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == BackendJobClass; - } -}; - -class AssembleJobAction : public JobAction { - void anchor() override; -public: - AssembleJobAction(std::unique_ptr<Action> Input, types::ID OutputType); - - static bool classof(const Action *A) { - return A->getKind() == AssembleJobClass; - } -}; - -class LinkJobAction : public JobAction { - void anchor() override; -public: - LinkJobAction(ActionList &Inputs, types::ID Type); - - static bool classof(const Action *A) { - return A->getKind() == LinkJobClass; - } -}; - -class LipoJobAction : public JobAction { - void anchor() override; -public: - LipoJobAction(ActionList &Inputs, types::ID Type); - - static bool classof(const Action *A) { - return A->getKind() == LipoJobClass; - } -}; - -class DsymutilJobAction : public JobAction { - void anchor() override; -public: - DsymutilJobAction(ActionList &Inputs, types::ID Type); - - static bool classof(const Action *A) { - return A->getKind() == DsymutilJobClass; - } -}; - -class VerifyJobAction : public JobAction { - void anchor() override; -public: - VerifyJobAction(ActionClass Kind, std::unique_ptr<Action> Input, - types::ID Type); - static bool classof(const Action *A) { - return A->getKind() == VerifyDebugInfoJobClass || - A->getKind() == VerifyPCHJobClass; - } -}; - -class VerifyDebugInfoJobAction : public VerifyJobAction { - void anchor() override; -public: - VerifyDebugInfoJobAction(std::unique_ptr<Action> Input, types::ID Type); - static bool classof(const Action *A) { - return A->getKind() == VerifyDebugInfoJobClass; - } -}; - -class VerifyPCHJobAction : public VerifyJobAction { - void anchor() override; -public: - VerifyPCHJobAction(std::unique_ptr<Action> Input, types::ID Type); - static bool classof(const Action *A) { - return A->getKind() == VerifyPCHJobClass; - } -}; - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td deleted file mode 100644 index 051f903..0000000 --- a/include/clang/Driver/CC1Options.td +++ /dev/null @@ -1,718 +0,0 @@ -//===--- CC1Options.td - Options for clang -cc1 ---------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the options accepted by clang -cc1 and clang -cc1as. -// -//===----------------------------------------------------------------------===// - -let Flags = [CC1Option, NoDriverOption] in { - -//===----------------------------------------------------------------------===// -// Target Options -//===----------------------------------------------------------------------===// - -let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { - -def target_cpu : Separate<["-"], "target-cpu">, - HelpText<"Target a specific cpu type">; -def target_feature : Separate<["-"], "target-feature">, - HelpText<"Target specific attributes">; -def triple : Separate<["-"], "triple">, - HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; -def target_abi : Separate<["-"], "target-abi">, - HelpText<"Target a particular ABI type">; - -} - -def target_linker_version : Separate<["-"], "target-linker-version">, - HelpText<"Target linker version">; -def triple_EQ : Joined<["-"], "triple=">, Alias<triple>; -def mfpmath : Separate<["-"], "mfpmath">, - HelpText<"Which unit to use for fp math">; - -//===----------------------------------------------------------------------===// -// Analyzer Options -//===----------------------------------------------------------------------===// - -def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">, - HelpText<"Generate unoptimized CFGs for all analyses">; -def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">, - HelpText<"Add C++ implicit destructors to CFGs for all analyses">; - -def analyzer_store : Separate<["-"], "analyzer-store">, - HelpText<"Source Code Analysis - Abstract Memory Store Models">; -def analyzer_store_EQ : Joined<["-"], "analyzer-store=">, Alias<analyzer_store>; - -def analyzer_constraints : Separate<["-"], "analyzer-constraints">, - HelpText<"Source Code Analysis - Symbolic Constraint Engines">; -def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">, - Alias<analyzer_constraints>; - -def analyzer_output : Separate<["-"], "analyzer-output">, - HelpText<"Source Code Analysis - Output Options">; -def analyzer_output_EQ : Joined<["-"], "analyzer-output=">, - Alias<analyzer_output>; - -def analyzer_purge : Separate<["-"], "analyzer-purge">, - HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">; -def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>; - -def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">, - HelpText<"Force the static analyzer to analyze functions defined in header files">; -def analyzer_opt_analyze_nested_blocks : Flag<["-"], "analyzer-opt-analyze-nested-blocks">, - HelpText<"Analyze the definitions of blocks in addition to functions">; -def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">, - HelpText<"Emit verbose output about the analyzer's progress">; -def analyze_function : Separate<["-"], "analyze-function">, - HelpText<"Run analysis on specific function">; -def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>; -def analyzer_eagerly_assume : Flag<["-"], "analyzer-eagerly-assume">, - HelpText<"Eagerly assume the truth/falseness of some symbolic constraints">; -def trim_egraph : Flag<["-"], "trim-egraph">, - HelpText<"Only show error-related paths in the analysis graph">; -def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">, - HelpText<"Display exploded graph using GraphViz">; -def analyzer_viz_egraph_ubigraph : Flag<["-"], "analyzer-viz-egraph-ubigraph">, - HelpText<"Display exploded graph using Ubigraph">; - -def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">, - HelpText<"Bound on stack depth while inlining (4 by default)">; -def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">, - Alias<analyzer_inline_max_stack_depth>; - -def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">, - HelpText<"Specify the function selection heuristic used during inlining">; -def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>; - -def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">, - HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">; - -def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">, - HelpText<"The maximum number of times the analyzer will go through a loop">; -def analyzer_stats : Flag<["-"], "analyzer-stats">, - HelpText<"Print internal analyzer statistics.">; - -def analyzer_checker : Separate<["-"], "analyzer-checker">, - HelpText<"Choose analyzer checkers to enable">; -def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">, - Alias<analyzer_checker>; - -def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">, - HelpText<"Choose analyzer checkers to disable">; -def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">, - Alias<analyzer_disable_checker>; - -def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">, - HelpText<"Disable all static analyzer checks">; - -def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">, - HelpText<"Display the list of analyzer checkers that are available">; - -def analyzer_config : Separate<["-"], "analyzer-config">, - HelpText<"Choose analyzer options to enable">; - -//===----------------------------------------------------------------------===// -// Migrator Options -//===----------------------------------------------------------------------===// -def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">, - HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">; - -def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">, - HelpText<"Do not remove finalize method in gc mode">; - -//===----------------------------------------------------------------------===// -// CodeGen Options -//===----------------------------------------------------------------------===// - -let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { - -def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; -def dwarf_version_EQ : Joined<["-"], "dwarf-version=">; -def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">; -def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, - HelpText<"The compilation directory to embed in the debug info.">; -def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, - HelpText<"The string to embed in the Dwarf debug flags record.">; -def mno_exec_stack : Flag<["-"], "mnoexecstack">, - HelpText<"Mark the file as not needing an executable stack">; -def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, - HelpText<"Make assembler warnings fatal">; -def compress_debug_sections : Flag<["-"], "compress-debug-sections">, - HelpText<"Compress DWARF debug sections using zlib">; -def msave_temp_labels : Flag<["-"], "msave-temp-labels">, - HelpText<"Save temporary labels in the symbol table. " - "Note this may change .s semantics and shouldn't generally be used " - "on compiler-generated code.">; -def mrelocation_model : Separate<["-"], "mrelocation-model">, - HelpText<"The relocation model to use">; -} - -def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">, - HelpText<"Don't run LLVM optimization passes">; -def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">, - HelpText<"Don't run the LLVM IR verifier pass">; -def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">, - HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the " - "frontend by not running any LLVM passes at all">; -def disable_red_zone : Flag<["-"], "disable-red-zone">, - HelpText<"Do not emit code that uses the red zone.">; -def dwarf_column_info : Flag<["-"], "dwarf-column-info">, - HelpText<"Turn on column location information.">; -def split_dwarf : Flag<["-"], "split-dwarf">, - HelpText<"Split out the dwarf .dwo sections">; -def gnu_pubnames : Flag<["-"], "gnu-pubnames">, - HelpText<"Emit newer GNU style pubnames">; -def arange_sections : Flag<["-"], "arange_sections">, - HelpText<"Emit DWARF .debug_arange sections">; -def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">, - HelpText<"Generate debug info with external references to clang modules" - " or precompiled headers">; -def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">, - HelpText<"Emit an error if a C++ static local initializer would need a guard variable">; -def no_implicit_float : Flag<["-"], "no-implicit-float">, - HelpText<"Don't generate implicit floating point instructions">; -def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">, - HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">; -def fmerge_functions : Flag<["-"], "fmerge-functions">, - HelpText<"Permit merging of identical functions when optimizing.">; -def femit_coverage_notes : Flag<["-"], "femit-coverage-notes">, - HelpText<"Emit a gcov coverage notes file when compiling.">; -def femit_coverage_data: Flag<["-"], "femit-coverage-data">, - HelpText<"Instrument the program to emit gcov coverage data when run.">; -def coverage_file : Separate<["-"], "coverage-file">, - HelpText<"Emit coverage data to this filename. The extension will be replaced.">; -def coverage_file_EQ : Joined<["-"], "coverage-file=">, Alias<coverage_file>; -def coverage_cfg_checksum : Flag<["-"], "coverage-cfg-checksum">, - HelpText<"Emit CFG checksum for functions in .gcno files.">; -def coverage_no_function_names_in_data : Flag<["-"], "coverage-no-function-names-in-data">, - HelpText<"Emit function names in .gcda files.">; -def coverage_exit_block_before_body : Flag<["-"], "coverage-exit-block-before-body">, - HelpText<"Emit the exit block before the body blocks in .gcno files.">; -def coverage_version_EQ : Joined<["-"], "coverage-version=">, - HelpText<"Four-byte version string for gcov files.">; -def test_coverage : Flag<["-"], "test-coverage">, - HelpText<"Do not generate coverage files or remove coverage changes from IR">; -def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">, - HelpText<"Dump the coverage mapping records, for testing">; -def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">, - HelpText<"Use register sized accesses to bit-fields, when possible.">; -def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">, - HelpText<"Turn off Type Based Alias Analysis">; -def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, - HelpText<"Turn off struct-path aware Type Based Alias Analysis">; -def masm_verbose : Flag<["-"], "masm-verbose">, - HelpText<"Generate verbose assembly output">; -def mcode_model : Separate<["-"], "mcode-model">, - HelpText<"The code model to use">; -def mdebug_pass : Separate<["-"], "mdebug-pass">, - HelpText<"Enable additional debug output">; -def mdisable_fp_elim : Flag<["-"], "mdisable-fp-elim">, - HelpText<"Disable frame pointer elimination optimization">; -def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">, - HelpText<"Disable tail call optimization, keeping the call stack accurate">; -def menable_no_infinities : Flag<["-"], "menable-no-infs">, - HelpText<"Allow optimization to assume there are no infinities.">; -def menable_no_nans : Flag<["-"], "menable-no-nans">, - HelpText<"Allow optimization to assume there are no NaNs.">; -def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, - HelpText<"Allow unsafe floating-point math optimizations which may decrease " - "precision">; -def mfloat_abi : Separate<["-"], "mfloat-abi">, - HelpText<"The float ABI to use">; -def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, - HelpText<"Limit float precision to the given value">; -def split_stacks : Flag<["-"], "split-stacks">, - HelpText<"Try to use a split stack if possible.">; -def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">, - HelpText<"Do not put zero initialized data in the BSS">; -def backend_option : Separate<["-"], "backend-option">, - HelpText<"Additional arguments to forward to LLVM backend (during code gen)">; -def mregparm : Separate<["-"], "mregparm">, - HelpText<"Limit the number of registers available for integer arguments">; -def munwind_tables : Flag<["-"], "munwind-tables">, - HelpText<"Generate unwinding tables for all functions">; -def mconstructor_aliases : Flag<["-"], "mconstructor-aliases">, - HelpText<"Emit complete constructors and destructors as aliases when possible">; -def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">, - HelpText<"Link the given bitcode file before performing optimizations.">; -def mlink_cuda_bitcode : Separate<["-"], "mlink-cuda-bitcode">, - HelpText<"Link and internalize needed symbols from the given bitcode file " - "before performing optimizations.">; -def vectorize_loops : Flag<["-"], "vectorize-loops">, - HelpText<"Run the Loop vectorization passes">; -def vectorize_slp : Flag<["-"], "vectorize-slp">, - HelpText<"Run the SLP vectorization passes">; -def vectorize_slp_aggressive : Flag<["-"], "vectorize-slp-aggressive">, - HelpText<"Run the BB vectorization passes">; -def dependent_lib : Joined<["--"], "dependent-lib=">, - HelpText<"Add dependent library">; -def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">, - HelpText<"Sanitizer coverage type">; -def fsanitize_coverage_indirect_calls - : Flag<["-"], "fsanitize-coverage-indirect-calls">, - HelpText<"Enable sanitizer coverage for indirect calls">; -def fsanitize_coverage_trace_bb - : Flag<["-"], "fsanitize-coverage-trace-bb">, - HelpText<"Enable basic block tracing in sanitizer coverage">; -def fsanitize_coverage_trace_cmp - : Flag<["-"], "fsanitize-coverage-trace-cmp">, - HelpText<"Enable cmp instruction tracing in sanitizer coverage">; -def fsanitize_coverage_8bit_counters - : Flag<["-"], "fsanitize-coverage-8bit-counters">, - HelpText<"Enable frequency counters in sanitizer coverage">; - -//===----------------------------------------------------------------------===// -// Dependency Output Options -//===----------------------------------------------------------------------===// - -def sys_header_deps : Flag<["-"], "sys-header-deps">, - HelpText<"Include system headers in dependency output">; -def module_file_deps : Flag<["-"], "module-file-deps">, - HelpText<"Include module files in dependency output">; -def header_include_file : Separate<["-"], "header-include-file">, - HelpText<"Filename (or -) to write header include output to">; -def show_includes : Flag<["--"], "show-includes">, - HelpText<"Print cl.exe style /showIncludes to stdout">; - -//===----------------------------------------------------------------------===// -// Diagnostic Options -//===----------------------------------------------------------------------===// - -def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">, - HelpText<"Filename (or -) to log diagnostics to">; -def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">, - MetaVarName<"<filename>">, - HelpText<"File for serializing diagnostics in a binary format">; - -def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">, - HelpText<"Change diagnostic formatting to match IDE and command line tools">; -def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">, - HelpText<"Print diagnostic category">; -def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">, - HelpText<"Ignore #line directives when displaying diagnostic locations">; -def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">, - HelpText<"Set the tab stop distance.">; -def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">, - HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">; -def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">, - HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">; -def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">, - HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">; -def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">, - HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">; -def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">, - HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">; -def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">, - HelpText<"Format message diagnostics so that they fit within N columns or fewer, when possible.">; -def verify : Flag<["-"], "verify">, - HelpText<"Verify diagnostic output using comment directives">; -def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">, - HelpText<"Ignore unexpected diagnostic messages">; -def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">, - HelpText<"Ignore unexpected diagnostic messages">; -def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, - HelpText<"Silence ObjC rewriting warnings">; - -//===----------------------------------------------------------------------===// -// Frontend Options -//===----------------------------------------------------------------------===// - -// This isn't normally used, it is just here so we can parse a -// CompilerInvocation out of a driver-derived argument vector. -def cc1 : Flag<["-"], "cc1">; -def cc1as : Flag<["-"], "cc1as">; - -def ast_merge : Separate<["-"], "ast-merge">, - MetaVarName<"<ast file>">, - HelpText<"Merge the given AST file into the translation unit being compiled.">; -def aux_triple : Separate<["-"], "aux-triple">, - HelpText<"Auxiliary target triple.">; -def code_completion_at : Separate<["-"], "code-completion-at">, - MetaVarName<"<file>:<line>:<column>">, - HelpText<"Dump code-completion information at a location">; -def remap_file : Separate<["-"], "remap-file">, - MetaVarName<"<from>;<to>">, - HelpText<"Replace the contents of the <from> file with the contents of the <to> file">; -def code_completion_at_EQ : Joined<["-"], "code-completion-at=">, - Alias<code_completion_at>; -def code_completion_macros : Flag<["-"], "code-completion-macros">, - HelpText<"Include macros in code-completion results">; -def code_completion_patterns : Flag<["-"], "code-completion-patterns">, - HelpText<"Include code patterns in code-completion results">; -def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">, - HelpText<"Do not include global declarations in code-completion results.">; -def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">, - HelpText<"Include brief documentation comments in code-completion results.">; -def disable_free : Flag<["-"], "disable-free">, - HelpText<"Disable freeing of memory on exit">; -def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">, - HelpText<"Load the named plugin (dynamic shared object)">; -def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">, - HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">; -def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">, - MetaVarName<"<name> <arg>">, - HelpText<"Pass <arg> to plugin <name>">; -def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">, - HelpText<"Use the named plugin action in addition to the default action">; -def ast_dump_filter : Separate<["-"], "ast-dump-filter">, - MetaVarName<"<dump_filter>">, - HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration" - " nodes having a certain substring in a qualified name. Use" - " -ast-list to list all filterable declaration node names.">; -def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">, - HelpText<"Do not automatically generate or update the global module index">; -def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">, - HelpText<"Do not automatically import modules for error recovery">; -def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">, - MetaVarName<"<name>">, - HelpText<"Specify the name of the module whose implementation file this is">; -def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">, - HelpText<"Use the current working directory as the home directory of " - "module maps specified by -fmodule-map-file=<FILE>">; -def fmodule_feature : Separate<["-"], "fmodule-feature">, - MetaVarName<"<feature>">, - HelpText<"Enable <feature> in module map requires declarations">; -def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">, - MetaVarName<"<file>">, - HelpText<"Embed the contents of the specified file into the module file " - "being compiled.">; -def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">, - HelpText<"Embed the contents of all files read by this compilation into " - "the produced module file.">; -def fmodules_local_submodule_visibility : - Flag<["-"], "fmodules-local-submodule-visibility">, - HelpText<"Enforce name visibility rules across submodules of the same " - "top-level module.">; -def fmodule_format_EQ : Joined<["-"], "fmodule-format=">, - HelpText<"Select the container format for clang modules and PCH. " - "Supported options are 'raw' and 'obj'.">; -def ftest_module_file_extension_EQ : - Joined<["-"], "ftest-module-file-extension=">, - HelpText<"introduce a module file extension for testing purposes. " - "The argument is parsed as blockname:major:minor:hashed:user info">; -def fconcepts_ts : Flag<["-"], "fconcepts-ts">, - HelpText<"Enable C++ Extensions for Concepts.">; - -let Group = Action_Group in { - -def Eonly : Flag<["-"], "Eonly">, - HelpText<"Just run preprocessor, no output (for timings)">; -def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">, - HelpText<"Lex file in raw mode and dump raw tokens">; -def analyze : Flag<["-"], "analyze">, - HelpText<"Run static analysis engine">; -def dump_tokens : Flag<["-"], "dump-tokens">, - HelpText<"Run preprocessor, dump internal rep of tokens">; -def init_only : Flag<["-"], "init-only">, - HelpText<"Only execute frontend initialization">; -def fixit : Flag<["-"], "fixit">, - HelpText<"Apply fix-it advice to the input source">; -def fixit_EQ : Joined<["-"], "fixit=">, - HelpText<"Apply fix-it advice creating a file with the given suffix">; -def print_preamble : Flag<["-"], "print-preamble">, - HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit" - " precompiled headers.">; -def emit_html : Flag<["-"], "emit-html">, - HelpText<"Output input source as HTML">; -def ast_print : Flag<["-"], "ast-print">, - HelpText<"Build ASTs and then pretty-print them">; -def ast_list : Flag<["-"], "ast-list">, - HelpText<"Build ASTs and print the list of declaration node qualified names">; -def ast_dump : Flag<["-"], "ast-dump">, - HelpText<"Build ASTs and then debug dump them">; -def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">, - HelpText<"Build ASTs and then debug dump their name lookup tables">; -def ast_view : Flag<["-"], "ast-view">, - HelpText<"Build ASTs and view them with GraphViz">; -def print_decl_contexts : Flag<["-"], "print-decl-contexts">, - HelpText<"Print DeclContexts and their Decls">; -def emit_module : Flag<["-"], "emit-module">, - HelpText<"Generate pre-compiled module file from a module map">; -def emit_pth : Flag<["-"], "emit-pth">, - HelpText<"Generate pre-tokenized header file">; -def emit_pch : Flag<["-"], "emit-pch">, - HelpText<"Generate pre-compiled header file">; -def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">, - HelpText<"Build ASTs then convert to LLVM, emit .bc file">; -def emit_llvm_only : Flag<["-"], "emit-llvm-only">, - HelpText<"Build ASTs and convert to LLVM, discarding output">; -def emit_codegen_only : Flag<["-"], "emit-codegen-only">, - HelpText<"Generate machine code, but discard output">; -def emit_obj : Flag<["-"], "emit-obj">, - HelpText<"Emit native object files">; -def rewrite_test : Flag<["-"], "rewrite-test">, - HelpText<"Rewriter playground">; -def rewrite_macros : Flag<["-"], "rewrite-macros">, - HelpText<"Expand macros without full preprocessing">; -def migrate : Flag<["-"], "migrate">, - HelpText<"Migrate source code">; -} - -def emit_llvm_uselists : Flag<["-"], "emit-llvm-uselists">, - HelpText<"Preserve order of LLVM use-lists when serializing">; -def no_emit_llvm_uselists : Flag<["-"], "no-emit-llvm-uselists">, - HelpText<"Don't preserve order of LLVM use-lists when serializing">; - -def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">, - HelpText<"Directory for temporary files produced during ARC or ObjC migration">; -def arcmt_check : Flag<["-"], "arcmt-check">, - HelpText<"Check for ARC migration issues that need manual handling">; -def arcmt_modify : Flag<["-"], "arcmt-modify">, - HelpText<"Apply modifications to files to conform to ARC">; -def arcmt_migrate : Flag<["-"], "arcmt-migrate">, - HelpText<"Apply modifications and produces temporary files that conform to ARC">; - -def print_stats : Flag<["-"], "print-stats">, - HelpText<"Print performance metrics and statistics">; -def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">, - HelpText<"Dump record layout information">; -def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">, - HelpText<"Dump record layout information in a simple form used for testing">; -def fix_what_you_can : Flag<["-"], "fix-what-you-can">, - HelpText<"Apply fix-it advice even in the presence of unfixable errors">; -def fix_only_warnings : Flag<["-"], "fix-only-warnings">, - HelpText<"Apply fix-it advice only for warnings, not errors">; -def fixit_recompile : Flag<["-"], "fixit-recompile">, - HelpText<"Apply fix-it changes and recompile">; -def fixit_to_temp : Flag<["-"], "fixit-to-temporary">, - HelpText<"Apply fix-it changes to temporary files">; - -def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">, - HelpText<"Override record layouts with those in the given file">; - -//===----------------------------------------------------------------------===// -// Language Options -//===----------------------------------------------------------------------===// - -let Flags = [CC1Option, CC1AsOption, NoDriverOption] in { - -def version : Flag<["-"], "version">, - HelpText<"Print the compiler version">; -def main_file_name : Separate<["-"], "main-file-name">, - HelpText<"Main file name to use for debug info">; - -} - -def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">, - HelpText<"Weakly link in the blocks runtime">; -def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, - HelpText<"Use SjLj style exceptions">; -def fnew_ms_eh: Flag<["-"], "fnew-ms-eh">, - HelpText<"Use the new IR representation for MS exceptions">; -def split_dwarf_file : Separate<["-"], "split-dwarf-file">, - HelpText<"File name to use for split dwarf debug info output">; -def fno_wchar : Flag<["-"], "fno-wchar">, - HelpText<"Disable C++ builtin type wchar_t">; -def fconstant_string_class : Separate<["-"], "fconstant-string-class">, - MetaVarName<"<class name>">, - HelpText<"Specify the class to use for constant Objective-C string objects.">; -def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">, - HelpText<"Objective-C++ Automatic Reference Counting standard library kind">; -def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">, - HelpText<"The target Objective-C runtime supports ARC weak operations">; -def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">, - HelpText<"Objective-C dispatch method to use">; -def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">, - HelpText<"disable the default synthesis of Objective-C properties">; -def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">, - HelpText<"enable extended encoding of block type signature">; -def pic_level : Separate<["-"], "pic-level">, - HelpText<"Value for __PIC__">; -def pie_level : Separate<["-"], "pie-level">, - HelpText<"Value for __PIE__">; -def fno_validate_pch : Flag<["-"], "fno-validate-pch">, - HelpText<"Disable validation of precompiled headers">; -def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">, - HelpText<"Dump declarations that are deserialized from PCH, for testing">; -def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">, - HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">; -def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">, - Alias<error_on_deserialized_pch_decl>; -def static_define : Flag<["-"], "static-define">, - HelpText<"Should __STATIC__ be defined">; -def stack_protector : Separate<["-"], "stack-protector">, - HelpText<"Enable stack protectors">; -def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">, - HelpText<"Lower bound for a buffer to be considered for stack protection">; -def fvisibility : Separate<["-"], "fvisibility">, - HelpText<"Default type and symbol visibility">; -def ftype_visibility : Separate<["-"], "ftype-visibility">, - HelpText<"Default type visibility">; -def ftemplate_depth : Separate<["-"], "ftemplate-depth">, - HelpText<"Maximum depth of recursive template instantiation">; -def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">, - HelpText<"Maximum number of 'operator->'s to call for a member access">; -def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">, - HelpText<"Maximum depth of recursive constexpr function calls">; -def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">, - HelpText<"Maximum number of steps in constexpr function evaluation">; -def fbracket_depth : Separate<["-"], "fbracket-depth">, - HelpText<"Maximum nesting level for parentheses, brackets, and braces">; -def fconst_strings : Flag<["-"], "fconst-strings">, - HelpText<"Use a const qualified type for string literals in C and ObjC">; -def fno_const_strings : Flag<["-"], "fno-const-strings">, - HelpText<"Don't use a const qualified type for string literals in C and ObjC">; -def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">, - HelpText<"Ignore bit-field types when aligning structures">; -def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">, - HelpText<"Use a fake address space map; OpenCL testing purposes only">; -def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">, MetaVarName<"<yes|no|target>">, - HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">; -def funknown_anytype : Flag<["-"], "funknown-anytype">, - HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">; -def fdebugger_support : Flag<["-"], "fdebugger-support">, - HelpText<"Enable special debugger support behavior">; -def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">, - HelpText<"Enable casting unknown expression results to id">; -def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">, - HelpText<"Enable special debugger support for Objective-C subscripting and literals">; -def fdeprecated_macro : Flag<["-"], "fdeprecated-macro">, - HelpText<"Defines the __DEPRECATED macro">; -def fno_deprecated_macro : Flag<["-"], "fno-deprecated-macro">, - HelpText<"Undefines the __DEPRECATED macro">; -def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">, - HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">; -def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">, - HelpText<"Control vtordisp placement on win32 targets">; -def fno_rtti_data : Flag<["-"], "fno-rtti-data">, - HelpText<"Control emission of RTTI data">; -def fnative_half_type: Flag<["-"], "fnative-half-type">, - HelpText<"Use the native half type for __fp16 instead of promoting to float">; -def fallow_half_arguments_and_returns : Flag<["-"], "fallow-half-arguments-and-returns">, - HelpText<"Allow function arguments and returns of type half">; - -// C++ TSes. -def fcoroutines : Flag<["-"], "fcoroutines">, - HelpText<"Enable support for the C++ Coroutines TS">; - -//===----------------------------------------------------------------------===// -// Header Search Options -//===----------------------------------------------------------------------===// - -def nostdsysteminc : Flag<["-"], "nostdsysteminc">, - HelpText<"Disable standard system #include directories">; -def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">, - HelpText<"Disable the module hash">; -def c_isystem : JoinedOrSeparate<["-"], "c-isystem">, MetaVarName<"<directory>">, - HelpText<"Add directory to the C SYSTEM include search path">; -def objc_isystem : JoinedOrSeparate<["-"], "objc-isystem">, - MetaVarName<"<directory>">, - HelpText<"Add directory to the ObjC SYSTEM include search path">; -def objcxx_isystem : JoinedOrSeparate<["-"], "objcxx-isystem">, - MetaVarName<"<directory>">, - HelpText<"Add directory to the ObjC++ SYSTEM include search path">; -def internal_isystem : JoinedOrSeparate<["-"], "internal-isystem">, - MetaVarName<"<directory>">, - HelpText<"Add directory to the internal system include search path; these " - "are assumed to not be user-provided and are used to model system " - "and standard headers' paths.">; -def internal_externc_isystem : JoinedOrSeparate<["-"], "internal-externc-isystem">, - MetaVarName<"<directory>">, - HelpText<"Add directory to the internal system include search path with " - "implicit extern \"C\" semantics; these are assumed to not be " - "user-provided and are used to model system and standard headers' " - "paths.">; - -//===----------------------------------------------------------------------===// -// Preprocessor Options -//===----------------------------------------------------------------------===// - -def include_pth : Separate<["-"], "include-pth">, MetaVarName<"<file>">, - HelpText<"Include file before parsing">; -def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">, - HelpText<"Include and chain a header file after turning it into PCH">; -def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">, - HelpText<"Assume that the precompiled header is a precompiled preamble " - "covering the first N bytes of the main file">; -def token_cache : Separate<["-"], "token-cache">, MetaVarName<"<path>">, - HelpText<"Use specified token cache file">; -def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">, - HelpText<"include a detailed record of preprocessing actions">; - -//===----------------------------------------------------------------------===// -// OpenCL Options -//===----------------------------------------------------------------------===// - -def cl_opt_disable : Flag<["-"], "cl-opt-disable">, - HelpText<"OpenCL only. This option disables all optimizations. The default is optimizations are enabled.">; -def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, - HelpText<"OpenCL only. This option does nothing and is for compatibility with OpenCL 1.0">; -def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, - HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">; -def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, - HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">; -def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, - HelpText<"OpenCL only. Generate kernel argument metadata.">; -def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, - HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable">; -def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, - HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__">; -def cl_mad_enable : Flag<["-"], "cl-mad-enable">, - HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">; -def cl_std_EQ : Joined<["-"], "cl-std=">, - HelpText<"OpenCL language standard to compile for">; -def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, - HelpText<"OpenCL only. Allow denormals to be flushed to zero">; - -//===----------------------------------------------------------------------===// -// CUDA Options -//===----------------------------------------------------------------------===// - -def fcuda_is_device : Flag<["-"], "fcuda-is-device">, - HelpText<"Generate code for CUDA device">; -def fcuda_allow_host_calls_from_host_device : Flag<["-"], - "fcuda-allow-host-calls-from-host-device">, - HelpText<"Allow host device functions to call host functions">; -def fcuda_disable_target_call_checks : Flag<["-"], - "fcuda-disable-target-call-checks">, - HelpText<"Disable all cross-target (host, device, etc.) call checks in CUDA">; -def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">, - HelpText<"Incorporate CUDA device-side binary into host object file.">; -def fcuda_target_overloads : Flag<["-"], "fcuda-target-overloads">, - HelpText<"Enable function overloads based on CUDA target attributes.">; - -//===----------------------------------------------------------------------===// -// OpenMP Options -//===----------------------------------------------------------------------===// - -def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">, - HelpText<"Generate code only for an OpenMP target device.">; -def omp_host_ir_file_path : Separate<["-"], "omp-host-ir-file-path">, - HelpText<"Path to the IR file produced by the frontend for the host.">; - -} // let Flags = [CC1Option] - - -//===----------------------------------------------------------------------===// -// cc1as-only Options -//===----------------------------------------------------------------------===// - -let Flags = [CC1AsOption, NoDriverOption] in { - -// Language Options -def n : Flag<["-"], "n">, - HelpText<"Don't automatically start assembly file with a text section">; - -// Frontend Options -def filetype : Separate<["-"], "filetype">, - HelpText<"Specify the output file type ('asm', 'null', or 'obj')">; - -// Transliterate Options -def output_asm_variant : Separate<["-"], "output-asm-variant">, - HelpText<"Select the asm variant index to use for output">; -def show_encoding : Flag<["-"], "show-encoding">, - HelpText<"Show instruction encoding information in transliterate mode">; -def show_inst : Flag<["-"], "show-inst">, - HelpText<"Show internal instruction representation in transliterate mode">; - -// Assemble Options -def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">, - HelpText<"The string to embed in the Dwarf debug AT_producer record.">; - -} // let Flags = [CC1AsOption] diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td deleted file mode 100644 index 16a5b72..0000000 --- a/include/clang/Driver/CLCompatOptions.td +++ /dev/null @@ -1,342 +0,0 @@ -//===--- CLCompatOptions.td - Options for clang-cl ------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the options accepted by clang-cl. -// -//===----------------------------------------------------------------------===// - -def cl_Group : OptionGroup<"<clang-cl options>">, - HelpText<"CL.EXE COMPATIBILITY OPTIONS">; - -def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">, - Group<cl_Group>; - -def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">, - Group<cl_Group>; - -class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, - Group<cl_Group>, Flags<[CLOption, DriverOption]>; - -class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, - Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>; - -class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>, - Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>; - -class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, - Group<cl_Group>, Flags<[CLOption, DriverOption]>; - -class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, - Group<cl_compile_Group>, Flags<[CLOption, DriverOption]>; - -class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>, - Group<cl_ignored_Group>, Flags<[CLOption, DriverOption, HelpHidden]>; - -class CLJoinedOrSeparate<string name> : Option<["/", "-"], name, - KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; - -class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name, - KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>, - Flags<[CLOption, DriverOption]>; - -class CLRemainingArgs<string name> : Option<["/", "-"], name, - KIND_REMAINING_ARGS>, Group<cl_Group>, Flags<[CLOption, DriverOption]>; - -// Aliases: -// (We don't put any of these in cl_compile_Group as the options they alias are -// already in the right group.) - -def _SLASH_Brepro : CLFlag<"Brepro">, - HelpText<"Emit an object file which can be reproduced over time">, - Alias<mincremental_linker_compatible>; -def _SLASH_Brepro_ : CLFlag<"Brepro-">, - HelpText<"Emit an object file which cannot be reproduced over time">, - Alias<mno_incremental_linker_compatible>; -def _SLASH_C : CLFlag<"C">, - HelpText<"Don't discard comments when preprocessing">, Alias<C>; -def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>; -def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">, - MetaVarName<"<macro[=value]>">, Alias<D>; -def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>; -def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ftrapping_math>; -def _SLASH_fp_except_ : CLFlag<"fp:except-">, - HelpText<"">, Alias<fno_trapping_math>; -def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>; -def _SLASH_fp_precise : CLFlag<"fp:precise">, - HelpText<"">, Alias<fno_fast_math>; -def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>; -def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>, - HelpText<"Assume thread-local variables are defined in the executable">; -def _SLASH_GR : CLFlag<"GR">, HelpText<"Enable emission of RTTI data">; -def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Disable emission of RTTI data">; -def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">, - Alias<fwritable_strings>; -def _SLASH_Gs : CLJoined<"Gs">, HelpText<"Set stack probe size">, - Alias<mstack_probe_size>; -def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, - Alias<ffunction_sections>; -def _SLASH_Gy_ : CLFlag<"Gy-">, - HelpText<"Don't put each function in its own section">, - Alias<fno_function_sections>; -def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">, - Alias<fdata_sections>; -def _SLASH_Gw_ : CLFlag<"Gw-">, - HelpText<"Don't put each data item in its own section">, - Alias<fno_data_sections>; -def _SLASH_help : CLFlag<"help">, Alias<help>, - HelpText<"Display available options">; -def _SLASH_HELP : CLFlag<"HELP">, Alias<help>; -def _SLASH_I : CLJoinedOrSeparate<"I">, - HelpText<"Add directory to include search path">, MetaVarName<"<dir>">, - Alias<I>; -def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">, - Alias<funsigned_char>; -def _SLASH_O0 : CLFlag<"O0">, Alias<O0>; -def _SLASH_O : CLJoined<"O">, HelpText<"Optimization level">; -def _SLASH_Ob0 : CLFlag<"Ob0">, HelpText<"Disable inlining">, - Alias<fno_inline>; -def _SLASH_Od : CLFlag<"Od">, HelpText<"Disable optimization">, Alias<O0>; -def _SLASH_Oi : CLFlag<"Oi">, HelpText<"Enable use of builtin functions">, - Alias<fbuiltin>; -def _SLASH_Oi_ : CLFlag<"Oi-">, HelpText<"Disable use of builtin functions">, - Alias<fno_builtin>; -def _SLASH_Os : CLFlag<"Os">, HelpText<"Optimize for size">, Alias<O>, - AliasArgs<["s"]>; -def _SLASH_Ot : CLFlag<"Ot">, HelpText<"Optimize for speed">, Alias<O>, - AliasArgs<["2"]>; -def _SLASH_QUESTION : CLFlag<"?">, Alias<help>, - HelpText<"Display available options">; -def _SLASH_Qvec : CLFlag<"Qvec">, - HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>; -def _SLASH_Qvec_ : CLFlag<"Qvec-">, - HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>; -def _SLASH_showIncludes : CLFlag<"showIncludes">, - HelpText<"Print info about included files to stderr">, - Alias<show_includes>; -def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">, - MetaVarName<"<macro>">, Alias<U>; -def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>; -def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>; -def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>; -def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>; -def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; -def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>; -def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">, - Alias<W_Joined>, AliasArgs<["error"]>; -def _SLASH_WX_ : CLFlag<"WX-">, HelpText<"Do not treat warnings as errors">, - Alias<W_Joined>, AliasArgs<["no-error"]>; -def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>; -def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>, - AliasArgs<["no-macro-redefined"]>; -def _SLASH_wd4100 : CLFlag<"wd4100">, Alias<W_Joined>, - AliasArgs<["no-unused-parameter"]>; -def _SLASH_wd4910 : CLFlag<"wd4910">, Alias<W_Joined>, - AliasArgs<["no-dllexport-explicit-instantiation-decl"]>; -def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>, - AliasArgs<["no-deprecated-declarations"]>; -def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, - Alias<vtordisp_mode_EQ>; -def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, - HelpText<"Enable C++14 sized global deallocation functions">, - Alias<fsized_deallocation>; -def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, - HelpText<"Disable C++14 sized global deallocation functions">, - Alias<fno_sized_deallocation>; -def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, - HelpText<"Treat string literals as const">, Alias<W_Joined>, - AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; -def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">, - HelpText<"Enable thread-safe initialization of static variables">, - Alias<fthreadsafe_statics>; -def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">, - HelpText<"Disable thread-safe initialization of static variables">, - Alias<fno_threadsafe_statics>; -def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">, - HelpText<"Enable trigraphs">, Alias<ftrigraphs>; -def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">, - HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>; -def _SLASH_Z7 : CLFlag<"Z7">, - HelpText<"Enable CodeView debug information in object files">; -def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>, - HelpText<"Alias for /Z7. Does not produce PDBs.">; -def _SLASH_Zp : CLJoined<"Zp">, - HelpText<"Specify the default maximum struct packing alignment">, - Alias<fpack_struct_EQ>; -def _SLASH_Zp_flag : CLFlag<"Zp">, - HelpText<"Set the default maximum struct packing alignment to 1">, - Alias<fpack_struct_EQ>, AliasArgs<["1"]>; -def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Syntax-check only">, - Alias<fsyntax_only>; - - -// Non-aliases: - -def _SLASH_arch : CLCompileJoined<"arch:">, - HelpText<"Set architecture for code generation">; - -def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>; -def _SLASH_volatile_Group : OptionGroup<"</volatile group>">, - Group<cl_compile_Group>; - -def _SLASH_EH : CLJoined<"EH">, HelpText<"Exception handling model">; -def _SLASH_EP : CLFlag<"EP">, - HelpText<"Disable linemarker output and preprocess to stdout">; -def _SLASH_FA : CLFlag<"FA">, - HelpText<"Output assembly code file during compilation">; -def _SLASH_Fa : CLJoined<"Fa">, - HelpText<"Output assembly code to this file during compilation (with /FA)">, - MetaVarName<"<file or directory>">; -def _SLASH_fallback : CLCompileFlag<"fallback">, - HelpText<"Fall back to cl.exe if clang-cl fails to compile">; -def _SLASH_FI : CLJoinedOrSeparate<"FI">, - HelpText<"Include file before parsing">, Alias<include_>; -def _SLASH_Fe : CLJoined<"Fe">, - HelpText<"Set output executable file or directory (ends in / or \\)">, - MetaVarName<"<file or directory>">; -def _SLASH_Fi : CLCompileJoined<"Fi">, - HelpText<"Set preprocess output file name (with /P)">, - MetaVarName<"<file>">; -def _SLASH_Fo : CLCompileJoined<"Fo">, - HelpText<"Set output object file, or directory (ends in / or \\) (with /c)">, - MetaVarName<"<file or directory>">; -def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">; -def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">; -def _SLASH_link : CLRemainingArgs<"link">, - HelpText<"Forward options to the linker">, MetaVarName<"<options>">; -def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>, - Flags<[CLOption, DriverOption]>, HelpText<"Use DLL run-time">; -def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>, - Flags<[CLOption, DriverOption]>, HelpText<"Use DLL debug run-time">; -def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>, - Flags<[CLOption, DriverOption]>, HelpText<"Use static run-time">; -def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>, - Flags<[CLOption, DriverOption]>, HelpText<"Use static debug run-time">; -def _SLASH_o : CLJoinedOrSeparate<"o">, - HelpText<"Set output file or directory (ends in / or \\)">, - MetaVarName<"<file or directory>">; -def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">; -def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">, - HelpText<"Specify a C source file">, MetaVarName<"<filename>">; -def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">; -def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">, - HelpText<"Specify a C++ source file">, MetaVarName<"<filename>">; -def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; -def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>, - Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>, - HelpText<"Volatile loads and stores have standard semantics">; -def _SLASH_vmb : CLFlag<"vmb">, - HelpText<"Use a best-case representation method for member pointers">; -def _SLASH_vmg : CLFlag<"vmg">, - HelpText<"Use a most-general representation for member pointers">; -def _SLASH_vms : CLFlag<"vms">, - HelpText<"Set the default most-general representation to single inheritance">; -def _SLASH_vmm : CLFlag<"vmm">, - HelpText<"Set the default most-general representation to " - "multiple inheritance">; -def _SLASH_vmv : CLFlag<"vmv">, - HelpText<"Set the default most-general representation to " - "virtual inheritance">; -def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>, - Group<_SLASH_volatile_Group>, Flags<[CLOption, DriverOption]>, - HelpText<"Volatile loads and stores have acquire and release semantics">; -def _SLASH_Zl : CLFlag<"Zl">, - HelpText<"Don't mention any default libraries in the object file">; - -// Ignored: - -def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; -def _SLASH_bigobj : CLIgnoredFlag<"bigobj">; -def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">; -def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; -def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; -def _SLASH_Fd : CLIgnoredJoined<"Fd">; -def _SLASH_FS : CLIgnoredFlag<"FS">, HelpText<"Force synchronous PDB writes">; -def _SLASH_Gd : CLIgnoredFlag<"Gd">; -def _SLASH_GF : CLIgnoredFlag<"GF">; -def _SLASH_GS_ : CLIgnoredFlag<"GS-">; -def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">; -def _SLASH_nologo : CLIgnoredFlag<"nologo">; -def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">; -def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">; -def _SLASH_Og : CLIgnoredFlag<"Og">; -def _SLASH_openmp_ : CLIgnoredFlag<"openmp-">; -def _SLASH_RTC : CLIgnoredJoined<"RTC">; -def _SLASH_sdl : CLIgnoredFlag<"sdl">; -def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; -def _SLASH_w : CLIgnoredJoined<"w">; -def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; -def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; -def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; -def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; -def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; -def _SLASH_Zm : CLIgnoredJoined<"Zm">; -def _SLASH_Zo : CLIgnoredFlag<"Zo">; -def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; - - -// Unsupported: - -def _SLASH_AI : CLJoined<"AI">; -def _SLASH_clr : CLJoined<"clr">; -def _SLASH_doc : CLJoined<"doc">; -def _SLASH_FA_joined : CLJoined<"FA">; -def _SLASH_favor : CLJoined<"favor">; -def _SLASH_FC : CLFlag<"FC">; -def _SLASH_F : CLFlag<"F">; -def _SLASH_Fm : CLJoined<"Fm">; -def _SLASH_Fp : CLJoined<"Fp">; -def _SLASH_Fr : CLJoined<"Fr">; -def _SLASH_FR : CLJoined<"FR">; -def _SLASH_FU : CLJoinedOrSeparate<"FU">; -def _SLASH_Fx : CLFlag<"Fx">; -def _SLASH_G1 : CLFlag<"G1">; -def _SLASH_G2 : CLFlag<"G2">; -def _SLASH_Ge : CLFlag<"Ge">; -def _SLASH_Gh : CLFlag<"Gh">; -def _SLASH_GH : CLFlag<"GH">; -def _SLASH_GL : CLFlag<"GL">; -def _SLASH_GL_ : CLFlag<"GL-">; -def _SLASH_Gm : CLFlag<"Gm">; -def _SLASH_Gm_ : CLFlag<"Gm-">; -def _SLASH_Gr : CLFlag<"Gr">; -def _SLASH_GS : CLFlag<"GS">; -def _SLASH_GT : CLFlag<"GT">; -def _SLASH_Guard : CLJoined<"guard:">; -def _SLASH_GX : CLFlag<"GX">; -def _SLASH_Gv : CLFlag<"Gv">; -def _SLASH_Gz : CLFlag<"Gz">; -def _SLASH_GZ : CLFlag<"GZ">; -def _SLASH_H : CLFlag<"H">; -def _SLASH_homeparams : CLFlag<"homeparams">; -def _SLASH_hotpatch : CLFlag<"hotpatch">; -def _SLASH_kernel : CLFlag<"kernel">; -def _SLASH_LN : CLFlag<"LN">; -def _SLASH_MP : CLJoined<"MP">; -def _SLASH_openmp : CLFlag<"openmp">; -def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">; -def _SLASH_QIfist : CLFlag<"QIfist">; -def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">; -def _SLASH_Qpar : CLFlag<"Qpar">; -def _SLASH_Qvec_report : CLJoined<"Qvec-report">; -def _SLASH_u : CLFlag<"u">; -def _SLASH_V : CLFlag<"V">; -def _SLASH_WL : CLFlag<"WL">; -def _SLASH_Wp64 : CLFlag<"Wp64">; -def _SLASH_X : CLFlag<"X">; -def _SLASH_Yc : CLJoined<"Yc">; -def _SLASH_Y_ : CLFlag<"Y-">; -def _SLASH_Yd : CLFlag<"Yd">; -def _SLASH_Yl : CLJoined<"Yl">; -def _SLASH_Yu : CLJoined<"Yu">; -def _SLASH_Za : CLFlag<"Za">; -def _SLASH_Zc : CLJoined<"Zc:">; -def _SLASH_Ze : CLFlag<"Ze">; -def _SLASH_Zg : CLFlag<"Zg">; -def _SLASH_ZI : CLFlag<"ZI">; -def _SLASH_ZW : CLJoined<"ZW">; diff --git a/include/clang/Driver/CMakeLists.txt b/include/clang/Driver/CMakeLists.txt deleted file mode 100644 index a9d98804..0000000 --- a/include/clang/Driver/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(LLVM_TARGET_DEFINITIONS Options.td) -tablegen(LLVM Options.inc -gen-opt-parser-defs) -add_public_tablegen_target(ClangDriverOptions) diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h deleted file mode 100644 index 12ff068..0000000 --- a/include/clang/Driver/Compilation.h +++ /dev/null @@ -1,202 +0,0 @@ -//===--- Compilation.h - Compilation Task Data Structure --------*- 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_DRIVER_COMPILATION_H -#define LLVM_CLANG_DRIVER_COMPILATION_H - -#include "clang/Driver/Action.h" -#include "clang/Driver/Job.h" -#include "clang/Driver/Util.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/Support/Path.h" - -namespace llvm { -namespace opt { - class DerivedArgList; - class InputArgList; -} -} - -namespace clang { -namespace driver { - class Driver; - class JobList; - class ToolChain; - -/// Compilation - A set of tasks to perform for a single driver -/// invocation. -class Compilation { - /// The driver we were created by. - const Driver &TheDriver; - - /// The default tool chain. - const ToolChain &DefaultToolChain; - - const ToolChain *CudaHostToolChain; - const ToolChain *CudaDeviceToolChain; - - /// The original (untranslated) input argument list. - llvm::opt::InputArgList *Args; - - /// The driver translated arguments. Note that toolchains may perform their - /// own argument translation. - llvm::opt::DerivedArgList *TranslatedArgs; - - /// The list of actions. - ActionList Actions; - - /// The root list of jobs. - JobList Jobs; - - /// Cache of translated arguments for a particular tool chain and bound - /// architecture. - llvm::DenseMap<std::pair<const ToolChain *, const char *>, - llvm::opt::DerivedArgList *> TCArgs; - - /// Temporary files which should be removed on exit. - llvm::opt::ArgStringList TempFiles; - - /// Result files which should be removed on failure. - ArgStringMap ResultFiles; - - /// Result files which are generated correctly on failure, and which should - /// only be removed if we crash. - ArgStringMap FailureResultFiles; - - /// Redirection for stdout, stderr, etc. - const StringRef **Redirects; - - /// Whether we're compiling for diagnostic purposes. - bool ForDiagnostics; - -public: - Compilation(const Driver &D, const ToolChain &DefaultToolChain, - llvm::opt::InputArgList *Args, - llvm::opt::DerivedArgList *TranslatedArgs); - ~Compilation(); - - const Driver &getDriver() const { return TheDriver; } - - const ToolChain &getDefaultToolChain() const { return DefaultToolChain; } - const ToolChain *getCudaHostToolChain() const { return CudaHostToolChain; } - const ToolChain *getCudaDeviceToolChain() const { - return CudaDeviceToolChain; - } - - void setCudaHostToolChain(const ToolChain *HostToolChain) { - CudaHostToolChain = HostToolChain; - } - void setCudaDeviceToolChain(const ToolChain *DeviceToolChain) { - CudaDeviceToolChain = DeviceToolChain; - } - - const llvm::opt::InputArgList &getInputArgs() const { return *Args; } - - const llvm::opt::DerivedArgList &getArgs() const { return *TranslatedArgs; } - - llvm::opt::DerivedArgList &getArgs() { return *TranslatedArgs; } - - ActionList &getActions() { return Actions; } - const ActionList &getActions() const { return Actions; } - - JobList &getJobs() { return Jobs; } - const JobList &getJobs() const { return Jobs; } - - void addCommand(std::unique_ptr<Command> C) { Jobs.addJob(std::move(C)); } - - const llvm::opt::ArgStringList &getTempFiles() const { return TempFiles; } - - const ArgStringMap &getResultFiles() const { return ResultFiles; } - - const ArgStringMap &getFailureResultFiles() const { - return FailureResultFiles; - } - - /// Returns the sysroot path. - StringRef getSysRoot() const; - - /// getArgsForToolChain - Return the derived argument list for the - /// tool chain \p TC (or the default tool chain, if TC is not specified). - /// - /// \param BoundArch - The bound architecture name, or 0. - const llvm::opt::DerivedArgList &getArgsForToolChain(const ToolChain *TC, - const char *BoundArch); - - /// addTempFile - Add a file to remove on exit, and returns its - /// argument. - const char *addTempFile(const char *Name) { - TempFiles.push_back(Name); - return Name; - } - - /// addResultFile - Add a file to remove on failure, and returns its - /// argument. - const char *addResultFile(const char *Name, const JobAction *JA) { - ResultFiles[JA] = Name; - return Name; - } - - /// addFailureResultFile - Add a file to remove if we crash, and returns its - /// argument. - const char *addFailureResultFile(const char *Name, const JobAction *JA) { - FailureResultFiles[JA] = Name; - return Name; - } - - /// CleanupFile - Delete a given file. - /// - /// \param IssueErrors - Report failures as errors. - /// \return Whether the file was removed successfully. - bool CleanupFile(const char *File, bool IssueErrors = false) const; - - /// CleanupFileList - Remove the files in the given list. - /// - /// \param IssueErrors - Report failures as errors. - /// \return Whether all files were removed successfully. - bool CleanupFileList(const llvm::opt::ArgStringList &Files, - bool IssueErrors = false) const; - - /// CleanupFileMap - Remove the files in the given map. - /// - /// \param JA - If specified, only delete the files associated with this - /// JobAction. Otherwise, delete all files in the map. - /// \param IssueErrors - Report failures as errors. - /// \return Whether all files were removed successfully. - bool CleanupFileMap(const ArgStringMap &Files, - const JobAction *JA, - bool IssueErrors = false) const; - - /// ExecuteCommand - Execute an actual command. - /// - /// \param FailingCommand - For non-zero results, this will be set to the - /// Command which failed, if any. - /// \return The result code of the subprocess. - int ExecuteCommand(const Command &C, const Command *&FailingCommand) const; - - /// ExecuteJob - Execute a single job. - /// - /// \param FailingCommands - For non-zero results, this will be a vector of - /// failing commands and their associated result code. - void ExecuteJobs( - const JobList &Jobs, - SmallVectorImpl<std::pair<int, const Command *>> &FailingCommands) const; - - /// initCompilationForDiagnostics - Remove stale state and suppress output - /// so compilation can be reexecuted to generate additional diagnostic - /// information (e.g., preprocessed source(s)). - void initCompilationForDiagnostics(); - - /// Return true if we're compiling for diagnostics. - bool isForDiagnostics() const { return ForDiagnostics; } -}; - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h deleted file mode 100644 index c9940ba..0000000 --- a/include/clang/Driver/Driver.h +++ /dev/null @@ -1,468 +0,0 @@ -//===--- Driver.h - Clang GCC Compatible Driver -----------------*- 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_DRIVER_DRIVER_H -#define LLVM_CLANG_DRIVER_DRIVER_H - -#include "clang/Basic/Diagnostic.h" -#include "clang/Basic/LLVM.h" -#include "clang/Driver/Phases.h" -#include "clang/Driver/Types.h" -#include "clang/Driver/Util.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Triple.h" -#include "llvm/Support/Path.h" // FIXME: Kill when CompilationInfo -#include <memory> - // lands. -#include <list> -#include <set> -#include <string> - -namespace llvm { -namespace opt { - class Arg; - class ArgList; - class DerivedArgList; - class InputArgList; - class OptTable; -} -} - -namespace clang { - -namespace vfs { -class FileSystem; -} - -namespace driver { - - class Action; - class Command; - class Compilation; - class InputInfo; - class JobList; - class JobAction; - class SanitizerArgs; - class ToolChain; - -/// Describes the kind of LTO mode selected via -f(no-)?lto(=.*)? options. -enum LTOKind { - LTOK_None, - LTOK_Full, - LTOK_Thin, - LTOK_Unknown -}; - -/// Driver - Encapsulate logic for constructing compilation processes -/// from a set of gcc-driver-like command line arguments. -class Driver { - llvm::opt::OptTable *Opts; - - DiagnosticsEngine &Diags; - - IntrusiveRefCntPtr<vfs::FileSystem> VFS; - - enum DriverMode { - GCCMode, - GXXMode, - CPPMode, - CLMode - } Mode; - - enum SaveTempsMode { - SaveTempsNone, - SaveTempsCwd, - SaveTempsObj - } SaveTemps; - - /// LTO mode selected via -f(no-)?lto(=.*)? options. - LTOKind LTOMode; - -public: - // Diag - Forwarding function for diagnostics. - DiagnosticBuilder Diag(unsigned DiagID) const { - return Diags.Report(DiagID); - } - - // FIXME: Privatize once interface is stable. -public: - /// The name the driver was invoked as. - std::string Name; - - /// The path the driver executable was in, as invoked from the - /// command line. - std::string Dir; - - /// The original path to the clang executable. - std::string ClangExecutable; - - /// The path to the installed clang directory, if any. - std::string InstalledDir; - - /// The path to the compiler resource directory. - std::string ResourceDir; - - /// A prefix directory used to emulate a limited subset of GCC's '-Bprefix' - /// functionality. - /// FIXME: This type of customization should be removed in favor of the - /// universal driver when it is ready. - typedef SmallVector<std::string, 4> prefix_list; - prefix_list PrefixDirs; - - /// sysroot, if present - std::string SysRoot; - - /// Dynamic loader prefix, if present - std::string DyldPrefix; - - /// If the standard library is used - bool UseStdLib; - - /// Default target triple. - std::string DefaultTargetTriple; - - /// Driver title to use with help. - std::string DriverTitle; - - /// Information about the host which can be overridden by the user. - std::string HostBits, HostMachine, HostSystem, HostRelease; - - /// The file to log CC_PRINT_OPTIONS output to, if enabled. - const char *CCPrintOptionsFilename; - - /// The file to log CC_PRINT_HEADERS output to, if enabled. - const char *CCPrintHeadersFilename; - - /// The file to log CC_LOG_DIAGNOSTICS output to, if enabled. - const char *CCLogDiagnosticsFilename; - - /// A list of inputs and their types for the given arguments. - typedef SmallVector<std::pair<types::ID, const llvm::opt::Arg *>, 16> - InputList; - - /// Whether the driver should follow g++ like behavior. - bool CCCIsCXX() const { return Mode == GXXMode; } - - /// Whether the driver is just the preprocessor. - bool CCCIsCPP() const { return Mode == CPPMode; } - - /// Whether the driver should follow cl.exe like behavior. - bool IsCLMode() const { return Mode == CLMode; } - - /// Only print tool bindings, don't build any jobs. - unsigned CCCPrintBindings : 1; - - /// Set CC_PRINT_OPTIONS mode, which is like -v but logs the commands to - /// CCPrintOptionsFilename or to stderr. - unsigned CCPrintOptions : 1; - - /// Set CC_PRINT_HEADERS mode, which causes the frontend to log header include - /// information to CCPrintHeadersFilename or to stderr. - unsigned CCPrintHeaders : 1; - - /// Set CC_LOG_DIAGNOSTICS mode, which causes the frontend to log diagnostics - /// to CCLogDiagnosticsFilename or to stderr, in a stable machine readable - /// format. - unsigned CCLogDiagnostics : 1; - - /// Whether the driver is generating diagnostics for debugging purposes. - unsigned CCGenDiagnostics : 1; - -private: - /// Name to use when invoking gcc/g++. - std::string CCCGenericGCCName; - - /// Whether to check that input files exist when constructing compilation - /// jobs. - unsigned CheckInputsExist : 1; - -public: - /// Use lazy precompiled headers for PCH support. - unsigned CCCUsePCH : 1; - -private: - /// Certain options suppress the 'no input files' warning. - bool SuppressMissingInputWarning : 1; - - std::list<std::string> TempFiles; - std::list<std::string> ResultFiles; - - /// \brief Cache of all the ToolChains in use by the driver. - /// - /// This maps from the string representation of a triple to a ToolChain - /// created targeting that triple. The driver owns all the ToolChain objects - /// stored in it, and will clean them up when torn down. - mutable llvm::StringMap<ToolChain *> ToolChains; - -private: - /// TranslateInputArgs - Create a new derived argument list from the input - /// arguments, after applying the standard argument translations. - llvm::opt::DerivedArgList * - TranslateInputArgs(const llvm::opt::InputArgList &Args) const; - - // getFinalPhase - Determine which compilation mode we are in and record - // which option we used to determine the final phase. - phases::ID getFinalPhase(const llvm::opt::DerivedArgList &DAL, - llvm::opt::Arg **FinalPhaseArg = nullptr) const; - - // Before executing jobs, sets up response files for commands that need them. - void setUpResponseFiles(Compilation &C, Command &Cmd); - - void generatePrefixedToolNames(const char *Tool, const ToolChain &TC, - SmallVectorImpl<std::string> &Names) const; - -public: - Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, - DiagnosticsEngine &Diags, - IntrusiveRefCntPtr<vfs::FileSystem> VFS = nullptr); - ~Driver(); - - /// @name Accessors - /// @{ - - /// Name to use when invoking gcc/g++. - const std::string &getCCCGenericGCCName() const { return CCCGenericGCCName; } - - const llvm::opt::OptTable &getOpts() const { return *Opts; } - - const DiagnosticsEngine &getDiags() const { return Diags; } - - vfs::FileSystem &getVFS() const { return *VFS; } - - bool getCheckInputsExist() const { return CheckInputsExist; } - - void setCheckInputsExist(bool Value) { CheckInputsExist = Value; } - - const std::string &getTitle() { return DriverTitle; } - void setTitle(std::string Value) { DriverTitle = Value; } - - /// \brief Get the path to the main clang executable. - const char *getClangProgramPath() const { - return ClangExecutable.c_str(); - } - - /// \brief Get the path to where the clang executable was installed. - const char *getInstalledDir() const { - if (!InstalledDir.empty()) - return InstalledDir.c_str(); - return Dir.c_str(); - } - void setInstalledDir(StringRef Value) { - InstalledDir = Value; - } - - bool isSaveTempsEnabled() const { return SaveTemps != SaveTempsNone; } - bool isSaveTempsObj() const { return SaveTemps == SaveTempsObj; } - - /// @} - /// @name Primary Functionality - /// @{ - - /// BuildCompilation - Construct a compilation object for a command - /// line argument vector. - /// - /// \return A compilation, or 0 if none was built for the given - /// argument vector. A null return value does not necessarily - /// indicate an error condition, the diagnostics should be queried - /// to determine if an error occurred. - Compilation *BuildCompilation(ArrayRef<const char *> Args); - - /// @name Driver Steps - /// @{ - - /// ParseDriverMode - Look for and handle the driver mode option in Args. - void ParseDriverMode(ArrayRef<const char *> Args); - - /// ParseArgStrings - Parse the given list of strings into an - /// ArgList. - llvm::opt::InputArgList ParseArgStrings(ArrayRef<const char *> Args); - - /// BuildInputs - Construct the list of inputs and their types from - /// the given arguments. - /// - /// \param TC - The default host tool chain. - /// \param Args - The input arguments. - /// \param Inputs - The list to store the resulting compilation - /// inputs onto. - void BuildInputs(const ToolChain &TC, llvm::opt::DerivedArgList &Args, - InputList &Inputs) const; - - /// BuildActions - Construct the list of actions to perform for the - /// given arguments, which are only done for a single architecture. - /// - /// \param C - The compilation that is being built. - /// \param TC - The default host tool chain. - /// \param Args - The input arguments. - /// \param Actions - The list to store the resulting actions onto. - void BuildActions(Compilation &C, const ToolChain &TC, - llvm::opt::DerivedArgList &Args, const InputList &Inputs, - ActionList &Actions) const; - - /// BuildUniversalActions - Construct the list of actions to perform - /// for the given arguments, which may require a universal build. - /// - /// \param C - The compilation that is being built. - /// \param TC - The default host tool chain. - void BuildUniversalActions(Compilation &C, const ToolChain &TC, - const InputList &BAInputs) const; - - /// BuildJobs - Bind actions to concrete tools and translate - /// arguments to form the list of jobs to run. - /// - /// \param C - The compilation that is being built. - void BuildJobs(Compilation &C) const; - - /// ExecuteCompilation - Execute the compilation according to the command line - /// arguments and return an appropriate exit code. - /// - /// This routine handles additional processing that must be done in addition - /// to just running the subprocesses, for example reporting errors, setting - /// up response files, removing temporary files, etc. - int ExecuteCompilation(Compilation &C, - SmallVectorImpl< std::pair<int, const Command *> > &FailingCommands); - - /// generateCompilationDiagnostics - Generate diagnostics information - /// including preprocessed source file(s). - /// - void generateCompilationDiagnostics(Compilation &C, - const Command &FailingCommand); - - /// @} - /// @name Helper Methods - /// @{ - - /// PrintActions - Print the list of actions. - void PrintActions(const Compilation &C) const; - - /// PrintHelp - Print the help text. - /// - /// \param ShowHidden - Show hidden options. - void PrintHelp(bool ShowHidden) const; - - /// PrintVersion - Print the driver version. - void PrintVersion(const Compilation &C, raw_ostream &OS) const; - - /// GetFilePath - Lookup \p Name in the list of file search paths. - /// - /// \param TC - The tool chain for additional information on - /// directories to search. - // - // FIXME: This should be in CompilationInfo. - std::string GetFilePath(const char *Name, const ToolChain &TC) const; - - /// GetProgramPath - Lookup \p Name in the list of program search paths. - /// - /// \param TC - The provided tool chain for additional information on - /// directories to search. - // - // FIXME: This should be in CompilationInfo. - std::string GetProgramPath(const char *Name, const ToolChain &TC) const; - - /// HandleImmediateArgs - Handle any arguments which should be - /// treated before building actions or binding tools. - /// - /// \return Whether any compilation should be built for this - /// invocation. - bool HandleImmediateArgs(const Compilation &C); - - /// ConstructAction - Construct the appropriate action to do for - /// \p Phase on the \p Input, taking in to account arguments - /// like -fsyntax-only or --analyze. - std::unique_ptr<Action> - ConstructPhaseAction(const ToolChain &TC, const llvm::opt::ArgList &Args, - phases::ID Phase, std::unique_ptr<Action> Input) const; - - /// BuildJobsForAction - Construct the jobs to perform for the - /// action \p A. - void BuildJobsForAction(Compilation &C, - const Action *A, - const ToolChain *TC, - const char *BoundArch, - bool AtTopLevel, - bool MultipleArchs, - const char *LinkingOutput, - InputInfo &Result) const; - - /// Returns the default name for linked images (e.g., "a.out"). - const char *getDefaultImageName() const; - - /// GetNamedOutputPath - Return the name to use for the output of - /// the action \p JA. The result is appended to the compilation's - /// list of temporary or result files, as appropriate. - /// - /// \param C - The compilation. - /// \param JA - The action of interest. - /// \param BaseInput - The original input file that this action was - /// triggered by. - /// \param BoundArch - The bound architecture. - /// \param AtTopLevel - Whether this is a "top-level" action. - /// \param MultipleArchs - Whether multiple -arch options were supplied. - const char *GetNamedOutputPath(Compilation &C, - const JobAction &JA, - const char *BaseInput, - const char *BoundArch, - bool AtTopLevel, - bool MultipleArchs) const; - - /// GetTemporaryPath - Return the pathname of a temporary file to use - /// as part of compilation; the file will have the given prefix and suffix. - /// - /// GCC goes to extra lengths here to be a bit more robust. - std::string GetTemporaryPath(StringRef Prefix, const char *Suffix) const; - - /// ShouldUseClangCompiler - Should the clang compiler be used to - /// handle this action. - bool ShouldUseClangCompiler(const JobAction &JA) const; - - /// Returns true if we are performing any kind of LTO. - bool isUsingLTO() const { return LTOMode != LTOK_None; } - - /// Get the specific kind of LTO being performed. - LTOKind getLTOMode() const { return LTOMode; } - -private: - /// Parse the \p Args list for LTO options and record the type of LTO - /// compilation based on which -f(no-)?lto(=.*)? option occurs last. - void setLTOMode(const llvm::opt::ArgList &Args); - - /// \brief Retrieves a ToolChain for a particular \p Target triple. - /// - /// Will cache ToolChains for the life of the driver object, and create them - /// on-demand. - const ToolChain &getToolChain(const llvm::opt::ArgList &Args, - const llvm::Triple &Target) const; - - /// @} - - /// \brief Get bitmasks for which option flags to include and exclude based on - /// the driver mode. - std::pair<unsigned, unsigned> getIncludeExcludeOptionFlagMasks() const; - -public: - /// GetReleaseVersion - Parse (([0-9]+)(.([0-9]+)(.([0-9]+)?))?)? and - /// return the grouped values as integers. Numbers which are not - /// provided are set to 0. - /// - /// \return True if the entire string was parsed (9.2), or all - /// groups were parsed (10.3.5extrastuff). HadExtra is true if all - /// groups were parsed but extra characters remain at the end. - static bool GetReleaseVersion(const char *Str, unsigned &Major, - unsigned &Minor, unsigned &Micro, - bool &HadExtra); -}; - -/// \return True if the last defined optimization level is -Ofast. -/// And False otherwise. -bool isOptimizationLevelFast(const llvm::opt::ArgList &Args); - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/DriverDiagnostic.h b/include/clang/Driver/DriverDiagnostic.h deleted file mode 100644 index 680338a..0000000 --- a/include/clang/Driver/DriverDiagnostic.h +++ /dev/null @@ -1,28 +0,0 @@ -//===--- DiagnosticDriver.h - Diagnostics for libdriver ---------*- 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_DRIVER_DRIVERDIAGNOSTIC_H -#define LLVM_CLANG_DRIVER_DRIVERDIAGNOSTIC_H - -#include "clang/Basic/Diagnostic.h" - -namespace clang { - namespace diag { - enum { -#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\ - SFINAE,NOWERROR,SHOWINSYSHEADER,CATEGORY) ENUM, -#define DRIVERSTART -#include "clang/Basic/DiagnosticDriverKinds.inc" -#undef DIAG - NUM_BUILTIN_DRIVER_DIAGNOSTICS - }; - } // end namespace diag -} // end namespace clang - -#endif diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h deleted file mode 100644 index 263356f..0000000 --- a/include/clang/Driver/Job.h +++ /dev/null @@ -1,174 +0,0 @@ -//===--- Job.h - Commands to Execute ----------------------------*- 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_DRIVER_JOB_H -#define LLVM_CLANG_DRIVER_JOB_H - -#include "clang/Basic/LLVM.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/iterator.h" -#include "llvm/Option/Option.h" -#include <memory> - -namespace llvm { - class raw_ostream; -} - -namespace clang { -namespace driver { -class Action; -class Command; -class Tool; -class InputInfo; - -// Re-export this as clang::driver::ArgStringList. -using llvm::opt::ArgStringList; - -struct CrashReportInfo { - StringRef Filename; - StringRef VFSPath; - - CrashReportInfo(StringRef Filename, StringRef VFSPath) - : Filename(Filename), VFSPath(VFSPath) {} -}; - -/// Command - An executable path/name and argument vector to -/// execute. -class Command { - /// Source - The action which caused the creation of this job. - const Action &Source; - - /// Tool - The tool which caused the creation of this job. - const Tool &Creator; - - /// The executable to run. - const char *Executable; - - /// The list of program arguments (not including the implicit first - /// argument, which will be the executable). - llvm::opt::ArgStringList Arguments; - - /// The list of program arguments which are inputs. - llvm::opt::ArgStringList InputFilenames; - - /// Response file name, if this command is set to use one, or nullptr - /// otherwise - const char *ResponseFile; - - /// The input file list in case we need to emit a file list instead of a - /// proper response file - llvm::opt::ArgStringList InputFileList; - - /// String storage if we need to create a new argument to specify a response - /// file - std::string ResponseFileFlag; - - /// When a response file is needed, we try to put most arguments in an - /// exclusive file, while others remains as regular command line arguments. - /// This functions fills a vector with the regular command line arguments, - /// argv, excluding the ones passed in a response file. - void buildArgvForResponseFile(llvm::SmallVectorImpl<const char *> &Out) const; - - /// Encodes an array of C strings into a single string separated by whitespace. - /// This function will also put in quotes arguments that have whitespaces and - /// will escape the regular backslashes (used in Windows paths) and quotes. - /// The results are the contents of a response file, written into a raw_ostream. - void writeResponseFile(raw_ostream &OS) const; - -public: - Command(const Action &Source, const Tool &Creator, const char *Executable, - const llvm::opt::ArgStringList &Arguments, - ArrayRef<InputInfo> Inputs); - // FIXME: This really shouldn't be copyable, but is currently copied in some - // error handling in Driver::generateCompilationDiagnostics. - Command(const Command &) = default; - virtual ~Command() {} - - virtual void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote, - CrashReportInfo *CrashInfo = nullptr) const; - - virtual int Execute(const StringRef **Redirects, std::string *ErrMsg, - bool *ExecutionFailed) const; - - /// getSource - Return the Action which caused the creation of this job. - const Action &getSource() const { return Source; } - - /// getCreator - Return the Tool which caused the creation of this job. - const Tool &getCreator() const { return Creator; } - - /// Set to pass arguments via a response file when launching the command - void setResponseFile(const char *FileName); - - /// Set an input file list, necessary if we need to use a response file but - /// the tool being called only supports input files lists. - void setInputFileList(llvm::opt::ArgStringList List) { - InputFileList = std::move(List); - } - - const char *getExecutable() const { return Executable; } - - const llvm::opt::ArgStringList &getArguments() const { return Arguments; } - - /// Print a command argument, and optionally quote it. - static void printArg(llvm::raw_ostream &OS, const char *Arg, bool Quote); -}; - -/// Like Command, but with a fallback which is executed in case -/// the primary command crashes. -class FallbackCommand : public Command { -public: - FallbackCommand(const Action &Source_, const Tool &Creator_, - const char *Executable_, const ArgStringList &Arguments_, - ArrayRef<InputInfo> Inputs, - std::unique_ptr<Command> Fallback_); - - void Print(llvm::raw_ostream &OS, const char *Terminator, bool Quote, - CrashReportInfo *CrashInfo = nullptr) const override; - - int Execute(const StringRef **Redirects, std::string *ErrMsg, - bool *ExecutionFailed) const override; - -private: - std::unique_ptr<Command> Fallback; -}; - -/// JobList - A sequence of jobs to perform. -class JobList { -public: - typedef SmallVector<std::unique_ptr<Command>, 4> list_type; - typedef list_type::size_type size_type; - typedef llvm::pointee_iterator<list_type::iterator> iterator; - typedef llvm::pointee_iterator<list_type::const_iterator> const_iterator; - -private: - list_type Jobs; - -public: - void Print(llvm::raw_ostream &OS, const char *Terminator, - bool Quote, CrashReportInfo *CrashInfo = nullptr) const; - - /// Add a job to the list (taking ownership). - void addJob(std::unique_ptr<Command> J) { Jobs.push_back(std::move(J)); } - - /// Clear the job list. - void clear(); - - const list_type &getJobs() const { return Jobs; } - - size_type size() const { return Jobs.size(); } - iterator begin() { return Jobs.begin(); } - const_iterator begin() const { return Jobs.begin(); } - iterator end() { return Jobs.end(); } - const_iterator end() const { return Jobs.end(); } -}; - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/Makefile b/include/clang/Driver/Makefile deleted file mode 100644 index 8309330..0000000 --- a/include/clang/Driver/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -CLANG_LEVEL := ../../.. -BUILT_SOURCES = Options.inc - -TABLEGEN_INC_FILES_COMMON = 1 - -include $(CLANG_LEVEL)/Makefile - -$(ObjDir)/Options.inc.tmp : Options.td CC1Options.td CLCompatOptions.td $(LLVM_TBLGEN) $(ObjDir)/.dir - $(Echo) "Building Clang Driver Option tables with tblgen" - $(Verb) $(LLVMTableGen) -gen-opt-parser-defs -o $(call SYSPATH, $@) $< diff --git a/include/clang/Driver/Multilib.h b/include/clang/Driver/Multilib.h deleted file mode 100644 index 20bb80d..0000000 --- a/include/clang/Driver/Multilib.h +++ /dev/null @@ -1,175 +0,0 @@ -//===--- Multilib.h ---------------------------------------------*- 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_DRIVER_MULTILIB_H -#define LLVM_CLANG_DRIVER_MULTILIB_H - -#include "clang/Basic/LLVM.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/Triple.h" -#include "llvm/Option/Option.h" -#include <functional> -#include <string> -#include <vector> - -namespace clang { -namespace driver { - -/// This corresponds to a single GCC Multilib, or a segment of one controlled -/// by a command line flag -class Multilib { -public: - typedef std::vector<std::string> flags_list; - -private: - std::string GCCSuffix; - std::string OSSuffix; - std::string IncludeSuffix; - flags_list Flags; - -public: - Multilib(StringRef GCCSuffix = "", StringRef OSSuffix = "", - StringRef IncludeSuffix = ""); - - /// \brief Get the detected GCC installation path suffix for the multi-arch - /// target variant. Always starts with a '/', unless empty - const std::string &gccSuffix() const { - assert(GCCSuffix.empty() || - (StringRef(GCCSuffix).front() == '/' && GCCSuffix.size() > 1)); - return GCCSuffix; - } - /// Set the GCC installation path suffix. - Multilib &gccSuffix(StringRef S); - - /// \brief Get the detected os path suffix for the multi-arch - /// target variant. Always starts with a '/', unless empty - const std::string &osSuffix() const { - assert(OSSuffix.empty() || - (StringRef(OSSuffix).front() == '/' && OSSuffix.size() > 1)); - return OSSuffix; - } - /// Set the os path suffix. - Multilib &osSuffix(StringRef S); - - /// \brief Get the include directory suffix. Always starts with a '/', unless - /// empty - const std::string &includeSuffix() const { - assert(IncludeSuffix.empty() || - (StringRef(IncludeSuffix).front() == '/' && IncludeSuffix.size() > 1)); - return IncludeSuffix; - } - /// Set the include directory suffix - Multilib &includeSuffix(StringRef S); - - /// \brief Get the flags that indicate or contraindicate this multilib's use - /// All elements begin with either '+' or '-' - const flags_list &flags() const { return Flags; } - flags_list &flags() { return Flags; } - /// Add a flag to the flags list - Multilib &flag(StringRef F) { - assert(F.front() == '+' || F.front() == '-'); - Flags.push_back(F); - return *this; - } - - /// \brief print summary of the Multilib - void print(raw_ostream &OS) const; - - /// Check whether any of the 'against' flags contradict the 'for' flags. - bool isValid() const; - - /// Check whether the default is selected - bool isDefault() const - { return GCCSuffix.empty() && OSSuffix.empty() && IncludeSuffix.empty(); } - - bool operator==(const Multilib &Other) const; -}; - -raw_ostream &operator<<(raw_ostream &OS, const Multilib &M); - -class MultilibSet { -public: - typedef std::vector<Multilib> multilib_list; - typedef multilib_list::iterator iterator; - typedef multilib_list::const_iterator const_iterator; - - typedef std::function<std::vector<std::string>( - StringRef InstallDir, StringRef Triple, const Multilib &M)> - IncludeDirsFunc; - - typedef llvm::function_ref<bool(const Multilib &)> FilterCallback; - -private: - multilib_list Multilibs; - IncludeDirsFunc IncludeCallback; - -public: - MultilibSet() {} - - /// Add an optional Multilib segment - MultilibSet &Maybe(const Multilib &M); - - /// Add a set of mutually incompatible Multilib segments - MultilibSet &Either(const Multilib &M1, const Multilib &M2); - MultilibSet &Either(const Multilib &M1, const Multilib &M2, - const Multilib &M3); - MultilibSet &Either(const Multilib &M1, const Multilib &M2, - const Multilib &M3, const Multilib &M4); - MultilibSet &Either(const Multilib &M1, const Multilib &M2, - const Multilib &M3, const Multilib &M4, - const Multilib &M5); - MultilibSet &Either(ArrayRef<Multilib> Ms); - - /// Filter out some subset of the Multilibs using a user defined callback - MultilibSet &FilterOut(FilterCallback F); - /// Filter out those Multilibs whose gccSuffix matches the given expression - MultilibSet &FilterOut(const char *Regex); - - /// Add a completed Multilib to the set - void push_back(const Multilib &M); - - /// Union this set of multilibs with another - void combineWith(const MultilibSet &MS); - - /// Remove all of thie multilibs from the set - void clear() { Multilibs.clear(); } - - iterator begin() { return Multilibs.begin(); } - const_iterator begin() const { return Multilibs.begin(); } - - iterator end() { return Multilibs.end(); } - const_iterator end() const { return Multilibs.end(); } - - /// Pick the best multilib in the set, \returns false if none are compatible - bool select(const Multilib::flags_list &Flags, Multilib &M) const; - - unsigned size() const { return Multilibs.size(); } - - void print(raw_ostream &OS) const; - - MultilibSet &setIncludeDirsCallback(IncludeDirsFunc F) { - IncludeCallback = std::move(F); - return *this; - } - const IncludeDirsFunc &includeDirsCallback() const { return IncludeCallback; } - -private: - /// Apply the filter to Multilibs and return the subset that remains - static multilib_list filterCopy(FilterCallback F, const multilib_list &Ms); - - /// Apply the filter to the multilib_list, removing those that don't match - static void filterInPlace(FilterCallback F, multilib_list &Ms); -}; - -raw_ostream &operator<<(raw_ostream &OS, const MultilibSet &MS); -} -} - -#endif - diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h deleted file mode 100644 index 2716fa9..0000000 --- a/include/clang/Driver/Options.h +++ /dev/null @@ -1,51 +0,0 @@ -//===--- Options.h - Option info & table ------------------------*- 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_DRIVER_OPTIONS_H -#define LLVM_CLANG_DRIVER_OPTIONS_H - -namespace llvm { -namespace opt { -class OptTable; -} -} - -namespace clang { -namespace driver { - -namespace options { -/// Flags specifically for clang options. Must not overlap with -/// llvm::opt::DriverFlag. -enum ClangFlags { - DriverOption = (1 << 4), - LinkerInput = (1 << 5), - NoArgumentUnused = (1 << 6), - Unsupported = (1 << 7), - CoreOption = (1 << 8), - CLOption = (1 << 9), - CC1Option = (1 << 10), - CC1AsOption = (1 << 11), - NoDriverOption = (1 << 12) -}; - -enum ID { - OPT_INVALID = 0, // This is not an option ID. -#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ - HELPTEXT, METAVAR) OPT_##ID, -#include "clang/Driver/Options.inc" - LastOption -#undef OPTION - }; -} - -llvm::opt::OptTable *createDriverOptTable(); -} -} - -#endif diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td deleted file mode 100644 index e219a9b..0000000 --- a/include/clang/Driver/Options.td +++ /dev/null @@ -1,2133 +0,0 @@ -//===--- Options.td - Options for clang -----------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the options accepted by clang. -// -//===----------------------------------------------------------------------===// - -// Include the common option parsing interfaces. -include "llvm/Option/OptParser.td" - -///////// -// Flags - -// DriverOption - The option is a "driver" option, and should not be forwarded -// to other tools. -def DriverOption : OptionFlag; - -// LinkerInput - The option is a linker input. -def LinkerInput : OptionFlag; - -// NoArgumentUnused - Don't report argument unused warnings for this option; this -// is useful for options like -static or -dynamic which a user may always end up -// passing, even if the platform defaults to (or only supports) that option. -def NoArgumentUnused : OptionFlag; - -// Unsupported - The option is unsupported, and the driver will reject command -// lines that use it. -def Unsupported : OptionFlag; - -// CoreOption - This is considered a "core" Clang option, available in both -// clang and clang-cl modes. -def CoreOption : OptionFlag; - -// CLOption - This is a cl.exe compatibility option. Options with this flag -// are made available when the driver is running in CL compatibility mode. -def CLOption : OptionFlag; - -// CC1Option - This option should be accepted by clang -cc1. -def CC1Option : OptionFlag; - -// CC1AsOption - This option should be accepted by clang -cc1as. -def CC1AsOption : OptionFlag; - -// NoDriverOption - This option should not be accepted by the driver. -def NoDriverOption : OptionFlag; - -///////// -// Groups - -// Meta-group for options which are only used for compilation, -// and not linking etc. -def CompileOnly_Group : OptionGroup<"<CompileOnly group>">; - -def Action_Group : OptionGroup<"<action group>">; - -def I_Group : OptionGroup<"<I group>">, Group<CompileOnly_Group>; -def M_Group : OptionGroup<"<M group>">, Group<CompileOnly_Group>; -def T_Group : OptionGroup<"<T group>">; -def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>; -def R_Group : OptionGroup<"<R group>">, Group<CompileOnly_Group>; -def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>; -def W_Group : OptionGroup<"<W group>">, Group<CompileOnly_Group>; -def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>; -def d_Group : OptionGroup<"<d group>">; -def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>; -def f_clang_Group : OptionGroup<"<f (clang-only) group>">, Group<CompileOnly_Group>; -def g_Group : OptionGroup<"<g group>">; -def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>; -def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>; -def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>; -def g_flags_Group : OptionGroup<"<g flags group>">; -def i_Group : OptionGroup<"<i group>">, Group<CompileOnly_Group>; -def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>; -def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>; - -// Feature groups - these take command line options that correspond directly to -// target specific features and can be translated directly from command line -// options. -def m_x86_Features_Group : OptionGroup<"<x86 features group>">, - Group<m_Group>, - Flags<[CoreOption]>; -def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">, - Group<m_Group>; -def m_arm_Features_Group : OptionGroup<"<arm features group>">, - Group<m_Group>; -def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">, - Group<m_Group>; -def m_ppc_Features_Group : OptionGroup<"<ppc features group>">, - Group<m_Group>; -def m_wasm_Features_Group : OptionGroup<"<wasm features group>">, - Group<m_Group>; - -def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_Group>; -def u_Group : OptionGroup<"<u group>">; - -def pedantic_Group : OptionGroup<"<pedantic group>">, - Group<CompileOnly_Group>; -def reserved_lib_Group : OptionGroup<"<reserved libs group>">; - -// Temporary groups for clang options which we know we don't support, -// but don't want to verbosely warn the user about. -def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">, - Group<f_Group>; -def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">, - Group<m_Group>; - -// Group that ignores all gcc optimizations that won't be implemented -def clang_ignored_gcc_optimization_f_Group : OptionGroup< - "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>; - -///////// -// Options - -// The internal option ID must be a valid C++ identifier and results in a -// clang::driver::options::OPT_XX enum constant for XX. -// -// We want to unambiguously be able to refer to options from the driver source -// code, for this reason the option name is mangled into an ID. This mangling -// isn't guaranteed to have an inverse, but for practical purposes it does. -// -// The mangling scheme is to ignore the leading '-', and perform the following -// substitutions: -// _ => __ -// - => _ -// / => _SLASH -// # => _HASH -// ? => _QUESTION -// , => _COMMA -// = => _EQ -// C++ => CXX -// . => _ - -// Developer Driver Options - -def internal_Group : OptionGroup<"<clang internal options>">; -def internal_driver_Group : OptionGroup<"<clang driver internal options>">, - Group<internal_Group>, HelpText<"DRIVER OPTIONS">; -def internal_debug_Group : - OptionGroup<"<clang debug/development internal options>">, - Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">; - -class InternalDriverOpt : Group<internal_driver_Group>, - Flags<[DriverOption, HelpHidden]>; -def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>, - Flags<[CoreOption, DriverOption, HelpHidden]>, - HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">; -def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt, - HelpText<"Name for native GCC compiler">, - MetaVarName<"<gcc-path>">; -def ccc_pch_is_pch : Flag<["-"], "ccc-pch-is-pch">, InternalDriverOpt, - HelpText<"Use lazy PCH for precompiled headers">; -def ccc_pch_is_pth : Flag<["-"], "ccc-pch-is-pth">, InternalDriverOpt, - HelpText<"Use pretokenized headers for precompiled headers">; - -class InternalDebugOpt : Group<internal_debug_Group>, - Flags<[DriverOption, HelpHidden, CoreOption]>; -def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt, - HelpText<"Simulate installation in the given directory">; -def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt, - HelpText<"Dump list of actions to perform">; -def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt, - HelpText<"Show bindings of tools to actions">; - -def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt, - HelpText<"Check for ARC migration issues that need manual handling">; -def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt, - HelpText<"Apply modifications to files to conform to ARC">; -def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt, - HelpText<"Apply modifications and produces temporary files that conform to ARC">; -def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">, - HelpText<"Output path for the plist report">, Flags<[CC1Option]>; -def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">, - HelpText<"Emit ARC errors even if the migrator can fix them">, - Flags<[CC1Option]>; - -def _migrate : Flag<["--"], "migrate">, Flags<[DriverOption]>, - HelpText<"Run the migrator">; -def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">, - InternalDriverOpt, - HelpText<"Apply modifications and produces temporary files to migrate to " - "modern ObjC syntax">; -def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC literals">; -def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC subscripting">; -def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC property">; -def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC">; -def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC readonly property">; -def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>, - HelpText<"Enable migration to modern ObjC readwrite property">; -def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>, - HelpText<"Enable migration of setter/getter messages to property-dot syntax">; -def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>, - HelpText<"Enable migration to property and method annotations">; -def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>, - HelpText<"Enable migration to infer instancetype for method result type">; -def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>, - HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">; -def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>, - HelpText<"Enable migration to add protocol conformance on classes">; -def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>, - HelpText<"Make migration to 'atomic' properties">; -def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>, - HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">; -def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>, - HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">; -def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>, - HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">; -def objcmt_whitelist_dir_path: Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>, - HelpText<"Only modify files with a filename contained in the provided directory path">; -// The misspelt "white-list" [sic] alias is due for removal. -def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>, - Alias<objcmt_whitelist_dir_path>; - -// Make sure all other -ccc- options are rejected. -def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>; - -// Standard Options - -def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[DriverOption, CoreOption]>, - HelpText<"Print (but do not run) the commands to run for this compilation">; -def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>, - Flags<[DriverOption, CoreOption]>; -def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>; -def B : JoinedOrSeparate<["-"], "B">; -def CC : Flag<["-"], "CC">, Flags<[CC1Option]>; -def C : Flag<["-"], "C">, Flags<[CC1Option]>; -def D : JoinedOrSeparate<["-"], "D">, Group<CompileOnly_Group>, Flags<[CC1Option]>; -def E : Flag<["-"], "E">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>, - HelpText<"Only run the preprocessor">; -def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>, - HelpText<"Add directory to framework include search path">; -def G : JoinedOrSeparate<["-"], "G">, Flags<[DriverOption]>; -def G_EQ : Joined<["-"], "G=">, Flags<[DriverOption]>; -def H : Flag<["-"], "H">, Flags<[CC1Option]>, - HelpText<"Show header includes and nesting depth">; -def I_ : Flag<["-"], "I-">, Group<I_Group>; -def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>, Flags<[CC1Option,CC1AsOption]>, - HelpText<"Add directory to include search path">; -def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>; -def MD : Flag<["-"], "MD">, Group<M_Group>, - HelpText<"Write a depfile containing user and system headers">; -def MMD : Flag<["-"], "MMD">, Group<M_Group>, - HelpText<"Write a depfile containing user headers">; -def M : Flag<["-"], "M">, Group<M_Group>, - HelpText<"Like -MD, but also implies -E and writes to stdout by default">; -def MM : Flag<["-"], "MM">, Group<M_Group>, - HelpText<"Like -MMD, but also implies -E and writes to stdout by default">; -def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>, - HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">, - MetaVarName<"<file>">; -def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>, - HelpText<"Add missing headers to depfile">; -def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>, - HelpText<"Create phony target for each dependency (other than main file)">; -def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>, - HelpText<"Specify name of main file output to quote in depfile">; -def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>, - HelpText<"Specify name of main file output in depfile">; -def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>, - HelpText<"Use NMake/Jom format for the depfile">; -def Mach : Flag<["-"], "Mach">; -def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option]>; -def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option]>; -def ObjCXX : Flag<["-"], "ObjC++">, Flags<[DriverOption]>, - HelpText<"Treat source input files as Objective-C++ inputs">; -def ObjC : Flag<["-"], "ObjC">, Flags<[DriverOption]>, - HelpText<"Treat source input files as Objective-C inputs">; -def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option]>; -def O_flag : Flag<["-"], "O">, Flags<[CC1Option]>, Alias<O>, AliasArgs<["2"]>; -def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>; -def P : Flag<["-"], "P">, Flags<[CC1Option]>, - HelpText<"Disable linemarker output in -E mode">; -def Qn : Flag<["-"], "Qn">; -def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[DriverOption, CoreOption]>, - HelpText<"Don't emit warning for unused driver arguments">; -def Q : Flag<["-"], "Q">; -def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>, - HelpText<"Report transformations performed by optimization passes whose " - "name matches the given POSIX regular expression">; -def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>, - Flags<[CC1Option]>, - HelpText<"Report missed transformations by optimization passes whose " - "name matches the given POSIX regular expression">; -def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>, - Flags<[CC1Option]>, - HelpText<"Report transformation analysis from optimization passes whose " - "name matches the given POSIX regular expression">; -def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>, - MetaVarName<"<remark>">, HelpText<"Enable the specified remark">; -def S : Flag<["-"], "S">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>, - HelpText<"Only run preprocess and compilation steps">; -def Tbss : JoinedOrSeparate<["-"], "Tbss">, Group<T_Group>; -def Tdata : JoinedOrSeparate<["-"], "Tdata">, Group<T_Group>; -def Ttext : JoinedOrSeparate<["-"], "Ttext">, Group<T_Group>; -def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>; -def U : JoinedOrSeparate<["-"], "U">, Group<CompileOnly_Group>, Flags<[CC1Option]>; -def V : JoinedOrSeparate<["-"], "V">, Flags<[DriverOption, Unsupported]>; -def Wa_COMMA : CommaJoined<["-"], "Wa,">, - HelpText<"Pass the comma separated arguments in <arg> to the assembler">, - MetaVarName<"<arg>">; -def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option]>; -def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option]>; -def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>; -def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>; -def Wextra : Flag<["-"], "Wextra">, Group<W_Group>, Flags<[CC1Option]>; -def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>, - HelpText<"Pass the comma separated arguments in <arg> to the linker">, - MetaVarName<"<arg>">; -// FIXME: This is broken; these should not be Joined arguments. -def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>, - Flags<[CC1Option]>; -def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>, - Flags<[CC1Option]>; -def Wp_COMMA : CommaJoined<["-"], "Wp,">, - HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">, - MetaVarName<"<arg>">; -def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option]>; -def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option]>; -def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>, - MetaVarName<"<warning>">, HelpText<"Enable the specified warning">; -def Xanalyzer : Separate<["-"], "Xanalyzer">, - HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">; -def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[DriverOption]>; -def Xassembler : Separate<["-"], "Xassembler">, - HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">; -def Xclang : Separate<["-"], "Xclang">, - HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">, - Flags<[DriverOption, CoreOption]>; -def z : Separate<["-"], "z">, Flags<[LinkerInput, RenderAsInput]>, - HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">; -def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, - HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">; -def Xpreprocessor : Separate<["-"], "Xpreprocessor">, - HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">; -def X_Flag : Flag<["-"], "X">; -def X_Joined : Joined<["-"], "X">; -def Z_Flag : Flag<["-"], "Z">; -def Z_Joined : Joined<["-"], "Z">; -def all__load : Flag<["-"], "all_load">; -def allowable__client : Separate<["-"], "allowable_client">; -def ansi : Flag<["-", "--"], "ansi">; -def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">; -def arch : Separate<["-"], "arch">, Flags<[DriverOption]>; -def arch__only : Separate<["-"], "arch_only">; -def a : Joined<["-"], "a">; -def bind__at__load : Flag<["-"], "bind_at_load">; -def bundle__loader : Separate<["-"], "bundle_loader">; -def bundle : Flag<["-"], "bundle">; -def b : JoinedOrSeparate<["-"], "b">, Flags<[Unsupported]>; -def client__name : JoinedOrSeparate<["-"], "client_name">; -def combine : Flag<["-", "--"], "combine">, Flags<[DriverOption, Unsupported]>; -def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">; -def coverage : Flag<["-", "--"], "coverage">; -def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>; -def current__version : JoinedOrSeparate<["-"], "current_version">; -def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>, - HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>, - MetaVarName<"<directory>">; -def c : Flag<["-"], "c">, Flags<[DriverOption]>, - HelpText<"Only run preprocess, compile, and assemble steps">; -def cuda_device_only : Flag<["--"], "cuda-device-only">, - HelpText<"Do device-side CUDA compilation only">; -def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, - Flags<[DriverOption, HelpHidden]>, HelpText<"CUDA GPU architecture">; -def cuda_host_only : Flag<["--"], "cuda-host-only">, - HelpText<"Do host-side CUDA compilation only">; -def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>, - HelpText<"CUDA installation path">; -def dA : Flag<["-"], "dA">, Group<d_Group>; -def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>, - HelpText<"Print macro definitions in -E mode in addition to normal output">; -def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>, - HelpText<"Print macro definitions in -E mode instead of normal output">; -def dead__strip : Flag<["-"], "dead_strip">; -def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>, - HelpText<"Filename (or -) to write dependency output to">; -def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>, - HelpText<"Filename to write DOT-formatted header dependencies to">; -def module_dependency_dir : Separate<["-"], "module-dependency-dir">, - Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">; -def dumpmachine : Flag<["-"], "dumpmachine">; -def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>; -def dumpversion : Flag<["-"], "dumpversion">; -def dylib__file : Separate<["-"], "dylib_file">; -def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">; -def dylinker : Flag<["-"], "dylinker">; -def dynamiclib : Flag<["-"], "dynamiclib">; -def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>; -def d_Flag : Flag<["-"], "d">, Group<d_Group>; -def d_Joined : Joined<["-"], "d">, Group<d_Group>; -def emit_ast : Flag<["-"], "emit-ast">, - HelpText<"Emit Clang AST files for source inputs">; -def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option]>, Group<Action_Group>, - HelpText<"Use the LLVM representation for assembler and object files">; -def exported__symbols__list : Separate<["-"], "exported_symbols_list">; -def e : JoinedOrSeparate<["-"], "e">; -def fPIC : Flag<["-"], "fPIC">, Group<f_Group>; -def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>; -def fPIE : Flag<["-"], "fPIE">, Group<f_Group>; -def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>; -def faccess_control : Flag<["-"], "faccess-control">, Group<f_Group>; -def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>; -def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use Apple's kernel extensions ABI">; -def fapple_pragma_pack : Flag<["-"], "fapple-pragma-pack">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable Apple gcc-compatible #pragma pack handling">; -def shared_libasan : Flag<["-"], "shared-libasan">; -def fasm : Flag<["-"], "fasm">, Group<f_Group>; - -def fasm_blocks : Flag<["-"], "fasm-blocks">, Group<f_Group>, Flags<[CC1Option]>; -def fno_asm_blocks : Flag<["-"], "fno-asm-blocks">, Group<f_Group>; - -def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>; -def fastcp : Flag<["-"], "fastcp">, Group<f_Group>; -def fastf : Flag<["-"], "fastf">, Group<f_Group>; -def fast : Flag<["-"], "fast">, Group<f_Group>; -def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>; - -def fautolink : Flag <["-"], "fautolink">, Group<f_Group>; -def fno_autolink : Flag <["-"], "fno-autolink">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>, - HelpText<"Disable generation of linker directives for automatic library linking">; - -def fgnu_inline_asm : Flag<["-"], "fgnu-inline-asm">, Group<f_Group>, Flags<[DriverOption]>; -def fno_gnu_inline_asm : Flag<["-"], "fno-gnu-inline-asm">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>, - HelpText<"Disable GNU style inline asm">; - -def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">, - Group<f_Group>, Flags<[DriverOption, CC1Option]>, - HelpText<"Enable sample-based profile guided optimizations">; -def fauto_profile_EQ : Joined<["-"], "fauto-profile=">, - Alias<fprofile_sample_use_EQ>; -def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overriden by '=' form of option or LLVM_PROFILE_FILE env var)">; -def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">, - Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<file>">, - HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">; -def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>, - Flags<[DriverOption]>; -def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use instrumentation data for profile-guided optimization">; -def fcoverage_mapping : Flag<["-"], "fcoverage-mapping">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Generate coverage mapping to enable code coverage analysis">; -def fno_coverage_mapping : Flag<["-"], "fno-coverage-mapping">, - Group<f_Group>, Flags<[DriverOption]>, - HelpText<"Disable code coverage analysis">; -def fprofile_generate : Flag<["-"], "fprofile-generate">, - Alias<fprofile_instr_generate>; -def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">, - Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<directory>">, - HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">; -def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>, - Alias<fprofile_instr_use>; -def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, - Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<pathname>">, - HelpText<"Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.">; -def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">, - Group<f_Group>, Flags<[DriverOption]>, - HelpText<"Disable generation of profile instrumentation.">; -def fno_profile_generate : Flag<["-"], "fno-profile-generate">, - Alias<fno_profile_instr_generate>; -def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">, - Group<f_Group>, Flags<[DriverOption]>, - HelpText<"Disable using instrumentation data for profile-guided optimization">; -def fno_profile_use : Flag<["-"], "fno-profile-use">, - Alias<fno_profile_instr_use>; - -def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable the 'blocks' language feature">; -def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>; -def fborland_extensions : Flag<["-"], "fborland-extensions">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Accept non-standard constructs supported by the Borland compiler">; -def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>; -def fcaret_diagnostics : Flag<["-"], "fcaret-diagnostics">, Group<f_Group>; -def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>; -def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>, - Flags<[CoreOption, CC1Option]>, HelpText<"Use colors in diagnostics">; -def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, - Flags<[CoreOption, DriverOption]>; -def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>; -def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>, - Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">; -def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">, - MetaVarName<"<arg>">; -def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>; -def fcommon : Flag<["-"], "fcommon">, Group<f_Group>; -def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>; -def fconstant_cfstrings : Flag<["-"], "fconstant-cfstrings">, Group<f_Group>; -def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>; -def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>; -def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>; -def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">, - Group<f_Group>; -def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused]>; -def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>; -def fcxx_exceptions: Flag<["-"], "fcxx-exceptions">, Group<f_Group>, - HelpText<"Enable C++ exceptions">, Flags<[CC1Option]>; -def fcxx_modules : Flag <["-"], "fcxx-modules">, Group<f_Group>, - Flags<[DriverOption]>; -def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>; -def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>; -def fdepfile_entry : Joined<["-"], "fdepfile-entry=">, - Group<f_clang_Group>, Flags<[CC1Option]>; -def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>; -def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>, - Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">; -def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Print source range spans in numeric form">; -def fdiagnostics_show_option : Flag<["-"], "fdiagnostics-show-option">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Print option name with mappable diagnostics">; -def fdiagnostics_show_note_include_stack : Flag<["-"], "fdiagnostics-show-note-include-stack">, - Group<f_Group>, Flags<[CC1Option]>, HelpText<"Display include stacks for diagnostic notes">; -def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>; -def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>; -def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Print a template comparison tree for differing templates">; -def fdeclspec : Flag<["-"], "fdeclspec">, Group<f_clang_Group>, - HelpText<"Allow __declspec as a keyword">, Flags<[CC1Option]>; -def fdollars_in_identifiers : Flag<["-"], "fdollars-in-identifiers">, Group<f_Group>, - HelpText<"Allow '$' in identifiers">, Flags<[CC1Option]>; -def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>; -def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>; -def fdwarf_directory_asm : Flag<["-"], "fdwarf-directory-asm">, Group<f_Group>; -def fno_dwarf_directory_asm : Flag<["-"], "fno-dwarf-directory-asm">, Group<f_Group>, Flags<[CC1Option]>; -def felide_constructors : Flag<["-"], "felide-constructors">, Group<f_Group>; -def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>, - Flags<[CC1Option]>, - HelpText<"Do not elide types when printing diagnostics">; -def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>; -def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Emit all declarations, even if unused">; -def femulated_tls : Flag<["-"], "femulated-tls">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use emutls functions to access thread_local variables">; -def fno_emulated_tls : Flag<["-"], "fno-emulated-tls">, Group<f_Group>; -def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>; -def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>; -def fexceptions : Flag<["-"], "fexceptions">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable support for exception handling">; -def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, - Group<clang_ignored_gcc_optimization_f_Group>; -def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; -def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; -def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>; -def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; -def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; -def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>; -def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>; -def fhosted : Flag<["-"], "fhosted">, Group<f_Group>; -def ffast_math : Flag<["-"], "ffast-math">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable the *frontend*'s 'fast-math' mode. This has no effect on " - "optimizations, but provides a preprocessor macro __FAST_MATH__ the " - "same as GCC's -ffast-math flag">; -def fno_fast_math : Flag<["-"], "fno-fast-math">, Group<f_Group>; -def fmath_errno : Flag<["-"], "fmath-errno">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Require math functions to indicate errors by setting errno">; -def fno_math_errno : Flag<["-"], "fno-math-errno">, Group<f_Group>; -def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>; -def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>; -def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>; -def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>, - Flags<[CC1Option, CoreOption]>, MetaVarName<"<check>">, - HelpText<"Turn on runtime checks for various forms of undefined " - "or suspicious behavior. See user manual for available checks">; -def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>, - Flags<[CoreOption]>; -def fsanitize_blacklist : Joined<["-"], "fsanitize-blacklist=">, - Group<f_clang_Group>, Flags<[CC1Option, CoreOption]>, - HelpText<"Path to blacklist file for sanitizers">; -def fno_sanitize_blacklist : Flag<["-"], "fno-sanitize-blacklist">, - Group<f_clang_Group>, - HelpText<"Don't use blacklist file for sanitizers">; -def fsanitize_coverage - : CommaJoined<["-"], "fsanitize-coverage=">, - Group<f_clang_Group>, Flags<[CoreOption]>, - HelpText<"Specify the type of coverage instrumentation for Sanitizers">; -def fno_sanitize_coverage - : CommaJoined<["-"], "fno-sanitize-coverage=">, - Group<f_clang_Group>, Flags<[CoreOption]>, - HelpText<"Disable specified features of coverage instrumentation for " - "Sanitizers">; -def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Enable origins tracking in MemorySanitizer">; -def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Enable origins tracking in MemorySanitizer">; -def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Disable origins tracking in MemorySanitizer">; -def fsanitize_memory_use_after_dtor : Flag<["-"], "fsanitize-memory-use-after-dtor">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Enable use-after-destroy detection in MemorySanitizer">; -def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Level of field padding for AddressSanitizer">; -def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>, - Flags<[CoreOption]>; -def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">, - Group<f_clang_Group>, Flags<[CoreOption]>; -def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">, - Group<f_clang_Group>, - Flags<[CC1Option, CoreOption]>, - HelpText<"Enable recovery for specified sanitizers">; -def fno_sanitize_recover_EQ - : CommaJoined<["-"], "fno-sanitize-recover=">, - Group<f_clang_Group>, Flags<[CoreOption]>, - HelpText<"Disable recovery for specified sanitizers">; -def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>, - Flags<[CC1Option, CoreOption]>, - HelpText<"Enable trapping for specified sanitizers">; -def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>, - Flags<[CoreOption]>, - HelpText<"Disable trapping for specified sanitizers">; -def fsanitize_undefined_trap_on_error : Flag<["-"], "fsanitize-undefined-trap-on-error">, - Group<f_clang_Group>; -def fno_sanitize_undefined_trap_on_error : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, - Group<f_clang_Group>; -def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">, - Group<f_clang_Group>; -def fsanitize_cfi_cross_dso : Flag<["-"], "fsanitize-cfi-cross-dso">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Enable control flow integrity (CFI) checks for cross-DSO calls.">; -def fno_sanitize_cfi_cross_dso : Flag<["-"], "fno-sanitize-cfi-cross-dso">, - Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Disable control flow integrity (CFI) checks for cross-DSO calls.">; -def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">, - Group<f_Group>; -def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">, - Group<f_Group>; -def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>; -def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>; -def freciprocal_math : - Flag<["-"], "freciprocal-math">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Allow division operations to be reassociated">; -def fno_reciprocal_math : Flag<["-"], "fno-reciprocal-math">, Group<f_Group>; -def ffinite_math_only : Flag<["-"], "ffinite-math-only">, Group<f_Group>, Flags<[CC1Option]>; -def fno_finite_math_only : Flag<["-"], "fno-finite-math-only">, Group<f_Group>; -def fsigned_zeros : Flag<["-"], "fsigned-zeros">, Group<f_Group>; -def fno_signed_zeros : - Flag<["-"], "fno-signed-zeros">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Allow optimizations that ignore the sign of floating point zeros">; -def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>; -def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>; -def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>; -def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>; -// This option was originally misspelt "infinites" [sic]. -def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>; -def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>; -def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>; -def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>; -def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Form fused FP ops (e.g. FMAs): fast (everywhere)" - " | on (according to FP_CONTRACT pragma, default) | off (never fuse)">; - -def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>; -def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>; - -def frewrite_includes : Flag<["-"], "frewrite-includes">, Group<f_Group>, - Flags<[CC1Option]>; -def fno_rewrite_includes : Flag<["-"], "fno-rewrite-includes">, Group<f_Group>; - -def frewrite_map_file : Separate<["-"], "frewrite-map-file">, - Group<f_Group>, - Flags<[ DriverOption, CC1Option ]>; -def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">, - Group<f_Group>, - Flags<[DriverOption]>; - -def fuse_line_directives : Flag<["-"], "fuse-line-directives">, Group<f_Group>, - Flags<[CC1Option]>; -def fno_use_line_directives : Flag<["-"], "fno-use-line-directives">, Group<f_Group>; - -def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Assert that the compilation takes place in a freestanding environment">; -def fgnu_keywords : Flag<["-"], "fgnu-keywords">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Allow GNU-extension keywords regardless of language standard">; -def fgnu89_inline : Flag<["-"], "fgnu89-inline">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use the gnu89 inline semantics">; -def fno_gnu89_inline : Flag<["-"], "fno-gnu89-inline">, Group<f_Group>; -def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>, - HelpText<"Generate output compatible with the standard GNU Objective-C runtime">; -def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>; -def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>; -def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>; -def finline_functions : Flag<["-"], "finline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; -def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; -def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group<f_Group>; -def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>; -def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Generate calls to instrument function entry and exit">; -def flat__namespace : Flag<["-"], "flat_namespace">; -def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>; -def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; -def flto_EQ : Joined<["-"], "flto=">, Flags<[CC1Option]>, Group<f_Group>, - HelpText<"Set LTO mode to either 'full' or 'thin'">; -def flto : Flag<["-"], "flto">, Flags<[CC1Option]>, Group<f_Group>, - HelpText<"Enable LTO in 'full' mode">; -def fno_lto : Flag<["-"], "fno-lto">, Group<f_Group>, - HelpText<"Disable LTO mode (default)">; -def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">, - Flags<[CC1Option]>, Group<f_Group>, - HelpText<"Perform ThinLTO importing using provided function summary index">; -def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, - Group<f_Group>, Flags<[DriverOption, CoreOption]>; -def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group<f_Group>; -def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>; -def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, - HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">; -def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>, - HelpText<"Enable full Microsoft Visual C++ compatibility">; -def fms_volatile : Joined<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>; -def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[DriverOption, CoreOption]>, - HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">; -def fms_compatibility_version - : Joined<["-"], "fms-compatibility-version=">, - Group<f_Group>, - Flags<[ CC1Option, CoreOption ]>, - HelpText<"Dot-separated value representing the Microsoft compiler " - "version number to report in _MSC_VER (0 = don't define it " - "(default))">; -def fdelayed_template_parsing : Flag<["-"], "fdelayed-template-parsing">, Group<f_Group>, - HelpText<"Parse templated function definitions at the end of the " - "translation unit">, Flags<[CC1Option]>; -def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>; -def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>, - Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">, - HelpText<"Specify the module cache path">; -def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>, - Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">, - HelpText<"Specify the module user build path">; -def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>, - Flags<[CC1Option]>, MetaVarName<"<seconds>">, - HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">; -def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>, - Flags<[CC1Option]>, MetaVarName<"<seconds>">, - HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">; -def fmodules_search_all : Flag <["-"], "fmodules-search-all">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>, - HelpText<"Search even non-imported modules to resolve references">; -def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, - Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">, - HelpText<"Time when the current build session started">; -def fbuild_session_file : Joined<["-"], "fbuild-session-file=">, - Group<i_Group>, MetaVarName<"<file>">, - HelpText<"Use the last modification time of <file> as the build session timestamp">; -def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">, - Group<i_Group>, Flags<[CC1Option]>, - HelpText<"Don't verify input files for the modules if the module has been " - "successfully validated or loaded during this build session">; -def fmodules_validate_system_headers : Flag<["-"], "fmodules-validate-system-headers">, - Group<i_Group>, Flags<[CC1Option]>, - HelpText<"Validate the system headers that a module depends on when loading the module">; -def fmodules : Flag <["-"], "fmodules">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>, - HelpText<"Enable the 'modules' language feature">; -def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>, - HelpText<"Implicitly search the file system for module map files.">; -def fmodule_maps : Flag <["-"], "fmodule-maps">, Alias<fimplicit_module_maps>; -def fmodule_name : JoinedOrSeparate<["-"], "fmodule-name=">, Group<f_Group>, - Flags<[DriverOption,CC1Option]>, MetaVarName<"<name>">, - HelpText<"Specify the name of the module to build">; -def fmodule_map_file : Joined<["-"], "fmodule-map-file=">, - Group<f_Group>, Flags<[DriverOption,CC1Option]>, MetaVarName<"<file>">, - HelpText<"Load this module map file">; -def fmodule_file : Joined<["-"], "fmodule-file=">, - Group<f_Group>, Flags<[DriverOption,CC1Option]>, - HelpText<"Load this precompiled module file">, MetaVarName<"<file>">; -def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Ignore the definition of the given macro when building and loading modules">; -def fmodules_decluse : Flag <["-"], "fmodules-decluse">, Group<f_Group>, - Flags<[DriverOption,CC1Option]>, - HelpText<"Require declaration of modules used within a module">; -def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>, - Flags<[DriverOption,CC1Option]>, - HelpText<"Like -fmodules-decluse but requires all headers to be in modules">; -def fno_modules_search_all : Flag <["-"], "fno-modules-search-all">, Group<f_Group>, - Flags<[DriverOption, CC1Option]>; -def fno_implicit_modules : - Flag <["-"], "fno-implicit-modules">, - Group<f_Group>, Flags<[DriverOption, CC1Option]>; -def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>; - -def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>; -def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>; -def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>; -def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>; -def fno_access_control : Flag<["-"], "fno-access-control">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Disable C++ access control">; -def fno_apple_pragma_pack : Flag<["-"], "fno-apple-pragma-pack">, Group<f_Group>; -def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>; -def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>; -def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>, - HelpText<"Don't assume that C++'s global operator new can't alias any pointer">, - Flags<[CC1Option]>; -def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>; -def fno_borland_extensions : Flag<["-"], "fno-borland-extensions">, Group<f_Group>; -def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Disable implicit builtin knowledge of functions">; -def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Disable implicit builtin knowledge of a specific function">; -def fno_math_builtin : Flag<["-"], "fno-math-builtin">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Disable implicit builtin knowledge of math functions">; -def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">, Group<f_Group>, - Flags<[CC1Option]>; -def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>, - Flags<[CoreOption, CC1Option]>; -def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, - Flags<[CoreOption, DriverOption]>; -def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Compile common globals like normal definitions">; -def fno_constant_cfstrings : Flag<["-"], "fno-constant-cfstrings">, Group<f_Group>, - Flags<[CC1Option]>, - HelpText<"Disable creation of CodeFoundation-type constant strings">; -def fno_cxx_exceptions: Flag<["-"], "fno-cxx-exceptions">, Group<f_Group>; -def fno_cxx_modules : Flag <["-"], "fno-cxx-modules">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">; -def fno_diagnostics_show_option : Flag<["-"], "fno-diagnostics-show-option">, Group<f_Group>; -def fno_diagnostics_show_note_include_stack : Flag<["-"], "fno-diagnostics-show-note-include-stack">, - Flags<[CC1Option]>, Group<f_Group>; -def fno_declspec : Flag<["-"], "fno-declspec">, Group<f_clang_Group>, - HelpText<"Disallow __declspec as a keyword">, Flags<[CC1Option]>; -def fno_dollars_in_identifiers : Flag<["-"], "fno-dollars-in-identifiers">, Group<f_Group>, - HelpText<"Disallow '$' in identifiers">, Flags<[CC1Option]>; -def fno_elide_constructors : Flag<["-"], "fno-elide-constructors">, Group<f_Group>, - HelpText<"Disable C++ copy constructor elision">, Flags<[CC1Option]>; -def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>; -def fno_exceptions : Flag<["-"], "fno-exceptions">, Group<f_Group>; -def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>; -def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>; -def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>; -def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use the given vector functions library">; -def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>, - HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>; -def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Disallow merging of constants">; -def fno_modules : Flag <["-"], "fno-modules">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>; -def fno_modules_decluse : Flag <["-"], "fno-modules-decluse">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>, - Flags<[DriverOption]>; -def fimplicit_modules : Flag <["-"], "fimplicit-modules">, Group<f_Group>, - Flags<[DriverOption]>; -def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>, - Flags<[DriverOption]>; -def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>, - Flags<[CoreOption]>; -def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>, - Flags<[CoreOption]>; -def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group<f_Group>; -def fno_objc_exceptions: Flag<["-"], "fno-objc-exceptions">, Group<f_Group>; -def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>; -def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>; -def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>; -def fno_operator_names : Flag<["-"], "fno-operator-names">, Group<f_Group>, - HelpText<"Do not treat C++ operator name keywords as synonyms for operators">, - Flags<[CC1Option]>; -def fno_pascal_strings : Flag<["-"], "fno-pascal-strings">, Group<f_Group>; -def fno_rtti : Flag<["-"], "fno-rtti">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Disable generation of rtti information">; -def fno_short_enums : Flag<["-"], "fno-short-enums">, Group<f_Group>; -def fno_show_column : Flag<["-"], "fno-show-column">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Do not include column number on diagnostics">; -def fno_show_source_location : Flag<["-"], "fno-show-source-location">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Do not include source location information with diagnostics">; -def fno_spell_checking : Flag<["-"], "fno-spell-checking">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Disable spell-checking">; -def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>, - HelpText<"Disable the use of stack protectors">; -def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>, - Flags<[DriverOption, CoreOption]>; -def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>; -def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>; -def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>; -def fno_strict_vtable_pointers: Flag<["-"], "fno-strict-vtable-pointers">, - Group<f_Group>; -def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>; -def fno_threadsafe_statics : Flag<["-"], "fno-threadsafe-statics">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Do not emit code to make initialization of local statics thread safe">; -def fno_use_cxa_atexit : Flag<["-"], "fno-use-cxa-atexit">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Don't use __cxa_atexit for calling destructors">; -def fno_use_init_array : Flag<["-"], "fno-use-init-array">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Don't use .init_array instead of .ctors">; -def fno_unit_at_a_time : Flag<["-"], "fno-unit-at-a-time">, Group<f_Group>; -def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>; -def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>; -def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>; -def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>; -def fno_zero_initialized_in_bss : Flag<["-"], "fno-zero-initialized-in-bss">, Group<f_Group>; -def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Synthesize retain and release calls for Objective-C pointers">; -def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>; -def fobjc_arc_exceptions : Flag<["-"], "fobjc-arc-exceptions">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use EH-safe code when synthesizing retains and releases in -fobjc-arc">; -def fno_objc_arc_exceptions : Flag<["-"], "fno-objc-arc-exceptions">, Group<f_Group>; -def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>; -def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>; -def fobjc_exceptions: Flag<["-"], "fobjc-exceptions">, Group<f_Group>, - HelpText<"Enable Objective-C exceptions">, Flags<[CC1Option]>; -def fapplication_extension : Flag<["-"], "fapplication-extension">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Restrict code to those available for App Extensions">; -def fno_application_extension : Flag<["-"], "fno-application-extension">, - Group<f_Group>; -def fsized_deallocation : Flag<["-"], "fsized-deallocation">, Flags<[CC1Option]>, - HelpText<"Enable C++14 sized global deallocation functions">, Group<f_Group>; -def fno_sized_deallocation: Flag<["-"], "fno-sized-deallocation">, Group<f_Group>; - -def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use GC exclusively for Objective-C related memory management">; -def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable Objective-C garbage collection">; -def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>; -def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>; -def fobjc_infer_related_result_type : Flag<["-"], "fobjc-infer-related-result-type">, - Group<f_Group>; -def fno_objc_infer_related_result_type : Flag<["-"], - "fno-objc-infer-related-result-type">, Group<f_Group>, - HelpText< - "do not infer Objective-C related result type based on method family">, - Flags<[CC1Option]>; -def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>; -def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable ARC-style weak references in Objective-C">; - -// Objective-C ABI options. -def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Specify the target Objective-C runtime kind and version">; -def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>; -def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>; -def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>; -def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>; - -def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>; -def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>; -def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>; -def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>; -def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>; -def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>, Flags<[NoArgumentUnused]>; -def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>; -def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>; -def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>; -def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">; -def force__flat__namespace : Flag<["-"], "force_flat_namespace">; -def force__load : Separate<["-"], "force_load">; -def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>; -def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>; -def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>; -def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>; -def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Specify the default maximum struct packing alignment">; -def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">; -def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>; -def fpascal_strings : Flag<["-"], "fpascal-strings">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Recognize and construct Pascal-style string literals">; -def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Override the default ABI to return all structs on the stack">; -def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>; -def fpic : Flag<["-"], "fpic">, Group<f_Group>; -def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>; -def fpie : Flag<["-"], "fpie">, Group<f_Group>; -def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>; -def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[DriverOption]>, MetaVarName<"<dsopath>">, - HelpText<"Load the named plugin (dynamic shared object)">; -def fprofile_arcs : Flag<["-"], "fprofile-arcs">, Group<f_Group>; -def fno_profile_arcs : Flag<["-"], "fno-profile-arcs">, Group<f_Group>; -def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>; -def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>; -def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Override the default ABI to return small structs in registers">; -def frtti : Flag<["-"], "frtti">, Group<f_Group>; -def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>; -def fshort_enums : Flag<["-"], "fshort-enums">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">; -def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Force wchar_t to be a short unsigned int">; -def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Force wchar_t to be an unsigned int">; -def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Which overload candidates to show when overload resolution fails: " - "best|all; defaults to all">; -def fshow_column : Flag<["-"], "fshow-column">, Group<f_Group>, Flags<[CC1Option]>; -def fshow_source_location : Flag<["-"], "fshow-source-location">, Group<f_Group>; -def fspell_checking : Flag<["-"], "fspell-checking">, Group<f_Group>; -def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>; -def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>; -def fsigned_char : Flag<["-"], "fsigned-char">, Group<f_Group>; -def fno_signed_char : Flag<["-"], "fno-signed-char">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Char is unsigned">; -def fsplit_stack : Flag<["-"], "fsplit-stack">, Group<f_Group>; -def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>, - HelpText<"Force the usage of stack protectors for all functions">; -def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>, - HelpText<"Use a strong heuristic to apply stack protectors to functions">; -def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>, - HelpText<"Enable stack protectors for functions potentially vulnerable to stack smashing">; -def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, - HelpText<"Emit full debug info for all types used by the program">; -def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, - HelpText<"Limit debug information produced to reduce size of debug binary">; -def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Alias<fno_standalone_debug>; -def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Alias<fstandalone_debug>; -def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>, - Flags<[DriverOption, CoreOption]>; -def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable optimizations based on the strict definition of an enum's " - "value range">; -def fstrict_vtable_pointers: Flag<["-"], "fstrict-vtable-pointers">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable optimizations based on the strict rules for overwriting " - "polymorphic C++ objects">; -def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>; -def fsyntax_only : Flag<["-"], "fsyntax-only">, - Flags<[DriverOption,CoreOption,CC1Option]>, Group<Action_Group>; -def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>; -def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>; -def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>; -def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">, - Group<f_Group>; -def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">, - Group<f_Group>; -def ftest_coverage : Flag<["-"], "ftest-coverage">, Group<f_Group>; -def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>, - HelpText<"Enable the loop vectorization passes">; -def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>; -def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>; -def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>; -def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>, - HelpText<"Enable the superword-level parallelism vectorization passes">; -def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>; -def fslp_vectorize_aggressive : Flag<["-"], "fslp-vectorize-aggressive">, Group<f_Group>, - HelpText<"Enable the BB vectorization passes">; -def fno_slp_vectorize_aggressive : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<f_Group>; -def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>; -def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>; -def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">, - HelpText<"Warn if a function definition returns or accepts an object larger " - "in bytes than a given value">, Flags<[HelpHidden]>; -def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>; - -// These "special" warning flags are effectively processed as f_Group flags by the driver: -// Just silence warnings about -Wlarger-than for now. -def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>; -def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>; -def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<f_Group>, Flags<[DriverOption]>; - -def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>; -def fthreadsafe_statics : Flag<["-"], "fthreadsafe-statics">, Group<f_Group>; -def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>; -def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>; -def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Trap on integer overflow">; -def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>, - MetaVarName<"<function name>">, - HelpText<"Specify the function to be called on overflow">; -def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>; -def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Issue call to specified function rather than a trap instruction">; -def funit_at_a_time : Flag<["-"], "funit-at-a-time">, Group<f_Group>; -def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>, - HelpText<"Turn on loop unroller">, Flags<[CC1Option]>; -def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>, - HelpText<"Turn off loop unroller">, Flags<[CC1Option]>; -def freroll_loops : Flag<["-"], "freroll-loops">, Group<f_Group>, - HelpText<"Turn on loop reroller">, Flags<[CC1Option]>; -def fno_reroll_loops : Flag<["-"], "fno-reroll-loops">, Group<f_Group>, - HelpText<"Turn off loop reroller">; -def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>, - HelpText<"Process trigraph sequences">, Flags<[CC1Option]>; -def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>, - HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>; -def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>; -def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>; -def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">; -def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>; -def fuse_cxa_atexit : Flag<["-"], "fuse-cxa-atexit">, Group<f_Group>; -def fuse_init_array : Flag<["-"], "fuse-init-array">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use .init_array instead of .ctors">; -def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>; -def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>; -def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, - HelpText<"Set the default symbol visibility for all global declarations">; -def fvisibility_inlines_hidden : Flag<["-"], "fvisibility-inlines-hidden">, Group<f_Group>, - HelpText<"Give inline C++ member functions default visibility by default">, - Flags<[CC1Option]>; -def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>, - HelpText<"Give global types 'default' visibility and global functions and " - "variables 'hidden' visibility by default">; -def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Treat signed integer overflow as two's complement">; -def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Store string literals as writable data">; -def fzero_initialized_in_bss : Flag<["-"], "fzero-initialized-in-bss">, Group<f_Group>; -def ffunction_sections : Flag<["-"], "ffunction-sections">, Group<f_Group>, - Flags<[CC1Option]>, - HelpText<"Place each function in its own section (ELF Only)">; -def fno_function_sections : Flag<["-"], "fno-function-sections">, - Group<f_Group>, Flags<[CC1Option]>; -def fdata_sections : Flag <["-"], "fdata-sections">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Place each data in its own section (ELF Only)">; -def fno_data_sections : Flag <["-"], "fno-data-sections">, Group<f_Group>, - Flags<[CC1Option]>; - -def funique_section_names : Flag <["-"], "funique-section-names">, - Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Use unique names for text and data sections (ELF Only)">; -def fno_unique_section_names : Flag <["-"], "fno-unique-section-names">, - Group<f_Group>, Flags<[CC1Option]>; - - -def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>, - Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">; -def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>, - Flags<[CC1Option]>; -def fdebug_prefix_map_EQ - : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"remap file source paths in debug info">; -def g_Flag : Flag<["-"], "g">, Group<g_Group>, - HelpText<"Generate source-level debug information">; -def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>, - HelpText<"Emit debug line number tables only">; -def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>; -def g0 : Flag<["-"], "g0">, Group<gN_Group>; -def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>; -def g2 : Flag<["-"], "g2">, Group<gN_Group>; -def g3 : Flag<["-"], "g3">, Group<gN_Group>; -def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>; -def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>; -def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>; -def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>; -def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>; -def glldb : Flag<["-"], "glldb">, Group<gTune_Group>; -def gsce : Flag<["-"], "gsce">, Group<gTune_Group>; -def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>, - HelpText<"Generate source-level debug information with dwarf version 2">; -def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>, - HelpText<"Generate source-level debug information with dwarf version 3">; -def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>, - HelpText<"Generate source-level debug information with dwarf version 4">; -def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>, - HelpText<"Generate source-level debug information with dwarf version 5">; -def gcodeview : Flag<["-"], "gcodeview">, - HelpText<"Generate CodeView debug information">, - Flags<[CC1Option, CC1AsOption, CoreOption]>; -// Equivalent to our default dwarf version. Forces usual dwarf emission when -// CodeView is enabled. -def gdwarf : Flag<["-"], "gdwarf">, Alias<gdwarf_4>, Flags<[CoreOption]>; - -def gfull : Flag<["-"], "gfull">, Group<g_Group>; -def gused : Flag<["-"], "gused">, Group<g_Group>; -def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>; -def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>; -def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>; -def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>; -def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>; -def grecord_gcc_switches : Flag<["-"], "grecord-gcc-switches">, Group<g_flags_Group>; -def gno_record_gcc_switches : Flag<["-"], "gno-record-gcc-switches">, - Group<g_flags_Group>; -def gstrict_dwarf : Flag<["-"], "gstrict-dwarf">, Group<g_flags_Group>; -def gno_strict_dwarf : Flag<["-"], "gno-strict-dwarf">, Group<g_flags_Group>; -def gcolumn_info : Flag<["-"], "gcolumn-info">, Group<g_flags_Group>; -def gno_column_info : Flag<["-"], "gno-column-info">, Group<g_flags_Group>; -def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>; -def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>; -def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>; -def gmodules : Flag <["-"], "gmodules">, Group<f_Group>, - HelpText<"Generate debug info with external references to clang modules" - " or precompiled headers">; -def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">; -def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption]>, - HelpText<"Display available options">; -def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>, - HelpText<"Make the next included directory (-I or -F) an indexer header map">; -def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Add directory to AFTER include search path">; -def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Add directory to SYSTEM framework search path">; -def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">; -def image__base : Separate<["-"], "image_base">; -def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">, - MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>; -def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Include precompiled header file">, MetaVarName<"<file>">; -def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>, - HelpText<"Whether to build a relocatable precompiled header">; -def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>, - HelpText<"Load and verify that a pre-compiled header file is not stale">; -def init : Separate<["-"], "init">; -def install__name : Separate<["-"], "install_name">; -def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">; -def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">; -def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">; -def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">; -def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>, - HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">, - Flags<[CC1Option]>; -def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">; -def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>, - HelpText<"Add directory to SYSTEM include search path, " - "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">, - Flags<[CC1Option]>; -def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>, - HelpText<"Overlay the virtual filesystem described by file over the real file system">; -def i : Joined<["-"], "i">, Group<i_Group>; -def keep__private__externs : Flag<["-"], "keep_private_externs">; -def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>; -def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>; -def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>; -def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[DriverOption]>; -def EL : Flag<["-"], "EL">, Alias<mlittle_endian>; -def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[DriverOption]>; -def EB : Flag<["-"], "EB">, Alias<mbig_endian>; -def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[DriverOption, CoreOption]>; -def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>; -def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[DriverOption,CC1Option]>, - HelpText<"Enable hexagon-qdsp6 backward compatibility">; -def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>; -def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>; -def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[DriverOption, CoreOption]>; -def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>; -def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>; -def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>; -def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>; -def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>; -def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>; -def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>; -def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>; -def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">, Alias<mtvos_version_min_EQ>; -def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_version_min_EQ>; -def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>; -def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">, Alias<mwatchos_version_min_EQ>; -def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_version_min_EQ>; -def march_EQ : Joined<["-"], "march=">, Group<m_Group>; -def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[DriverOption]>; -def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>; -def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>; -def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[DriverOption]>; -def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[DriverOption]>; -def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[DriverOption]>; -def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[DriverOption]>; -def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[DriverOption]>; -def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>; -def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>; -def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>; -def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>; -def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>; -def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>; -def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>; -def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>; -def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>; -def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>; -def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Enable merging of globals">; -def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>; -def miphoneos_version_min_EQ : Joined<["-"], "miphoneos-version-min=">, Group<m_Group>; -def mios_version_min_EQ : Joined<["-"], "mios-version-min=">, - Alias<miphoneos_version_min_EQ>, HelpText<"Set iOS deployment target">; -def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">, Alias<miphoneos_version_min_EQ>; -def miphonesimulator_version_min_EQ : Joined<["-"], "miphonesimulator-version-min=">, Alias<miphoneos_version_min_EQ>; -def mkernel : Flag<["-"], "mkernel">, Group<m_Group>; -def mlinker_version_EQ : Joined<["-"], "mlinker-version=">, - Flags<[DriverOption]>; -def mllvm : Separate<["-"], "mllvm">, Flags<[CC1Option,CC1AsOption,CoreOption]>, - HelpText<"Additional arguments to forward to LLVM's option processing">; -def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">, - Group<m_Group>, HelpText<"Set Mac OS X deployment target">; -def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">; -def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>, - HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">; -def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Force realign the stack at entry to every function">; -def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Set the stack alignment">; -def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Set the stack probe size">; -def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"The thread model to use, e.g. posix, single (posix by default)">; -def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Set EABI type, e.g. 4, 5 or gnu (default depends on triple)">; - -def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>; -def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>; -def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>; -def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>; -def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Disable merging of globals">; -def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>; -def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, - Alias<fno_pascal_strings>; -def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>; -def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>; -def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; -def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>; -def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>; -def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>; -def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>; -def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>; -def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>; -def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>; -// -mno-sse4 turns off sse4.1 which has the effect of turning off everything -// later than 4.1. -msse4 turns on 4.2 which has the effect of turning on -// everything earlier than 4.2. -def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>; -def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>; -def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>; -def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>; -def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>; -def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>; -def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>; -def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>; -def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>; -def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>; -def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>; -def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>; -def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>; -def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>; -def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>; -def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>; -def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>; -def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>; -def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>; -def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>; -def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>; -def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>; -def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>; -def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>; -def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>; -def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>; -def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>; -def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>; -def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>; -def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>; -def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>; -def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>; -def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>; -def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>; -def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>; -def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>; - -def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>, - HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">; -def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>, - HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">; -def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>, - HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">; -def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>; -def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>, - HelpText<"Disallow generation of deprecated IT blocks for ARMv8. It is on by default for ARMv8 Thumb mode.">; -def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>, - HelpText<"Allow generation of deprecated IT blocks for ARMv8. It is off by default for ARMv8 Thumb mode">; -def marm : Flag<["-"], "marm">, Alias<mno_thumb>; -def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>, - HelpText<"Reserve the r9 register (ARM only)">; -def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>, - HelpText<"Disallow use of movt/movw pairs (ARM only)">; -def mcrc : Flag<["-"], "mcrc">, Group<m_arm_Features_Group>, - HelpText<"Allow use of CRC instructions (ARM only)">; -def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>, - HelpText<"Disallow use of CRC instructions (ARM only)">; -def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_arm_Features_Group>, - HelpText<"Generate an indirect jump to enable jumps further than 64M">; -def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_arm_Features_Group>, - HelpText<"Restore the default behaviour of not generating long calls">; - -def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>, - HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; - -def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">, - Group<m_aarch64_Features_Group>, - HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">; -def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">, - Group<m_aarch64_Features_Group>, - HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">; -def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>, - HelpText<"Reserve the x18 register (AArch64 only)">; - -def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>; -def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>; - -def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; -def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; -def mpower8_vector : Flag<["-"], "mpower8-vector">, - Group<m_ppc_Features_Group>; -def mno_power8_vector : Flag<["-"], "mno-power8-vector">, - Group<m_ppc_Features_Group>; -def mpower8_crypto : Flag<["-"], "mcrypto">, - Group<m_ppc_Features_Group>; -def mnopower8_crypto : Flag<["-"], "mno-crypto">, - Group<m_ppc_Features_Group>; -def mdirect_move : Flag<["-"], "mdirect-move">, - Group<m_ppc_Features_Group>; -def mnodirect_move : Flag<["-"], "mno-direct-move">, - Group<m_ppc_Features_Group>; -def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>; -def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>; -def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; -def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>; -def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>; -def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>; -def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>; -def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>; -def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>; -def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>; -def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>; -def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>; -def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>; -def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>; -def mqpx : Flag<["-"], "mqpx">, Group<m_ppc_Features_Group>; -def mno_qpx : Flag<["-"], "mno-qpx">, Group<m_ppc_Features_Group>; -def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>; -def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>; -def minvariant_function_descriptors : - Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>; -def mno_invariant_function_descriptors : - Flag<["-"], "mno-invariant-function-descriptors">, - Group<m_ppc_Features_Group>; - -def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable AltiVec vector initializer syntax">; -def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[CC1Option]>; -def maltivec : Flag<["-"], "maltivec">, Alias<faltivec>; -def mno_altivec : Flag<["-"], "mno-altivec">, Alias<fno_altivec>; - -def mvx : Flag<["-"], "mvx">, Group<m_Group>; -def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>; - -def fzvector : Flag<["-"], "fzvector">, Group<f_Group>, Flags<[CC1Option]>, - HelpText<"Enable System z vector language extension">; -def fno_zvector : Flag<["-"], "fno-zvector">, Group<f_Group>, - Flags<[CC1Option]>; -def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>; -def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>; - -def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>; -def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>; -def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>, - HelpText<"Omit frame pointer setup for leaf functions">, Flags<[CC1Option]>; -def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>; -def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>; -def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>; -def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>; -def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>, - HelpText<"(integrated-as) Relax all machine instructions">; -def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>, - Flags<[CC1Option,CC1AsOption]>, - HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">; -def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>, - HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">; -def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Make StdCall calling convention the default">; -def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">, Group<m_Group>; -def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>, - HelpText<"Use software floating point">; -def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>, - HelpText<"Don't generate implicit floating point instructions">; -def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; -def mrecip : Flag<["-"], "mrecip">, Group<m_Group>; -def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>; -def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; -def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; -def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; -def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>; -def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>; -def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>; -def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>; -def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>; -def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>; -def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>; -def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>; -def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>; -def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>; -def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>; -def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>; -def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>; -def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>; -def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>; -def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>; -def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>; -def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>; -def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>; -def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>; -def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>; -def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>; -def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>; -def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>; -def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>; -def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>; -def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>; -def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>; -def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>; -def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>; -def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>; -def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>; -def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>; -def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>; -def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>; -def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>; -def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>; -def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>; -def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>; -def mips16 : Flag<["-"], "mips16">, Group<m_Group>; -def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_Group>; -def mmicromips : Flag<["-"], "mmicromips">, Group<m_Group>; -def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_Group>; -def mxgot : Flag<["-"], "mxgot">, Group<m_Group>; -def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_Group>; -def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_Group>; -def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_Group>; -def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">, Group<m_Group>; -def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">, - Group<m_Group>; -def mdsp : Flag<["-"], "mdsp">, Group<m_Group>; -def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_Group>; -def mdspr2 : Flag<["-"], "mdspr2">, Group<m_Group>; -def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_Group>; -def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>; -def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>; -def mmsa : Flag<["-"], "mmsa">, Group<m_Group>, - HelpText<"Enable MSA ASE (MIPS only)">; -def mno_msa : Flag<["-"], "mno-msa">, Group<m_Group>, - HelpText<"Disable MSA ASE (MIPS only)">; -def mfp64 : Flag<["-"], "mfp64">, Group<m_Group>, - HelpText<"Use 64-bit floating point registers (MIPS only)">; -def mfp32 : Flag<["-"], "mfp32">, Group<m_Group>, - HelpText<"Use 32-bit floating point registers (MIPS only)">; -def mnan_EQ : Joined<["-"], "mnan=">, Group<m_Group>; -def mabicalls : Flag<["-"], "mabicalls">, Group<m_Group>, - HelpText<"Enable SVR4-style position-independent code (Mips only)">; -def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_Group>, - HelpText<"Disable SVR4-style position-independent code (Mips only)">; -def mips1 : Flag<["-"], "mips1">, - Alias<march_EQ>, AliasArgs<["mips1"]>, - HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>; -def mips2 : Flag<["-"], "mips2">, - Alias<march_EQ>, AliasArgs<["mips2"]>, - HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>; -def mips3 : Flag<["-"], "mips3">, - Alias<march_EQ>, AliasArgs<["mips3"]>, - HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>; -def mips4 : Flag<["-"], "mips4">, - Alias<march_EQ>, AliasArgs<["mips4"]>, - HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>; -def mips5 : Flag<["-"], "mips5">, - Alias<march_EQ>, AliasArgs<["mips5"]>, - HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>; -def mips32 : Flag<["-"], "mips32">, - Alias<march_EQ>, AliasArgs<["mips32"]>, - HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>; -def mips32r2 : Flag<["-"], "mips32r2">, - Alias<march_EQ>, AliasArgs<["mips32r2"]>, - HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>; -def mips32r3 : Flag<["-"], "mips32r3">, - Alias<march_EQ>, AliasArgs<["mips32r3"]>, - HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>; -def mips32r5 : Flag<["-"], "mips32r5">, - Alias<march_EQ>, AliasArgs<["mips32r5"]>, - HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>; -def mips32r6 : Flag<["-"], "mips32r6">, - Alias<march_EQ>, AliasArgs<["mips32r6"]>, - HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>; -def mips64 : Flag<["-"], "mips64">, - Alias<march_EQ>, AliasArgs<["mips64"]>, - HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>; -def mips64r2 : Flag<["-"], "mips64r2">, - Alias<march_EQ>, AliasArgs<["mips64r2"]>, - HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>; -def mips64r3 : Flag<["-"], "mips64r3">, - Alias<march_EQ>, AliasArgs<["mips64r3"]>, - HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>; -def mips64r5 : Flag<["-"], "mips64r5">, - Alias<march_EQ>, AliasArgs<["mips64r5"]>, - HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>; -def mips64r6 : Flag<["-"], "mips64r6">, - Alias<march_EQ>, AliasArgs<["mips64r6"]>, - HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>; -def mfpxx : Flag<["-"], "mfpxx">, Group<m_Group>, - HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">, - Flags<[HelpHidden]>; -def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_Group>, - HelpText<"Enable odd single-precision floating point registers">, - Flags<[HelpHidden]>; -def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_Group>, - HelpText<"Disable odd single-precision floating point registers">, - Flags<[HelpHidden]>; -def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; -def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; -def module_file_info : Flag<["-"], "module-file-info">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>; -def mthumb : Flag<["-"], "mthumb">, Group<m_Group>; -def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>; -def multi__module : Flag<["-"], "multi_module">; -def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">; -def multiply__defined : Separate<["-"], "multiply_defined">; -def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>; -def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden]>, - HelpText<"Use relative instead of canonical paths">; -def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>; -def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[DriverOption]>; -def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>; -def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">; -def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option]>, - HelpText<"Disable builtin #include directories">; -def nocudainc : Flag<["-"], "nocudainc">; -def nocudalib : Flag<["-"], "nocudalib">; -def nodefaultlibs : Flag<["-"], "nodefaultlibs">; -def nofixprebinding : Flag<["-"], "nofixprebinding">; -def nolibc : Flag<["-"], "nolibc">; -def nomultidefs : Flag<["-"], "nomultidefs">; -def nopie : Flag<["-"], "nopie">; -def noprebind : Flag<["-"], "noprebind">; -def noseglinkedit : Flag<["-"], "noseglinkedit">; -def nostartfiles : Flag<["-"], "nostartfiles">; -def nostdinc : Flag<["-"], "nostdinc">; -def nostdlibinc : Flag<["-"], "nostdlibinc">; -def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>, - HelpText<"Disable standard #include directories for the C++ standard library">; -def nostdlib : Flag<["-"], "nostdlib">; -def object : Flag<["-"], "object">; -def o : JoinedOrSeparate<["-"], "o">, Flags<[DriverOption, RenderAsInput, CC1Option, CC1AsOption]>, - HelpText<"Write output to <file>">, MetaVarName<"<file>">; -def omptargets_EQ : CommaJoined<["-"], "omptargets=">, Flags<[DriverOption, CC1Option]>, - HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">; -def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">; -def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>; -def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>; -def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option]>; -def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>; -def pipe : Flag<["-", "--"], "pipe">, - HelpText<"Use pipes between commands, when possible">; -def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">; -def prebind : Flag<["-"], "prebind">; -def preload : Flag<["-"], "preload">; -def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">, - HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">; -def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>, - HelpText<"Enable Objective-C Ivar layout bitmap print trace">; -def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">, - HelpText<"Print the library path for \"libgcc.a\"">; -def print_multi_directory : Flag<["-", "--"], "print-multi-directory">; -def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; -def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">, - Flags<[Unsupported]>; -def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, - HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">; -def print_search_dirs : Flag<["-", "--"], "print-search-dirs">, - HelpText<"Print the paths used for finding libraries and programs">; -def private__bundle : Flag<["-"], "private_bundle">; -def pthreads : Flag<["-"], "pthreads">; -def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>, - HelpText<"Support POSIX threads in generated code">; -def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>; -def p : Flag<["-"], "p">; -def pie : Flag<["-"], "pie">; -def read__only__relocs : Separate<["-"], "read_only_relocs">; -def remap : Flag<["-"], "remap">; -def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[DriverOption,CC1Option]>, - HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>; -def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[DriverOption]>, - HelpText<"Rewrite Legacy Objective-C source to C++">; -def rdynamic : Flag<["-"], "rdynamic">; -def resource_dir : Separate<["-"], "resource-dir">, - Flags<[DriverOption, CC1Option, HelpHidden]>, - HelpText<"The directory which holds the compiler resource files">; -def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[DriverOption]>, - Alias<resource_dir>; -def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>; -def rtlib_EQ : Joined<["-", "--"], "rtlib=">; -def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>; -def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[DriverOption]>, - HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, - Alias<save_temps_EQ>, AliasArgs<["cwd"]>, - HelpText<"Save intermediate compilation results">; -def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt, - HelpText<"Write assembly to file for input to assemble jobs">; -def sectalign : MultiArg<["-"], "sectalign", 3>; -def sectcreate : MultiArg<["-"], "sectcreate", 3>; -def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>; -def sectorder : MultiArg<["-"], "sectorder", 3>; -def seg1addr : JoinedOrSeparate<["-"], "seg1addr">; -def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">; -def seg__addr__table : Separate<["-"], "seg_addr_table">; -def segaddr : MultiArg<["-"], "segaddr", 2>; -def segcreate : MultiArg<["-"], "segcreate", 3>; -def seglinkedit : Flag<["-"], "seglinkedit">; -def segprot : MultiArg<["-"], "segprot", 3>; -def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">; -def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">; -def segs__read__ : Joined<["-"], "segs_read_">; -def shared_libgcc : Flag<["-"], "shared-libgcc">; -def shared : Flag<["-", "--"], "shared">; -def single__module : Flag<["-"], "single_module">; -def specs_EQ : Joined<["-", "--"], "specs=">; -def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>; -def static_libgcc : Flag<["-"], "static-libgcc">; -def static_libstdcxx : Flag<["-"], "static-libstdc++">; -def static : Flag<["-", "--"], "static">, Flags<[NoArgumentUnused]>; -def std_default_EQ : Joined<["-"], "std-default=">; -def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option]>, - Group<CompileOnly_Group>, HelpText<"Language standard to compile for">; -def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>, - HelpText<"C++ standard library to use">; -def sub__library : JoinedOrSeparate<["-"], "sub_library">; -def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">; -def system_header_prefix : Joined<["--"], "system-header-prefix=">, - Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, - HelpText<"Treat all #include paths starting with <prefix> as including a " - "system header.">; -def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>; -def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">, - Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">, - HelpText<"Treat all #include paths starting with <prefix> as not including a " - "system header.">; -def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>; -def s : Flag<["-"], "s">; -def target : Joined<["--"], "target=">, Flags<[DriverOption, CoreOption]>, - HelpText<"Generate code for the given target">; -def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[DriverOption]>, - HelpText<"Use the gcc toolchain at the given directory">; -def time : Flag<["-"], "time">, - HelpText<"Time individual commands">; -def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>, - HelpText<"Enable some traditional CPP emulation">; -def traditional : Flag<["-", "--"], "traditional">; -def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>, - HelpText<"Process trigraph sequences">; -def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">; -def twolevel__namespace : Flag<["-"], "twolevel_namespace">; -def t : Flag<["-"], "t">; -def umbrella : Separate<["-"], "umbrella">; -def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>; -def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>, - HelpText<"undef all system defines">; -def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">; -def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>; -def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>, - HelpText<"Show commands to run and use verbose output">; -def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[DriverOption]>, - HelpText<"Verify the binary representation of debug output">; -def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>; -def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>; -def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>; -def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">; -def whatsloaded : Flag<["-"], "whatsloaded">; -def whyload : Flag<["-"], "whyload">; -def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>; -def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>, - HelpText<"Treat subsequent input files as having type <language>">, - MetaVarName<"<language>">; -def y : Joined<["-"], "y">; - -def fintegrated_as : Flag<["-"], "fintegrated-as">, Flags<[DriverOption]>, - Group<f_Group>, HelpText<"Enable the integrated assembler">; -def fno_integrated_as : Flag<["-"], "fno-integrated-as">, - Flags<[CC1Option, DriverOption]>, Group<f_Group>, - HelpText<"Disable the integrated assembler">; -def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[DriverOption]>; -def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>, - Flags<[CC1Option, DriverOption]>; - -def working_directory : JoinedOrSeparate<["-"], "working-directory">, Flags<[CC1Option]>, - HelpText<"Resolve file paths relative to the specified directory">; -def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>, - Alias<working_directory>; - -// Double dash options, which are usually an alias for one of the previous -// options. - -def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>; -def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>; -def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>; -def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>; -def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>; -def _analyze_auto : Flag<["--"], "analyze-auto">, Flags<[DriverOption]>; -def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[DriverOption]>; -def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[DriverOption]>; -def _analyze : Flag<["--"], "analyze">, Flags<[DriverOption, CoreOption]>, - HelpText<"Run the static analyzer">; -def _assemble : Flag<["--"], "assemble">, Alias<S>; -def _assert_EQ : Joined<["--"], "assert=">, Alias<A>; -def _assert : Separate<["--"], "assert">, Alias<A>; -def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>; -def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>; -def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>; -def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>; -def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>; -def _comments : Flag<["--"], "comments">, Alias<C>; -def _compile : Flag<["--"], "compile">, Alias<c>; -def _constant_cfstrings : Flag<["--"], "constant-cfstrings">; -def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>; -def _debug : Flag<["--"], "debug">, Alias<g_Flag>; -def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>; -def _define_macro : Separate<["--"], "define-macro">, Alias<D>; -def _dependencies : Flag<["--"], "dependencies">, Alias<M>; -def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">; -def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>; -def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>; -def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>; -def _entry : Flag<["--"], "entry">, Alias<e>; -def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>; -def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>; -def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>; -def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>; -def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>; -def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>; -def _force_link : Separate<["--"], "force-link">, Alias<u>; -def _help_hidden : Flag<["--"], "help-hidden">; -def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>; -def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>; -def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>; -def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>; -def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>; -def _include_directory : Separate<["--"], "include-directory">, Alias<I>; -def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>; -def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>; -def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>; -def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>; -def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>; -def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>; -def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>; -def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>; -def _include_EQ : Joined<["--"], "include=">, Alias<include_>; -def _language_EQ : Joined<["--"], "language=">, Alias<x>; -def _language : Separate<["--"], "language">, Alias<x>; -def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>; -def _library_directory : Separate<["--"], "library-directory">, Alias<L>; -def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>; -def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>; -def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>; -def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>; -def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>; -def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>; -def _optimize : Flag<["--"], "optimize">, Alias<O>; -def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>; -def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>; -def _output_EQ : Joined<["--"], "output=">, Alias<o>; -def _output : Separate<["--"], "output">, Alias<o>; -def _param : Separate<["--"], "param">, Group<CompileOnly_Group>; -def _param_EQ : Joined<["--"], "param=">, Alias<_param>; -def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>; -def _prefix : Separate<["--"], "prefix">, Alias<B>; -def _preprocess : Flag<["--"], "preprocess">, Alias<E>; -def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">; -def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>; -def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>; -def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>; -def _profile_blocks : Flag<["--"], "profile-blocks">, Alias<a>; -def _profile : Flag<["--"], "profile">, Alias<p>; -def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>; -def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>; -def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>; -def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[DriverOption]>, - HelpText<"Serialize compiler diagnostics to a file">; -// We give --version different semantics from -version. -def _version : Flag<["--"], "version">, Flags<[CC1Option]>; -def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>; -def _std : Separate<["--"], "std">, Alias<std_EQ>; -def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>; -def _sysroot_EQ : Joined<["--"], "sysroot=">; -def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>; -def _target_help : Flag<["--"], "target-help">; -def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>; -def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>; -def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>; -def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>; -def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>; -def _verbose : Flag<["--"], "verbose">, Alias<v>; -def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>; -def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>; -def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>; -def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>; -def _ : Joined<["--"], "">, Flags<[Unsupported]>; - -def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">, Group<m_hexagon_Features_Group>; -def mv4 : Flag<["-"], "mv4">, Group<m_hexagon_Features_Group>, - Alias<mcpu_EQ>, AliasArgs<["v4"]>; -def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>, - AliasArgs<["v5"]>; -def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>, - Alias<mcpu_EQ>, AliasArgs<["v55"]>; -def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>, - Alias<mcpu_EQ>, AliasArgs<["v60"]>; -def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_Group>, - Flags<[CC1Option]>, HelpText<"Enable Hexagon Vector eXtensions">; -def mno_hexagon_hvx : Flag<["-"], "mno-hvx">, Group<m_hexagon_Features_Group>, - Flags<[CC1Option]>, HelpText<"Disable Hexagon Vector eXtensions">; -def mhexagon_hvx_double : Flag<["-"], "mhvx-double">, Group<m_hexagon_Features_Group>, - Flags<[CC1Option]>, HelpText<"Enable Hexagon Double Vector eXtensions">; -def mno_hexagon_hvx_double : Flag<["-"], "mno-hvx-double">, Group<m_hexagon_Features_Group>, - Flags<[CC1Option]>, HelpText<"Disable Hexagon Double Vector eXtensions">; - -// These are legacy user-facing driver-level option spellings. They are always -// aliases for options that are spelled using the more common Unix / GNU flag -// style of double-dash and equals-joined flags. -def gcc_toolchain_legacy_spelling : Separate<["-"], "gcc-toolchain">, Alias<gcc_toolchain>; -def target_legacy_spelling : Separate<["-"], "target">, Alias<target>; - -// Special internal option to handle -Xlinker --no-demangle. -def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">, - Flags<[Unsupported, NoArgumentUnused]>; - -// Special internal option to allow forwarding arbitrary arguments to linker. -def Zlinker_input : Separate<["-"], "Zlinker-input">, - Flags<[Unsupported, NoArgumentUnused]>; - -// Reserved library options. -def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">, - Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; -def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">, - Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>; - -// Ignored options -// FIXME: multiclasess produce suffixes, not prefixes. This is fine for now -// since it is only used in ignored options. -multiclass BooleanFFlag<string name> { - def _f : Flag<["-"], "f"#name>; - def _fno : Flag<["-"], "fno-"#name>; -} - -defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; - -def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<clang_ignored_gcc_optimization_f_Group>; - -def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>; - -defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_gcc_optimization_f_Group>; -def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_gcc_optimization_f_Group>; -defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>; -def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>; -defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>; -def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<clang_ignored_gcc_optimization_f_Group>; -defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>; -def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>; - -// FIXME: This option should be supported and wired up to our diognostics, but -// ignore it for now to avoid breaking builds that use it. -def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>; - -defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>; -defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>; -defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>; -defm eliminate_unused_debug_types : BooleanFFlag<"eliminate-unused-debug-types">, Group<clang_ignored_f_Group>; -defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>; -defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>; -defm delete_null_pointer_checks : BooleanFFlag<"delete-null-pointer-checks">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>; -defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>; -defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>; -defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>; -defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>; -defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>; -defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>; -defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>; -defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>; -defm ident : BooleanFFlag<"ident">, Group<clang_ignored_f_Group>; -defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>; -defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>; -defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>; -defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>; -defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">, - Group<clang_ignored_gcc_optimization_f_Group>; -def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>; -defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>; -defm inline_small_functions : BooleanFFlag<"inline-small-functions">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm ipa_cp : BooleanFFlag<"ipa-cp">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>; -defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>; -defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>; -defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>; -defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>; -defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>; -defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>; -defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>; -defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>; -defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>; -defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>; -defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>; -defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>; -defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>; -defm rounding_math : BooleanFFlag<"rounding-math">, Group<clang_ignored_gcc_optimization_f_Group>; -defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>; -defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>; -defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>; -defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>; -defm single_precision_constant : BooleanFFlag<"single-precision-constant">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>; -defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>; -defm strength_reduce : - BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>; -defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_loop_im : BooleanFFlag<"tree_loop_im">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_loop_ivcanon : BooleanFFlag<"tree_loop_ivcanon">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_loop_linear : BooleanFFlag<"tree_loop_linear">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; -defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>; -defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; -defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>; -defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; -defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>; -defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>; -defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>; -defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">, - Group<clang_ignored_gcc_optimization_f_Group>; -defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>; -defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>; -defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>; -defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">, - Group<clang_ignored_gcc_optimization_f_Group>; - -// gfortran options that we recognize in the driver and pass along when -// invoking GCC to compile Fortran code. -def gfortran_Group : OptionGroup<"gfortran Group">; - -// Generic gfortran options. -def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>; -def J : JoinedOrSeparate<["-"], "J">, Flags<[RenderJoined]>, Group<gfortran_Group>; -def cpp : Flag<["-"], "cpp">, Group<gfortran_Group>; -def nocpp : Flag<["-"], "nocpp">, Group<gfortran_Group>; -def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>; - -// "f" options with values for gfortran. -def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>; -def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>; -def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>; -def fconvert_EQ : Joined<["-"], "fconvert=">, Group<gfortran_Group>; -def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<gfortran_Group>; -def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>; -def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>; -def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>; -def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>; -def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>; -def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>; -def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>; -def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>; -def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>; -def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>; -def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>; - -// "f" flags for gfortran. -defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>; -defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>; -defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>; -defm automatic : BooleanFFlag<"automatic">, Group<gfortran_Group>; -defm backslash : BooleanFFlag<"backslash">, Group<gfortran_Group>; -defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>; -defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>; -defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>; -defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>; -defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>; -defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>; -defm default_double_8 : BooleanFFlag<"default-double-8">, Group<gfortran_Group>; -defm default_integer_8 : BooleanFFlag<"default-integer-8">, Group<gfortran_Group>; -defm default_real_8 : BooleanFFlag<"default-real-8">, Group<gfortran_Group>; -defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>; -defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>; -defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>; -defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>; -defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>; -defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>; -defm fixed_form : BooleanFFlag<"fixed-form">, Group<gfortran_Group>; -defm free_form : BooleanFFlag<"free-form">, Group<gfortran_Group>; -defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>; -defm implicit_none : BooleanFFlag<"implicit-none">, Group<gfortran_Group>; -defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>; -defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>; -defm intrinsic_modules_path : BooleanFFlag<"intrinsic-modules-path">, Group<gfortran_Group>; -defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>; -defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>; -defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>; -defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>; -defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>; -defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>; -defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>; -defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>; -defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>; -defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>; -defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>; -defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>; -defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>; -defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>; -defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>; -defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>; -defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>; -defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>; -defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>; - - -include "CC1Options.td" - -include "CLCompatOptions.td" diff --git a/include/clang/Driver/Phases.h b/include/clang/Driver/Phases.h deleted file mode 100644 index cd6b5b5..0000000 --- a/include/clang/Driver/Phases.h +++ /dev/null @@ -1,37 +0,0 @@ -//===--- Phases.h - Transformations on Driver Types -------------*- 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_DRIVER_PHASES_H -#define LLVM_CLANG_DRIVER_PHASES_H - -namespace clang { -namespace driver { -namespace phases { - /// ID - Ordered values for successive stages in the - /// compilation process which interact with user options. - enum ID { - Preprocess, - Precompile, - Compile, - Backend, - Assemble, - Link - }; - - enum { - MaxNumberOfPhases = Link + 1 - }; - - const char *getPhaseName(ID Id); - -} // end namespace phases -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/SanitizerArgs.h b/include/clang/Driver/SanitizerArgs.h deleted file mode 100644 index c2611b5..0000000 --- a/include/clang/Driver/SanitizerArgs.h +++ /dev/null @@ -1,73 +0,0 @@ -//===--- SanitizerArgs.h - Arguments for sanitizer tools -------*- 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_DRIVER_SANITIZERARGS_H -#define LLVM_CLANG_DRIVER_SANITIZERARGS_H - -#include "clang/Basic/Sanitizers.h" -#include "clang/Driver/Types.h" -#include "llvm/Option/Arg.h" -#include "llvm/Option/ArgList.h" -#include <string> -#include <vector> - -namespace clang { -namespace driver { - -class ToolChain; - -class SanitizerArgs { - SanitizerSet Sanitizers; - SanitizerSet RecoverableSanitizers; - SanitizerSet TrapSanitizers; - - std::vector<std::string> BlacklistFiles; - std::vector<std::string> ExtraDeps; - int CoverageFeatures; - int MsanTrackOrigins; - bool MsanUseAfterDtor; - bool CfiCrossDso; - int AsanFieldPadding; - bool AsanSharedRuntime; - bool LinkCXXRuntimes; - bool NeedPIE; - - public: - /// Parses the sanitizer arguments from an argument list. - SanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args); - - bool needsAsanRt() const { return Sanitizers.has(SanitizerKind::Address); } - bool needsSharedAsanRt() const { return AsanSharedRuntime; } - bool needsTsanRt() const { return Sanitizers.has(SanitizerKind::Thread); } - bool needsMsanRt() const { return Sanitizers.has(SanitizerKind::Memory); } - bool needsLsanRt() const { - return Sanitizers.has(SanitizerKind::Leak) && - !Sanitizers.has(SanitizerKind::Address); - } - bool needsUbsanRt() const; - bool needsDfsanRt() const { return Sanitizers.has(SanitizerKind::DataFlow); } - bool needsSafeStackRt() const { - return Sanitizers.has(SanitizerKind::SafeStack); - } - bool needsCfiRt() const; - bool needsCfiDiagRt() const; - - bool requiresPIE() const; - bool needsUnwindTables() const; - bool linkCXXRuntimes() const { return LinkCXXRuntimes; } - void addArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs, types::ID InputType) const; - - private: - void clear(); -}; - -} // namespace driver -} // namespace clang - -#endif diff --git a/include/clang/Driver/Tool.h b/include/clang/Driver/Tool.h deleted file mode 100644 index b9eac1c..0000000 --- a/include/clang/Driver/Tool.h +++ /dev/null @@ -1,137 +0,0 @@ -//===--- Tool.h - Compilation Tools -----------------------------*- 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_DRIVER_TOOL_H -#define LLVM_CLANG_DRIVER_TOOL_H - -#include "clang/Basic/LLVM.h" -#include "llvm/Support/Program.h" - -namespace llvm { -namespace opt { - class ArgList; -} -} - -namespace clang { -namespace driver { - - class Compilation; - class InputInfo; - class Job; - class JobAction; - class ToolChain; - - typedef SmallVector<InputInfo, 4> InputInfoList; - -/// Tool - Information on a specific compilation tool. -class Tool { -public: - // Documents the level of support for response files in this tool. - // Response files are necessary if the command line gets too large, - // requiring the arguments to be transfered to a file. - enum ResponseFileSupport { - // Provides full support for response files, which means we can transfer - // all tool input arguments to a file. E.g.: clang, gcc, binutils and MSVC - // tools. - RF_Full, - // Input file names can live in a file, but flags can't. E.g.: ld64 (Mac - // OS X linker). - RF_FileList, - // Does not support response files: all arguments must be passed via - // command line. - RF_None - }; - -private: - /// The tool name (for debugging). - const char *Name; - - /// The human readable name for the tool, for use in diagnostics. - const char *ShortName; - - /// The tool chain this tool is a part of. - const ToolChain &TheToolChain; - - /// The level of support for response files seen in this tool - const ResponseFileSupport ResponseSupport; - - /// The encoding to use when writing response files for this tool on Windows - const llvm::sys::WindowsEncodingMethod ResponseEncoding; - - /// The flag used to pass a response file via command line to this tool - const char *const ResponseFlag; - -public: - Tool(const char *Name, const char *ShortName, const ToolChain &TC, - ResponseFileSupport ResponseSupport = RF_None, - llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8, - const char *ResponseFlag = "@"); - -public: - virtual ~Tool(); - - const char *getName() const { return Name; } - - const char *getShortName() const { return ShortName; } - - const ToolChain &getToolChain() const { return TheToolChain; } - - virtual bool hasIntegratedAssembler() const { return false; } - virtual bool canEmitIR() const { return false; } - virtual bool hasIntegratedCPP() const = 0; - virtual bool isLinkJob() const { return false; } - virtual bool isDsymutilJob() const { return false; } - /// \brief Returns the level of support for response files of this tool, - /// whether it accepts arguments to be passed via a file on disk. - ResponseFileSupport getResponseFilesSupport() const { - return ResponseSupport; - } - /// \brief Returns which encoding the response file should use. This is only - /// relevant on Windows platforms where there are different encodings being - /// accepted for different tools. On UNIX, UTF8 is universal. - /// - /// Windows use cases: - GCC and Binutils on mingw only accept ANSI response - /// files encoded with the system current code page. - /// - MSVC's CL.exe and LINK.exe accept UTF16 on Windows. - /// - Clang accepts both UTF8 and UTF16. - /// - /// FIXME: When GNU tools learn how to parse UTF16 on Windows, we should - /// always use UTF16 for Windows, which is the Windows official encoding for - /// international characters. - llvm::sys::WindowsEncodingMethod getResponseFileEncoding() const { - return ResponseEncoding; - } - /// \brief Returns which prefix to use when passing the name of a response - /// file as a parameter to this tool. - const char *getResponseFileFlag() const { return ResponseFlag; } - - /// \brief Does this tool have "good" standardized diagnostics, or should the - /// driver add an additional "command failed" diagnostic on failures. - virtual bool hasGoodDiagnostics() const { return false; } - - /// ConstructJob - Construct jobs to perform the action \p JA, - /// writing to \p Output and with \p Inputs, and add the jobs to - /// \p C. - /// - /// \param TCArgs - The argument list for this toolchain, with any - /// tool chain specific translations applied. - /// \param LinkingOutput - If this output will eventually feed the - /// linker, then this is the final output name of the linked image. - virtual void ConstructJob(Compilation &C, const JobAction &JA, - const InputInfo &Output, - const InputInfoList &Inputs, - const llvm::opt::ArgList &TCArgs, - const char *LinkingOutput) const = 0; -}; - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h deleted file mode 100644 index ed73107..0000000 --- a/include/clang/Driver/ToolChain.h +++ /dev/null @@ -1,418 +0,0 @@ -//===--- ToolChain.h - Collections of tools for one platform ----*- 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_DRIVER_TOOLCHAIN_H -#define LLVM_CLANG_DRIVER_TOOLCHAIN_H - -#include "clang/Basic/Sanitizers.h" -#include "clang/Driver/Action.h" -#include "clang/Driver/Multilib.h" -#include "clang/Driver/Types.h" -#include "clang/Driver/Util.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/Triple.h" -#include "llvm/Support/Path.h" -#include "llvm/Target/TargetOptions.h" -#include <memory> -#include <string> - -namespace llvm { -namespace opt { - class ArgList; - class DerivedArgList; - class InputArgList; -} -} - -namespace clang { -class ObjCRuntime; -namespace vfs { -class FileSystem; -} - -namespace driver { - class Compilation; - class Driver; - class JobAction; - class SanitizerArgs; - class Tool; - -/// ToolChain - Access to tools for a single platform. -class ToolChain { -public: - typedef SmallVector<std::string, 16> path_list; - - enum CXXStdlibType { - CST_Libcxx, - CST_Libstdcxx - }; - - enum RuntimeLibType { - RLT_CompilerRT, - RLT_Libgcc - }; - - enum RTTIMode { - RM_EnabledExplicitly, - RM_EnabledImplicitly, - RM_DisabledExplicitly, - RM_DisabledImplicitly - }; - -private: - const Driver &D; - const llvm::Triple Triple; - const llvm::opt::ArgList &Args; - // We need to initialize CachedRTTIArg before CachedRTTIMode - const llvm::opt::Arg *const CachedRTTIArg; - const RTTIMode CachedRTTIMode; - - /// The list of toolchain specific path prefixes to search for - /// files. - path_list FilePaths; - - /// The list of toolchain specific path prefixes to search for - /// programs. - path_list ProgramPaths; - - mutable std::unique_ptr<Tool> Clang; - mutable std::unique_ptr<Tool> Assemble; - mutable std::unique_ptr<Tool> Link; - Tool *getClang() const; - Tool *getAssemble() const; - Tool *getLink() const; - Tool *getClangAs() const; - - mutable std::unique_ptr<SanitizerArgs> SanitizerArguments; - -protected: - MultilibSet Multilibs; - const char *DefaultLinker = "ld"; - - ToolChain(const Driver &D, const llvm::Triple &T, - const llvm::opt::ArgList &Args); - - virtual Tool *buildAssembler() const; - virtual Tool *buildLinker() const; - virtual Tool *getTool(Action::ActionClass AC) const; - - /// \name Utilities for implementing subclasses. - ///@{ - static void addSystemInclude(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, - const Twine &Path); - static void addExternCSystemInclude(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, - const Twine &Path); - static void - addExternCSystemIncludeIfExists(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, - const Twine &Path); - static void addSystemIncludes(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, - ArrayRef<StringRef> Paths); - ///@} - -public: - virtual ~ToolChain(); - - // Accessors - - const Driver &getDriver() const { return D; } - vfs::FileSystem &getVFS() const; - const llvm::Triple &getTriple() const { return Triple; } - - llvm::Triple::ArchType getArch() const { return Triple.getArch(); } - StringRef getArchName() const { return Triple.getArchName(); } - StringRef getPlatform() const { return Triple.getVendorName(); } - StringRef getOS() const { return Triple.getOSName(); } - - /// \brief Provide the default architecture name (as expected by -arch) for - /// this toolchain. Note t - StringRef getDefaultUniversalArchName() const; - - std::string getTripleString() const { - return Triple.getTriple(); - } - - path_list &getFilePaths() { return FilePaths; } - const path_list &getFilePaths() const { return FilePaths; } - - path_list &getProgramPaths() { return ProgramPaths; } - const path_list &getProgramPaths() const { return ProgramPaths; } - - const MultilibSet &getMultilibs() const { return Multilibs; } - - const SanitizerArgs& getSanitizerArgs() const; - - // Returns the Arg * that explicitly turned on/off rtti, or nullptr. - const llvm::opt::Arg *getRTTIArg() const { return CachedRTTIArg; } - - // Returns the RTTIMode for the toolchain with the current arguments. - RTTIMode getRTTIMode() const { return CachedRTTIMode; } - - /// \brief Return any implicit target and/or mode flag for an invocation of - /// the compiler driver as `ProgName`. - /// - /// For example, when called with i686-linux-android-g++, the first element - /// of the return value will be set to `"i686-linux-android"` and the second - /// will be set to "--driver-mode=g++"`. - /// - /// \pre `llvm::InitializeAllTargets()` has been called. - /// \param ProgName The name the Clang driver was invoked with (from, - /// e.g., argv[0]) - /// \return A pair of (`target`, `mode-flag`), where one or both may be empty. - static std::pair<std::string, std::string> - getTargetAndModeFromProgramName(StringRef ProgName); - - // Tool access. - - /// TranslateArgs - Create a new derived argument list for any argument - /// translations this ToolChain may wish to perform, or 0 if no tool chain - /// specific translations are needed. - /// - /// \param BoundArch - The bound architecture name, or 0. - virtual llvm::opt::DerivedArgList * - TranslateArgs(const llvm::opt::DerivedArgList &Args, - const char *BoundArch) const { - return nullptr; - } - - /// Choose a tool to use to handle the action \p JA. - /// - /// This can be overridden when a particular ToolChain needs to use - /// a compiler other than Clang. - virtual Tool *SelectTool(const JobAction &JA) const; - - // Helper methods - - std::string GetFilePath(const char *Name) const; - std::string GetProgramPath(const char *Name) const; - - /// Returns the linker path, respecting the -fuse-ld= argument to determine - /// the linker suffix or name. - std::string GetLinkerPath() const; - - /// \brief Dispatch to the specific toolchain for verbose printing. - /// - /// This is used when handling the verbose option to print detailed, - /// toolchain-specific information useful for understanding the behavior of - /// the driver on a specific platform. - virtual void printVerboseInfo(raw_ostream &OS) const {} - - // Platform defaults information - - /// \brief Returns true if the toolchain is targeting a non-native - /// architecture. - virtual bool isCrossCompiling() const; - - /// HasNativeLTOLinker - Check whether the linker and related tools have - /// native LLVM support. - virtual bool HasNativeLLVMSupport() const; - - /// LookupTypeForExtension - Return the default language type to use for the - /// given extension. - virtual types::ID LookupTypeForExtension(const char *Ext) const; - - /// IsBlocksDefault - Does this tool chain enable -fblocks by default. - virtual bool IsBlocksDefault() const { return false; } - - /// IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as - /// by default. - virtual bool IsIntegratedAssemblerDefault() const { return false; } - - /// \brief Check if the toolchain should use the integrated assembler. - bool useIntegratedAs() const; - - /// IsMathErrnoDefault - Does this tool chain use -fmath-errno by default. - virtual bool IsMathErrnoDefault() const { return true; } - - /// IsEncodeExtendedBlockSignatureDefault - Does this tool chain enable - /// -fencode-extended-block-signature by default. - virtual bool IsEncodeExtendedBlockSignatureDefault() const { return false; } - - /// IsObjCNonFragileABIDefault - Does this tool chain set - /// -fobjc-nonfragile-abi by default. - virtual bool IsObjCNonFragileABIDefault() const { return false; } - - /// UseObjCMixedDispatchDefault - When using non-legacy dispatch, should the - /// mixed dispatch method be used? - virtual bool UseObjCMixedDispatch() const { return false; } - - /// GetDefaultStackProtectorLevel - Get the default stack protector level for - /// this tool chain (0=off, 1=on, 2=strong, 3=all). - virtual unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const { - return 0; - } - - /// GetDefaultRuntimeLibType - Get the default runtime library variant to use. - virtual RuntimeLibType GetDefaultRuntimeLibType() const { - return ToolChain::RLT_Libgcc; - } - - virtual std::string getCompilerRT(const llvm::opt::ArgList &Args, - StringRef Component, - bool Shared = false) const; - - const char *getCompilerRTArgString(const llvm::opt::ArgList &Args, - StringRef Component, - bool Shared = false) const; - /// needsProfileRT - returns true if instrumentation profile is on. - static bool needsProfileRT(const llvm::opt::ArgList &Args); - - /// IsUnwindTablesDefault - Does this tool chain use -funwind-tables - /// by default. - virtual bool IsUnwindTablesDefault() const; - - /// \brief Test whether this toolchain defaults to PIC. - virtual bool isPICDefault() const = 0; - - /// \brief Test whether this toolchain defaults to PIE. - virtual bool isPIEDefault() const = 0; - - /// \brief Tests whether this toolchain forces its default for PIC, PIE or - /// non-PIC. If this returns true, any PIC related flags should be ignored - /// and instead the results of \c isPICDefault() and \c isPIEDefault() are - /// used exclusively. - virtual bool isPICDefaultForced() const = 0; - - /// SupportsProfiling - Does this tool chain support -pg. - virtual bool SupportsProfiling() const { return true; } - - /// Does this tool chain support Objective-C garbage collection. - virtual bool SupportsObjCGC() const { return true; } - - /// Complain if this tool chain doesn't support Objective-C ARC. - virtual void CheckObjCARC() const {} - - /// UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf - /// compile unit information. - virtual bool UseDwarfDebugFlags() const { return false; } - - // Return the DWARF version to emit, in the absence of arguments - // to the contrary. - virtual unsigned GetDefaultDwarfVersion() const { return 4; } - - // True if the driver should assume "-fstandalone-debug" - // in the absence of an option specifying otherwise, - // provided that debugging was requested in the first place. - // i.e. a value of 'true' does not imply that debugging is wanted. - virtual bool GetDefaultStandaloneDebug() const { return false; } - - // Return the default debugger "tuning." - virtual llvm::DebuggerKind getDefaultDebuggerTuning() const { - return llvm::DebuggerKind::GDB; - } - - /// UseSjLjExceptions - Does this tool chain use SjLj exceptions. - virtual bool UseSjLjExceptions(const llvm::opt::ArgList &Args) const { - return false; - } - - /// getThreadModel() - Which thread model does this target use? - virtual std::string getThreadModel() const { return "posix"; } - - /// isThreadModelSupported() - Does this target support a thread model? - virtual bool isThreadModelSupported(const StringRef Model) const; - - /// ComputeLLVMTriple - Return the LLVM target triple to use, after taking - /// command line arguments into account. - virtual std::string - ComputeLLVMTriple(const llvm::opt::ArgList &Args, - types::ID InputType = types::TY_INVALID) const; - - /// ComputeEffectiveClangTriple - Return the Clang triple to use for this - /// target, which may take into account the command line arguments. For - /// example, on Darwin the -mmacosx-version-min= command line argument (which - /// sets the deployment target) determines the version in the triple passed to - /// Clang. - virtual std::string ComputeEffectiveClangTriple( - const llvm::opt::ArgList &Args, - types::ID InputType = types::TY_INVALID) const; - - /// getDefaultObjCRuntime - Return the default Objective-C runtime - /// for this platform. - /// - /// FIXME: this really belongs on some sort of DeploymentTarget abstraction - virtual ObjCRuntime getDefaultObjCRuntime(bool isNonFragile) const; - - /// hasBlocksRuntime - Given that the user is compiling with - /// -fblocks, does this tool chain guarantee the existence of a - /// blocks runtime? - /// - /// FIXME: this really belongs on some sort of DeploymentTarget abstraction - virtual bool hasBlocksRuntime() const { return true; } - - /// \brief Add the clang cc1 arguments for system include paths. - /// - /// This routine is responsible for adding the necessary cc1 arguments to - /// include headers from standard system header directories. - virtual void - AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const; - - /// \brief Add options that need to be passed to cc1 for this target. - virtual void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const; - - /// \brief Add warning options that need to be passed to cc1 for this target. - virtual void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const; - - // GetRuntimeLibType - Determine the runtime library type to use with the - // given compilation arguments. - virtual RuntimeLibType - GetRuntimeLibType(const llvm::opt::ArgList &Args) const; - - // GetCXXStdlibType - Determine the C++ standard library type to use with the - // given compilation arguments. - virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const; - - /// AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set - /// the include paths to use for the given C++ standard library type. - virtual void - AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const; - - /// AddCXXStdlibLibArgs - Add the system specific linker arguments to use - /// for the given C++ standard library type. - virtual void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const; - - /// AddFilePathLibArgs - Add each thing in getFilePaths() as a "-L" option. - void AddFilePathLibArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const; - - /// AddCCKextLibArgs - Add the system specific linker arguments to use - /// for kernel extensions (Darwin-specific). - virtual void AddCCKextLibArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const; - - /// AddFastMathRuntimeIfAvailable - If a runtime library exists that sets - /// global flags for unsafe floating point math, add it and return true. - /// - /// This checks for presence of the -Ofast, -ffast-math or -funsafe-math flags. - virtual bool AddFastMathRuntimeIfAvailable( - const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const; - /// addProfileRTLibs - When -fprofile-instr-profile is specified, try to pass - /// a suitable profile runtime library to the linker. - virtual void addProfileRTLibs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const; - - /// \brief Add arguments to use system-specific CUDA includes. - virtual void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const; - - /// \brief Return sanitizers which are available in this toolchain. - virtual SanitizerMask getSupportedSanitizers() const; -}; - -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/Types.def b/include/clang/Driver/Types.def deleted file mode 100644 index d1b6915..0000000 --- a/include/clang/Driver/Types.def +++ /dev/null @@ -1,96 +0,0 @@ -//===--- Types.def - Driver Type info ---------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the driver type information. Users of this file -// must define the TYPE macro to make use of this information. -// -//===----------------------------------------------------------------------===// - -#ifndef TYPE -#error "Define TYPE prior to including this file!" -#endif - -// TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) - -// The first value is the type name as a string; for types which can -// be user specified this should be the equivalent -x option. - -// The second value is the type id, which will result in a -// clang::driver::types::TY_XX enum constant. - -// The third value is that id of the type for preprocessed inputs of -// this type, or INVALID if this type is not preprocessed. - -// The fourth value is the suffix to use when creating temporary files -// of this type, or null if unspecified. - -// The fifth value is a string containing option flags. Valid values: -// a - The type should only be assembled. -// p - The type should only be precompiled. -// u - The type can be user specified (with -x). -// A - The type's temporary suffix should be appended when generating -// outputs of this type. - - -// C family source language (with and without preprocessing). -TYPE("cpp-output", PP_C, INVALID, "i", "u") -TYPE("c", C, PP_C, "c", "u") -TYPE("cl", CL, PP_C, "cl", "u") -TYPE("cuda-cpp-output", PP_CUDA, INVALID, "cui", "u") -TYPE("cuda", CUDA, PP_CUDA, "cu", "u") -TYPE("cuda", CUDA_DEVICE, PP_CUDA, "cu", "") -TYPE("objective-c-cpp-output", PP_ObjC, INVALID, "mi", "u") -TYPE("objc-cpp-output", PP_ObjC_Alias, INVALID, "mi", "u") -TYPE("objective-c", ObjC, PP_ObjC, "m", "u") -TYPE("c++-cpp-output", PP_CXX, INVALID, "ii", "u") -TYPE("c++", CXX, PP_CXX, "cpp", "u") -TYPE("objective-c++-cpp-output", PP_ObjCXX, INVALID, "mii", "u") -TYPE("objc++-cpp-output", PP_ObjCXX_Alias, INVALID, "mii", "u") -TYPE("objective-c++", ObjCXX, PP_ObjCXX, "mm", "u") - -// C family input files to precompile. -TYPE("c-header-cpp-output", PP_CHeader, INVALID, "i", "p") -TYPE("c-header", CHeader, PP_CHeader, "h", "pu") -TYPE("cl-header", CLHeader, PP_CHeader, "h", "pu") -TYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID, "mi", "p") -TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, "h", "pu") -TYPE("c++-header-cpp-output", PP_CXXHeader, INVALID, "ii", "p") -TYPE("c++-header", CXXHeader, PP_CXXHeader, "hh", "pu") -TYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p") -TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, "h", "pu") - -// Other languages. -TYPE("ada", Ada, INVALID, nullptr, "u") -TYPE("assembler", PP_Asm, INVALID, "s", "au") -TYPE("assembler-with-cpp", Asm, PP_Asm, "S", "au") -TYPE("f95", PP_Fortran, INVALID, nullptr, "u") -TYPE("f95-cpp-input", Fortran, PP_Fortran, nullptr, "u") -TYPE("java", Java, INVALID, nullptr, "u") - -// LLVM IR/LTO types. We define separate types for IR and LTO because LTO -// outputs should use the standard suffixes. -TYPE("ir", LLVM_IR, INVALID, "ll", "u") -TYPE("ir", LLVM_BC, INVALID, "bc", "u") -TYPE("lto-ir", LTO_IR, INVALID, "s", "") -TYPE("lto-bc", LTO_BC, INVALID, "o", "") - -// Misc. -TYPE("ast", AST, INVALID, "ast", "u") -TYPE("pcm", ModuleFile, INVALID, "pcm", "u") -TYPE("plist", Plist, INVALID, "plist", "") -TYPE("rewritten-objc", RewrittenObjC,INVALID, "cpp", "") -TYPE("rewritten-legacy-objc", RewrittenLegacyObjC,INVALID, "cpp", "") -TYPE("remap", Remap, INVALID, "remap", "") -TYPE("precompiled-header", PCH, INVALID, "gch", "A") -TYPE("object", Object, INVALID, "o", "") -TYPE("treelang", Treelang, INVALID, nullptr, "u") -TYPE("image", Image, INVALID, "out", "") -TYPE("dSYM", dSYM, INVALID, "dSYM", "A") -TYPE("dependencies", Dependencies, INVALID, "d", "") -TYPE("none", Nothing, INVALID, nullptr, "u") diff --git a/include/clang/Driver/Types.h b/include/clang/Driver/Types.h deleted file mode 100644 index 22122c7..0000000 --- a/include/clang/Driver/Types.h +++ /dev/null @@ -1,97 +0,0 @@ -//===--- Types.h - Input & Temporary Driver Types ---------------*- 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_DRIVER_TYPES_H -#define LLVM_CLANG_DRIVER_TYPES_H - -#include "clang/Driver/Phases.h" -#include "llvm/ADT/SmallVector.h" - -namespace clang { -namespace driver { -namespace types { - enum ID { - TY_INVALID, -#define TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) TY_##ID, -#include "clang/Driver/Types.def" -#undef TYPE - TY_LAST - }; - - /// getTypeName - Return the name of the type for \p Id. - const char *getTypeName(ID Id); - - /// getPreprocessedType - Get the ID of the type for this input when - /// it has been preprocessed, or INVALID if this input is not - /// preprocessed. - ID getPreprocessedType(ID Id); - - /// getTypeTempSuffix - Return the suffix to use when creating a - /// temp file of this type, or null if unspecified. - const char *getTypeTempSuffix(ID Id, bool CLMode = false); - - /// onlyAssembleType - Should this type only be assembled. - bool onlyAssembleType(ID Id); - - /// onlyPrecompileType - Should this type only be precompiled. - bool onlyPrecompileType(ID Id); - - /// canTypeBeUserSpecified - Can this type be specified on the - /// command line (by the type name); this is used when forwarding - /// commands to gcc. - bool canTypeBeUserSpecified(ID Id); - - /// appendSuffixForType - When generating outputs of this type, - /// should the suffix be appended (instead of replacing the existing - /// suffix). - bool appendSuffixForType(ID Id); - - /// canLipoType - Is this type acceptable as the output of a - /// universal build (currently, just the Nothing, Image, and Object - /// types). - bool canLipoType(ID Id); - - /// isAcceptedByClang - Can clang handle this input type. - bool isAcceptedByClang(ID Id); - - /// isCXX - Is this a "C++" input (C++ and Obj-C++ sources and headers). - bool isCXX(ID Id); - - /// Is this LLVM IR. - bool isLLVMIR(ID Id); - - /// isCuda - Is this a CUDA input. - bool isCuda(ID Id); - - /// isObjC - Is this an "ObjC" input (Obj-C and Obj-C++ sources and headers). - bool isObjC(ID Id); - - /// lookupTypeForExtension - Lookup the type to use for the file - /// extension \p Ext. - ID lookupTypeForExtension(const char *Ext); - - /// lookupTypeForTypSpecifier - Lookup the type to use for a user - /// specified type name. - ID lookupTypeForTypeSpecifier(const char *Name); - - /// getCompilationPhases - Get the list of compilation phases ('Phases') to be - /// done for type 'Id'. - void getCompilationPhases( - ID Id, - llvm::SmallVectorImpl<phases::ID> &Phases); - - /// lookupCXXTypeForCType - Lookup CXX input type that corresponds to given - /// C type (used for clang++ emulation of g++ behaviour) - ID lookupCXXTypeForCType(ID Id); - -} // end namespace types -} // end namespace driver -} // end namespace clang - -#endif diff --git a/include/clang/Driver/Util.h b/include/clang/Driver/Util.h deleted file mode 100644 index 07495a1..0000000 --- a/include/clang/Driver/Util.h +++ /dev/null @@ -1,32 +0,0 @@ -//===--- Util.h - Common Driver Utilities -----------------------*- 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_DRIVER_UTIL_H -#define LLVM_CLANG_DRIVER_UTIL_H - -#include "clang/Basic/LLVM.h" -#include "llvm/ADT/DenseMap.h" - -namespace clang { -class DiagnosticsEngine; - -namespace driver { - class Action; - class JobAction; - - /// ArgStringMap - Type used to map a JobAction to its result file. - typedef llvm::DenseMap<const JobAction*, const char*> ArgStringMap; - - /// ActionList - Type used for lists of actions. - typedef SmallVector<Action*, 3> ActionList; - -} // end namespace driver -} // end namespace clang - -#endif |