Coverage Report

Created: 2021-01-23 06:44

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- CompilerInvocation.cpp ---------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "clang/Frontend/CompilerInvocation.h"
10
#include "TestModuleFileExtension.h"
11
#include "clang/Basic/Builtins.h"
12
#include "clang/Basic/CharInfo.h"
13
#include "clang/Basic/CodeGenOptions.h"
14
#include "clang/Basic/CommentOptions.h"
15
#include "clang/Basic/DebugInfoOptions.h"
16
#include "clang/Basic/Diagnostic.h"
17
#include "clang/Basic/DiagnosticDriver.h"
18
#include "clang/Basic/DiagnosticOptions.h"
19
#include "clang/Basic/FileSystemOptions.h"
20
#include "clang/Basic/LLVM.h"
21
#include "clang/Basic/LangOptions.h"
22
#include "clang/Basic/LangStandard.h"
23
#include "clang/Basic/ObjCRuntime.h"
24
#include "clang/Basic/Sanitizers.h"
25
#include "clang/Basic/SourceLocation.h"
26
#include "clang/Basic/TargetOptions.h"
27
#include "clang/Basic/Version.h"
28
#include "clang/Basic/Visibility.h"
29
#include "clang/Basic/XRayInstr.h"
30
#include "clang/Config/config.h"
31
#include "clang/Driver/Driver.h"
32
#include "clang/Driver/DriverDiagnostic.h"
33
#include "clang/Driver/Options.h"
34
#include "clang/Frontend/CommandLineSourceLoc.h"
35
#include "clang/Frontend/DependencyOutputOptions.h"
36
#include "clang/Frontend/FrontendDiagnostic.h"
37
#include "clang/Frontend/FrontendOptions.h"
38
#include "clang/Frontend/FrontendPluginRegistry.h"
39
#include "clang/Frontend/MigratorOptions.h"
40
#include "clang/Frontend/PreprocessorOutputOptions.h"
41
#include "clang/Frontend/Utils.h"
42
#include "clang/Lex/HeaderSearchOptions.h"
43
#include "clang/Lex/PreprocessorOptions.h"
44
#include "clang/Sema/CodeCompleteOptions.h"
45
#include "clang/Serialization/ASTBitCodes.h"
46
#include "clang/Serialization/ModuleFileExtension.h"
47
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
48
#include "llvm/ADT/APInt.h"
49
#include "llvm/ADT/ArrayRef.h"
50
#include "llvm/ADT/CachedHashString.h"
51
#include "llvm/ADT/FloatingPointMode.h"
52
#include "llvm/ADT/Hashing.h"
53
#include "llvm/ADT/None.h"
54
#include "llvm/ADT/Optional.h"
55
#include "llvm/ADT/SmallString.h"
56
#include "llvm/ADT/SmallVector.h"
57
#include "llvm/ADT/StringRef.h"
58
#include "llvm/ADT/StringSwitch.h"
59
#include "llvm/ADT/Triple.h"
60
#include "llvm/ADT/Twine.h"
61
#include "llvm/Config/llvm-config.h"
62
#include "llvm/IR/DebugInfoMetadata.h"
63
#include "llvm/Linker/Linker.h"
64
#include "llvm/MC/MCTargetOptions.h"
65
#include "llvm/Option/Arg.h"
66
#include "llvm/Option/ArgList.h"
67
#include "llvm/Option/OptSpecifier.h"
68
#include "llvm/Option/OptTable.h"
69
#include "llvm/Option/Option.h"
70
#include "llvm/ProfileData/InstrProfReader.h"
71
#include "llvm/Remarks/HotnessThresholdParser.h"
72
#include "llvm/Support/CodeGen.h"
73
#include "llvm/Support/Compiler.h"
74
#include "llvm/Support/Error.h"
75
#include "llvm/Support/ErrorHandling.h"
76
#include "llvm/Support/ErrorOr.h"
77
#include "llvm/Support/FileSystem.h"
78
#include "llvm/Support/Host.h"
79
#include "llvm/Support/MathExtras.h"
80
#include "llvm/Support/MemoryBuffer.h"
81
#include "llvm/Support/Path.h"
82
#include "llvm/Support/Process.h"
83
#include "llvm/Support/Regex.h"
84
#include "llvm/Support/VersionTuple.h"
85
#include "llvm/Support/VirtualFileSystem.h"
86
#include "llvm/Support/raw_ostream.h"
87
#include "llvm/Target/TargetOptions.h"
88
#include <algorithm>
89
#include <atomic>
90
#include <cassert>
91
#include <cstddef>
92
#include <cstring>
93
#include <memory>
94
#include <string>
95
#include <tuple>
96
#include <type_traits>
97
#include <utility>
98
#include <vector>
99
100
using namespace clang;
101
using namespace driver;
102
using namespace options;
103
using namespace llvm::opt;
104
105
//===----------------------------------------------------------------------===//
106
// Initialization.
107
//===----------------------------------------------------------------------===//
108
109
CompilerInvocationBase::CompilerInvocationBase()
110
    : LangOpts(new LangOptions()), TargetOpts(new TargetOptions()),
111
      DiagnosticOpts(new DiagnosticOptions()),
112
      HeaderSearchOpts(new HeaderSearchOptions()),
113
109k
      PreprocessorOpts(new PreprocessorOptions()) {}
114
115
CompilerInvocationBase::CompilerInvocationBase(const CompilerInvocationBase &X)
116
    : LangOpts(new LangOptions(*X.getLangOpts())),
117
      TargetOpts(new TargetOptions(X.getTargetOpts())),
118
      DiagnosticOpts(new DiagnosticOptions(X.getDiagnosticOpts())),
119
      HeaderSearchOpts(new HeaderSearchOptions(X.getHeaderSearchOpts())),
120
10.8k
      PreprocessorOpts(new PreprocessorOptions(X.getPreprocessorOpts())) {}
121
122
114k
CompilerInvocationBase::~CompilerInvocationBase() = default;
123
124
//===----------------------------------------------------------------------===//
125
// Normalizers
126
//===----------------------------------------------------------------------===//
127
128
#define SIMPLE_ENUM_VALUE_TABLE
129
#include "clang/Driver/Options.inc"
130
#undef SIMPLE_ENUM_VALUE_TABLE
131
132
static llvm::Optional<bool>
133
normalizeSimpleFlag(OptSpecifier Opt, unsigned TableIndex, const ArgList &Args,
134
14.2M
                    DiagnosticsEngine &Diags, bool &Success) {
135
14.2M
  if (Args.hasArg(Opt))
136
139k
    return true;
137
14.1M
  return None;
138
14.1M
}
139
140
static Optional<bool> normalizeSimpleNegativeFlag(OptSpecifier Opt, unsigned,
141
                                                  const ArgList &Args,
142
                                                  DiagnosticsEngine &,
143
1.67M
                                                  bool &Success) {
144
1.67M
  if (Args.hasArg(Opt))
145
32.5k
    return false;
146
1.64M
  return None;
147
1.64M
}
148
149
/// The tblgen-erated code passes in a fifth parameter of an arbitrary type, but
150
/// denormalizeSimpleFlags never looks at it. Avoid bloating compile-time with
151
/// unnecessary template instantiations and just ignore it with a variadic
152
/// argument.
153
static void denormalizeSimpleFlag(SmallVectorImpl<const char *> &Args,
154
                                  const char *Spelling,
155
                                  CompilerInvocation::StringAllocator,
156
8
                                  Option::OptionClass, unsigned, /*T*/...) {
157
8
  Args.push_back(Spelling);
158
8
}
159
160
0
template <typename T> static constexpr bool is_uint64_t_convertible() {
161
0
  return !std::is_same<T, uint64_t>::value &&
162
0
         llvm::is_integral_or_enum<T>::value;
163
0
}
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<unsigned long long>()
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<clang::FrontendOptions::'unnamed0'>()
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<clang::DependencyOutputFormat>()
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<clang::DisableValidationForModuleKind>()
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<llvm::RoundingMode>()
Unexecuted instantiation: CompilerInvocation.cpp:bool is_uint64_t_convertible<unsigned int>()
164
165
template <typename T,
166
          std::enable_if_t<!is_uint64_t_convertible<T>(), bool> = false>
167
1.23M
static auto makeFlagToValueNormalizer(T Value) {
168
1.23M
  return [Value](OptSpecifier Opt, unsigned, const ArgList &Args,
169
1.23M
                 DiagnosticsEngine &, bool &Success) -> Optional<T> {
170
1.23M
    if (Args.hasArg(Opt))
171
6.67k
      return Value;
172
1.22M
    return None;
173
1.22M
  };
174
1.23M
}
175
176
template <typename T,
177
          std::enable_if_t<is_uint64_t_convertible<T>(), bool> = false>
178
1.23M
static auto makeFlagToValueNormalizer(T Value) {
179
1.23M
  return makeFlagToValueNormalizer(uint64_t(Value));
180
1.23M
}
CompilerInvocation.cpp:auto makeFlagToValueNormalizer<clang::FrontendOptions::'unnamed0', false>(clang::FrontendOptions::'unnamed0')
Line
Count
Source
178
972k
static auto makeFlagToValueNormalizer(T Value) {
179
972k
  return makeFlagToValueNormalizer(uint64_t(Value));
180
972k
}
CompilerInvocation.cpp:auto makeFlagToValueNormalizer<clang::DependencyOutputFormat, false>(clang::DependencyOutputFormat)
Line
Count
Source
178
64.8k
static auto makeFlagToValueNormalizer(T Value) {
179
64.8k
  return makeFlagToValueNormalizer(uint64_t(Value));
180
64.8k
}
CompilerInvocation.cpp:auto makeFlagToValueNormalizer<clang::DisableValidationForModuleKind, false>(clang::DisableValidationForModuleKind)
Line
Count
Source
178
64.8k
static auto makeFlagToValueNormalizer(T Value) {
179
64.8k
  return makeFlagToValueNormalizer(uint64_t(Value));
180
64.8k
}
CompilerInvocation.cpp:auto makeFlagToValueNormalizer<llvm::RoundingMode, false>(llvm::RoundingMode)
Line
Count
Source
178
64.6k
static auto makeFlagToValueNormalizer(T Value) {
179
64.6k
  return makeFlagToValueNormalizer(uint64_t(Value));
180
64.6k
}
CompilerInvocation.cpp:auto makeFlagToValueNormalizer<unsigned int, false>(unsigned int)
Line
Count
Source
178
64.6k
static auto makeFlagToValueNormalizer(T Value) {
179
64.6k
  return makeFlagToValueNormalizer(uint64_t(Value));
180
64.6k
}
181
182
static auto makeBooleanOptionNormalizer(bool Value, bool OtherValue,
183
9.18M
                                        OptSpecifier OtherOpt) {
184
9.18M
  return [Value, OtherValue, OtherOpt](OptSpecifier Opt, unsigned,
185
9.18M
                                       const ArgList &Args, DiagnosticsEngine &,
186
9.18M
                                       bool &Success) -> Optional<bool> {
187
9.18M
    if (const Arg *A = Args.getLastArg(Opt, OtherOpt)) {
188
144k
      return A->getOption().matches(Opt) ? Value : 
OtherValue14.6k
;
189
159k
    }
190
9.02M
    return None;
191
9.02M
  };
192
9.18M
}
193
194
9
static auto makeBooleanOptionDenormalizer(bool Value) {
195
9
  return [Value](SmallVectorImpl<const char *> &Args, const char *Spelling,
196
9
                 CompilerInvocation::StringAllocator, Option::OptionClass,
197
9
                 unsigned, bool KeyPath) {
198
9
    if (KeyPath == Value)
199
7
      Args.push_back(Spelling);
200
9
  };
201
9
}
202
203
static void denormalizeStringImpl(SmallVectorImpl<const char *> &Args,
204
                                  const char *Spelling,
205
                                  CompilerInvocation::StringAllocator SA,
206
                                  Option::OptionClass OptClass, unsigned,
207
47
                                  Twine Value) {
208
47
  switch (OptClass) {
209
39
  case Option::SeparateClass:
210
39
  case Option::JoinedOrSeparateClass:
211
39
    Args.push_back(Spelling);
212
39
    Args.push_back(SA(Value));
213
39
    break;
214
8
  case Option::JoinedClass:
215
8
    Args.push_back(SA(Twine(Spelling) + Value));
216
8
    break;
217
0
  default:
218
0
    llvm_unreachable("Cannot denormalize an option with option class "
219
47
                     "incompatible with string denormalization.");
220
47
  }
221
47
}
222
223
template <typename T>
224
static void
225
denormalizeString(SmallVectorImpl<const char *> &Args, const char *Spelling,
226
                  CompilerInvocation::StringAllocator SA,
227
47
                  Option::OptionClass OptClass, unsigned TableIndex, T Value) {
228
47
  denormalizeStringImpl(Args, Spelling, SA, OptClass, TableIndex, Twine(Value));
229
47
}
CompilerInvocation.cpp:void denormalizeString<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
Line
Count
Source
227
44
                  Option::OptionClass OptClass, unsigned TableIndex, T Value) {
228
44
  denormalizeStringImpl(Args, Spelling, SA, OptClass, TableIndex, Twine(Value));
229
44
}
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeString<unsigned int>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, unsigned int)
CompilerInvocation.cpp:void denormalizeString<char const*>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, char const*)
Line
Count
Source
227
3
                  Option::OptionClass OptClass, unsigned TableIndex, T Value) {
228
3
  denormalizeStringImpl(Args, Spelling, SA, OptClass, TableIndex, Twine(Value));
229
3
}
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeString<unsigned long long>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, unsigned long long)
230
231
static Optional<SimpleEnumValue>
232
111k
findValueTableByName(const SimpleEnumValueTable &Table, StringRef Name) {
233
190k
  for (int I = 0, E = Table.Size; I != E; 
++I78.9k
)
234
190k
    if (Name == Table.Table[I].Name)
235
111k
      return Table.Table[I];
236
237
18.4E
  return None;
238
111k
}
239
240
static Optional<SimpleEnumValue>
241
3
findValueTableByValue(const SimpleEnumValueTable &Table, unsigned Value) {
242
4
  for (int I = 0, E = Table.Size; I != E; 
++I1
)
243
4
    if (Value == Table.Table[I].Value)
244
3
      return Table.Table[I];
245
246
0
  return None;
247
3
}
248
249
static llvm::Optional<unsigned>
250
normalizeSimpleEnum(OptSpecifier Opt, unsigned TableIndex, const ArgList &Args,
251
1.93M
                    DiagnosticsEngine &Diags, bool &Success) {
252
1.93M
  assert(TableIndex < SimpleEnumValueTablesSize);
253
1.93M
  const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex];
254
255
1.93M
  auto *Arg = Args.getLastArg(Opt);
256
1.93M
  if (!Arg)
257
1.82M
    return None;
258
259
111k
  StringRef ArgValue = Arg->getValue();
260
111k
  if (auto MaybeEnumVal = findValueTableByName(Table, ArgValue))
261
111k
    return MaybeEnumVal->Value;
262
263
40
  Success = false;
264
40
  Diags.Report(diag::err_drv_invalid_value)
265
40
      << Arg->getAsString(Args) << ArgValue;
266
40
  return None;
267
40
}
268
269
static void denormalizeSimpleEnumImpl(SmallVectorImpl<const char *> &Args,
270
                                      const char *Spelling,
271
                                      CompilerInvocation::StringAllocator SA,
272
                                      Option::OptionClass OptClass,
273
3
                                      unsigned TableIndex, unsigned Value) {
274
3
  assert(TableIndex < SimpleEnumValueTablesSize);
275
3
  const SimpleEnumValueTable &Table = SimpleEnumValueTables[TableIndex];
276
3
  if (auto MaybeEnumVal = findValueTableByValue(Table, Value)) {
277
3
    denormalizeString(Args, Spelling, SA, OptClass, TableIndex,
278
3
                      MaybeEnumVal->Name);
279
0
  } else {
280
0
    llvm_unreachable("The simple enum value was not correctly defined in "
281
0
                     "the tablegen option description");
282
0
  }
283
3
}
284
285
template <typename T>
286
static void denormalizeSimpleEnum(SmallVectorImpl<const char *> &Args,
287
                                  const char *Spelling,
288
                                  CompilerInvocation::StringAllocator SA,
289
                                  Option::OptionClass OptClass,
290
3
                                  unsigned TableIndex, T Value) {
291
3
  return denormalizeSimpleEnumImpl(Args, Spelling, SA, OptClass, TableIndex,
292
3
                                   static_cast<unsigned>(Value));
293
3
}
CompilerInvocation.cpp:void denormalizeSimpleEnum<unsigned int>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, unsigned int)
Line
Count
Source
290
2
                                  unsigned TableIndex, T Value) {
291
2
  return denormalizeSimpleEnumImpl(Args, Spelling, SA, OptClass, TableIndex,
292
2
                                   static_cast<unsigned>(Value));
293
2
}
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeSimpleEnum<clang::LangOptions::CoreFoundationABI>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, clang::LangOptions::CoreFoundationABI)
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeSimpleEnum<llvm::EABI>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, llvm::EABI)
CompilerInvocation.cpp:void denormalizeSimpleEnum<llvm::Reloc::Model>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, llvm::Reloc::Model)
Line
Count
Source
290
1
                                  unsigned TableIndex, T Value) {
291
1
  return denormalizeSimpleEnumImpl(Args, Spelling, SA, OptClass, TableIndex,
292
1
                                   static_cast<unsigned>(Value));
293
1
}
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeSimpleEnum<clang::FrontendOptions::'unnamed'>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, clang::FrontendOptions::'unnamed')
Unexecuted instantiation: CompilerInvocation.cpp:void denormalizeSimpleEnum<clang::ObjCXXARCStandardLibraryKind>(llvm::SmallVectorImpl<char const*>&, char const*, llvm::function_ref<char const* (llvm::Twine const&)>, llvm::opt::Option::OptionClass, unsigned int, clang::ObjCXXARCStandardLibraryKind)
294
295
static Optional<std::string> normalizeString(OptSpecifier Opt, int TableIndex,
296
                                             const ArgList &Args,
297
                                             DiagnosticsEngine &Diags,
298
3.41M
                                             bool &Success) {
299
3.41M
  auto *Arg = Args.getLastArg(Opt);
300
3.41M
  if (!Arg)
301
3.17M
    return None;
302
235k
  return std::string(Arg->getValue());
303
235k
}
304
305
template <typename IntTy>
306
static Optional<IntTy>
307
normalizeStringIntegral(OptSpecifier Opt, int, const ArgList &Args,
308
3.24M
                        DiagnosticsEngine &Diags, bool &Success) {
309
3.24M
  auto *Arg = Args.getLastArg(Opt);
310
3.24M
  if (!Arg)
311
3.18M
    return None;
312
51.0k
  IntTy Res;
313
51.0k
  if (StringRef(Arg->getValue()).getAsInteger(0, Res)) {
314
1
    Success = false;
315
1
    Diags.Report(diag::err_drv_invalid_int_value)
316
1
        << Arg->getAsString(Args) << Arg->getValue();
317
1
    return None;
318
1
  }
319
51.0k
  return Res;
320
51.0k
}
CompilerInvocation.cpp:llvm::Optional<unsigned int> normalizeStringIntegral<unsigned int>(llvm::opt::OptSpecifier, int, llvm::opt::ArgList const&, clang::DiagnosticsEngine&, bool&)
Line
Count
Source
308
3.11M
                        DiagnosticsEngine &Diags, bool &Success) {
309
3.11M
  auto *Arg = Args.getLastArg(Opt);
310
3.11M
  if (!Arg)
311
3.05M
    return None;
312
51.0k
  IntTy Res;
313
51.0k
  if (StringRef(Arg->getValue()).getAsInteger(0, Res)) {
314
1
    Success = false;
315
1
    Diags.Report(diag::err_drv_invalid_int_value)
316
1
        << Arg->getAsString(Args) << Arg->getValue();
317
1
    return None;
318
1
  }
319
51.0k
  return Res;
320
51.0k
}
CompilerInvocation.cpp:llvm::Optional<int> normalizeStringIntegral<int>(llvm::opt::OptSpecifier, int, llvm::opt::ArgList const&, clang::DiagnosticsEngine&, bool&)
Line
Count
Source
308
64.8k
                        DiagnosticsEngine &Diags, bool &Success) {
309
64.8k
  auto *Arg = Args.getLastArg(Opt);
310
64.8k
  if (!Arg)
311
64.8k
    return None;
312
10
  IntTy Res;
313
10
  if (StringRef(Arg->getValue()).getAsInteger(0, Res)) {
314
0
    Success = false;
315
0
    Diags.Report(diag::err_drv_invalid_int_value)
316
0
        << Arg->getAsString(Args) << Arg->getValue();
317
0
    return None;
318
0
  }
319
10
  return Res;
320
10
}
CompilerInvocation.cpp:llvm::Optional<unsigned long long> normalizeStringIntegral<unsigned long long>(llvm::opt::OptSpecifier, int, llvm::opt::ArgList const&, clang::DiagnosticsEngine&, bool&)
Line
Count
Source
308
64.8k
                        DiagnosticsEngine &Diags, bool &Success) {
309
64.8k
  auto *Arg = Args.getLastArg(Opt);
310
64.8k
  if (!Arg)
311
64.8k
    return None;
312
12
  IntTy Res;
313
12
  if (StringRef(Arg->getValue()).getAsInteger(0, Res)) {
314
0
    Success = false;
315
0
    Diags.Report(diag::err_drv_invalid_int_value)
316
0
        << Arg->getAsString(Args) << Arg->getValue();
317
0
    return None;
318
0
  }
319
12
  return Res;
320
12
}
321
322
static Optional<std::vector<std::string>>
323
normalizeStringVector(OptSpecifier Opt, int, const ArgList &Args,
324
1.70M
                      DiagnosticsEngine &, bool &Success) {
325
1.70M
  return Args.getAllArgValues(Opt);
326
1.70M
}
327
328
static void denormalizeStringVector(SmallVectorImpl<const char *> &Args,
329
                                    const char *Spelling,
330
                                    CompilerInvocation::StringAllocator SA,
331
                                    Option::OptionClass OptClass,
332
                                    unsigned TableIndex,
333
5
                                    const std::vector<std::string> &Values) {
334
5
  switch (OptClass) {
335
3
  case Option::CommaJoinedClass: {
336
3
    std::string CommaJoinedValue;
337
3
    if (!Values.empty()) {
338
3
      CommaJoinedValue.append(Values.front());
339
4
      for (const std::string &Value : llvm::drop_begin(Values, 1)) {
340
4
        CommaJoinedValue.append(",");
341
4
        CommaJoinedValue.append(Value);
342
4
      }
343
3
    }
344
3
    denormalizeString(Args, Spelling, SA, Option::OptionClass::JoinedClass,
345
3
                      TableIndex, CommaJoinedValue);
346
3
    break;
347
0
  }
348
2
  case Option::JoinedClass:
349
2
  case Option::SeparateClass:
350
2
  case Option::JoinedOrSeparateClass:
351
2
    for (const std::string &Value : Values)
352
3
      denormalizeString(Args, Spelling, SA, OptClass, TableIndex, Value);
353
2
    break;
354
0
  default:
355
0
    llvm_unreachable("Cannot denormalize an option with option class "
356
5
                     "incompatible with string vector denormalization.");
357
5
  }
358
5
}
359
360
static Optional<std::string> normalizeTriple(OptSpecifier Opt, int TableIndex,
361
                                             const ArgList &Args,
362
                                             DiagnosticsEngine &Diags,
363
64.8k
                                             bool &Success) {
364
64.8k
  auto *Arg = Args.getLastArg(Opt);
365
64.8k
  if (!Arg)
366
12.9k
    return None;
367
51.9k
  return llvm::Triple::normalize(Arg->getValue());
368
51.9k
}
369
370
template <typename T, typename U>
371
38.8M
static T mergeForwardValue(T KeyPath, U Value) {
372
38.8M
  return static_cast<T>(Value);
373
38.8M
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, bool>(unsigned int, bool)
Line
Count
Source
371
24.4M
static T mergeForwardValue(T KeyPath, U Value) {
372
24.4M
  return static_cast<T>(Value);
373
24.4M
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, unsigned int>(unsigned int, unsigned int)
Line
Count
Source
371
722k
static T mergeForwardValue(T KeyPath, U Value) {
372
722k
  return static_cast<T>(Value);
373
722k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::EmbedBitcodeKind>(unsigned int, clang::CodeGenOptions::EmbedBitcodeKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > mergeForwardValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
Line
Count
Source
371
3.70M
static T mergeForwardValue(T KeyPath, U Value) {
372
3.70M
  return static_cast<T>(Value);
373
3.70M
}
CompilerInvocation.cpp:std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > mergeForwardValue<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >)
Line
Count
Source
371
3.40M
static T mergeForwardValue(T KeyPath, U Value) {
372
3.40M
  return static_cast<T>(Value);
373
3.40M
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, int>(unsigned int, int)
Line
Count
Source
371
2.58M
static T mergeForwardValue(T KeyPath, U Value) {
372
2.58M
  return static_cast<T>(Value);
373
2.58M
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::VectorLibrary>(unsigned int, clang::CodeGenOptions::VectorLibrary)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::TLSModel>(unsigned int, clang::CodeGenOptions::TLSModel)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > mergeForwardValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char const*>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char const*)
Line
Count
Source
371
324k
static T mergeForwardValue(T KeyPath, U Value) {
372
324k
  return static_cast<T>(Value);
373
324k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::codegenoptions::DebugInfoKind>(unsigned int, clang::codegenoptions::DebugInfoKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, llvm::DebuggerKind>(unsigned int, llvm::DebuggerKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, llvm::DebugCompressionType>(unsigned int, llvm::DebugCompressionType)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:llvm::Reloc::Model mergeForwardValue<llvm::Reloc::Model, llvm::Reloc::Model>(llvm::Reloc::Model, llvm::Reloc::Model)
Line
Count
Source
371
97.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
97.6k
  return static_cast<T>(Value);
373
97.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::FramePointerKind>(unsigned int, clang::CodeGenOptions::FramePointerKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::ProfileInstrKind>(unsigned int, clang::CodeGenOptions::ProfileInstrKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::CodeGenOptions::ObjCDispatchMethodKind>(unsigned int, clang::CodeGenOptions::ObjCDispatchMethodKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:clang::DependencyOutputFormat mergeForwardValue<clang::DependencyOutputFormat, clang::DependencyOutputFormat>(clang::DependencyOutputFormat, clang::DependencyOutputFormat)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:bool mergeForwardValue<bool, bool>(bool, bool)
Line
Count
Source
371
780k
static T mergeForwardValue(T KeyPath, U Value) {
372
780k
  return static_cast<T>(Value);
373
780k
}
CompilerInvocation.cpp:unsigned long long mergeForwardValue<unsigned long long, int>(unsigned long long, int)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned long long mergeForwardValue<unsigned long long, unsigned long long>(unsigned long long, unsigned long long)
Line
Count
Source
371
11
static T mergeForwardValue(T KeyPath, U Value) {
372
11
  return static_cast<T>(Value);
373
11
}
CompilerInvocation.cpp:llvm::EABI mergeForwardValue<llvm::EABI, llvm::EABI>(llvm::EABI, llvm::EABI)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:clang::FrontendOptions::'unnamed' mergeForwardValue<clang::FrontendOptions::'unnamed', clang::FrontendOptions::'unnamed'>(clang::FrontendOptions::'unnamed', clang::FrontendOptions::'unnamed')
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:clang::ObjCXXARCStandardLibraryKind mergeForwardValue<clang::ObjCXXARCStandardLibraryKind, clang::ObjCXXARCStandardLibraryKind>(clang::ObjCXXARCStandardLibraryKind, clang::ObjCXXARCStandardLibraryKind)
Line
Count
Source
371
66.1k
static T mergeForwardValue(T KeyPath, U Value) {
372
66.1k
  return static_cast<T>(Value);
373
66.1k
}
CompilerInvocation.cpp:clang::DisableValidationForModuleKind mergeForwardValue<clang::DisableValidationForModuleKind, clang::DisableValidationForModuleKind>(clang::DisableValidationForModuleKind, clang::DisableValidationForModuleKind)
Line
Count
Source
371
64.8k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.8k
  return static_cast<T>(Value);
373
64.8k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::OverloadsShown>(unsigned int, clang::OverloadsShown)
Line
Count
Source
371
105k
static T mergeForwardValue(T KeyPath, U Value) {
372
105k
  return static_cast<T>(Value);
373
105k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::DiagnosticOptions::TextDiagnosticFormat>(unsigned int, clang::DiagnosticOptions::TextDiagnosticFormat)
Line
Count
Source
371
105k
static T mergeForwardValue(T KeyPath, U Value) {
372
105k
  return static_cast<T>(Value);
373
105k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::DiagnosticOptions::'unnamed'>(unsigned int, clang::DiagnosticOptions::'unnamed')
Line
Count
Source
371
632k
static T mergeForwardValue(T KeyPath, U Value) {
372
632k
  return static_cast<T>(Value);
373
632k
}
CompilerInvocation.cpp:clang::LangOptions::CoreFoundationABI mergeForwardValue<clang::LangOptions::CoreFoundationABI, clang::LangOptions::CoreFoundationABI>(clang::LangOptions::CoreFoundationABI, clang::LangOptions::CoreFoundationABI)
Line
Count
Source
371
64.7k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.7k
  return static_cast<T>(Value);
373
64.7k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, llvm::ExceptionHandling>(unsigned int, llvm::ExceptionHandling)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, llvm::RoundingMode>(unsigned int, llvm::RoundingMode)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::LaxVectorConversionKind>(unsigned int, clang::LangOptions::LaxVectorConversionKind)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::PragmaMSPointersToMembersKind>(unsigned int, clang::LangOptions::PragmaMSPointersToMembersKind)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::TrivialAutoVarInitKind>(unsigned int, clang::LangOptions::TrivialAutoVarInitKind)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::Visibility>(unsigned int, clang::Visibility)
Line
Count
Source
371
323k
static T mergeForwardValue(T KeyPath, U Value) {
372
323k
  return static_cast<T>(Value);
373
323k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::SYCLMajorVersion>(unsigned int, clang::LangOptions::SYCLMajorVersion)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::StackProtectorMode>(unsigned int, clang::LangOptions::StackProtectorMode)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::AddrSpaceMapMangling>(unsigned int, clang::LangOptions::AddrSpaceMapMangling)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
CompilerInvocation.cpp:unsigned int mergeForwardValue<unsigned int, clang::LangOptions::DefaultCallingConvention>(unsigned int, clang::LangOptions::DefaultCallingConvention)
Line
Count
Source
371
64.6k
static T mergeForwardValue(T KeyPath, U Value) {
372
64.6k
  return static_cast<T>(Value);
373
64.6k
}
374
375
972k
template <typename T, typename U> static T mergeMaskValue(T KeyPath, U Value) {
376
972k
  return KeyPath | Value;
377
972k
}
378
379
20.5k
template <typename T> static T extractForwardValue(T KeyPath) {
380
20.5k
  return KeyPath;
381
20.5k
}
CompilerInvocation.cpp:std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > extractForwardValue<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
Line
Count
Source
379
2.16k
template <typename T> static T extractForwardValue(T KeyPath) {
380
2.16k
  return KeyPath;
381
2.16k
}
CompilerInvocation.cpp:unsigned int extractForwardValue<unsigned int>(unsigned int)
Line
Count
Source
379
16.6k
template <typename T> static T extractForwardValue(T KeyPath) {
380
16.6k
  return KeyPath;
381
16.6k
}
CompilerInvocation.cpp:std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > extractForwardValue<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >)
Line
Count
Source
379
950
template <typename T> static T extractForwardValue(T KeyPath) {
380
950
  return KeyPath;
381
950
}
CompilerInvocation.cpp:clang::DependencyOutputFormat extractForwardValue<clang::DependencyOutputFormat>(clang::DependencyOutputFormat)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:bool extractForwardValue<bool>(bool)
Line
Count
Source
379
456
template <typename T> static T extractForwardValue(T KeyPath) {
380
456
  return KeyPath;
381
456
}
CompilerInvocation.cpp:clang::LangOptions::CoreFoundationABI extractForwardValue<clang::LangOptions::CoreFoundationABI>(clang::LangOptions::CoreFoundationABI)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:unsigned long long extractForwardValue<unsigned long long>(unsigned long long)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:llvm::EABI extractForwardValue<llvm::EABI>(llvm::EABI)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:llvm::Reloc::Model extractForwardValue<llvm::Reloc::Model>(llvm::Reloc::Model)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:clang::FrontendOptions::'unnamed' extractForwardValue<clang::FrontendOptions::'unnamed'>(clang::FrontendOptions::'unnamed')
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:clang::ObjCXXARCStandardLibraryKind extractForwardValue<clang::ObjCXXARCStandardLibraryKind>(clang::ObjCXXARCStandardLibraryKind)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
CompilerInvocation.cpp:clang::DisableValidationForModuleKind extractForwardValue<clang::DisableValidationForModuleKind>(clang::DisableValidationForModuleKind)
Line
Count
Source
379
38
template <typename T> static T extractForwardValue(T KeyPath) {
380
38
  return KeyPath;
381
38
}
382
383
template <typename T, typename U, U Value>
384
570
static T extractMaskValue(T KeyPath) {
385
570
  return KeyPath & Value;
386
570
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')1>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')2>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')12>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')3324>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')4>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')8>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')4096>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')16>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')32>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')64>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')128>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')256>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')512>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')1024>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
CompilerInvocation.cpp:unsigned int extractMaskValue<unsigned int, clang::FrontendOptions::'unnamed0', (clang::FrontendOptions::'unnamed0')2048>(unsigned int)
Line
Count
Source
384
38
static T extractMaskValue(T KeyPath) {
385
38
  return KeyPath & Value;
386
38
}
387
388
#define PARSE_OPTION_WITH_MARSHALLING(ARGS, DIAGS, SUCCESS, ID, FLAGS, PARAM,  \
389
                                      SHOULD_PARSE, KEYPATH, DEFAULT_VALUE,    \
390
                                      IMPLIED_CHECK, IMPLIED_VALUE,            \
391
                                      NORMALIZER, MERGER, TABLE_INDEX)         \
392
43.0M
  if ((FLAGS)&options::CC1Option) {                                            \
393
64.6k
    KEYPATH = MERGER(KEYPATH, DEFAULT_VALUE);                                  \
394
39.2M
    if (IMPLIED_CHECK)                                                         \
395
349
      KEYPATH = MERGER(KEYPATH, 
IMPLIED_VALUE0
); \
396
37.8M
    if (SHOULD_PARSE)                                                          \
397
36.7M
      if (auto MaybeValue =                                                    \
398
36.7M
              NORMALIZER(OPT_##ID, TABLE_INDEX, ARGS, DIAGS, SUCCESS))         \
399
2.48M
        KEYPATH =                                                              \
400
2.48M
            MERGER(KEYPATH, static_cast<decltype(KEYPATH)>(*MaybeValue));      \
401
37.3M
  }
402
403
static void FixupInvocation(CompilerInvocation &Invocation,
404
                            DiagnosticsEngine &Diags,
405
64.8k
                            const InputArgList &Args) {
406
64.8k
  LangOptions &LangOpts = *Invocation.getLangOpts();
407
64.8k
  CodeGenOptions &CodeGenOpts = Invocation.getCodeGenOpts();
408
64.8k
  TargetOptions &TargetOpts = Invocation.getTargetOpts();
409
64.8k
  FrontendOptions &FrontendOpts = Invocation.getFrontendOpts();
410
64.8k
  CodeGenOpts.XRayInstrumentFunctions = LangOpts.XRayInstrument;
411
64.8k
  CodeGenOpts.XRayAlwaysEmitCustomEvents = LangOpts.XRayAlwaysEmitCustomEvents;
412
64.8k
  CodeGenOpts.XRayAlwaysEmitTypedEvents = LangOpts.XRayAlwaysEmitTypedEvents;
413
64.8k
  CodeGenOpts.DisableFree = FrontendOpts.DisableFree;
414
64.8k
  FrontendOpts.GenerateGlobalModuleIndex = FrontendOpts.UseGlobalModuleIndex;
415
416
64.8k
  LangOpts.ForceEmitVTables = CodeGenOpts.ForceEmitVTables;
417
64.8k
  LangOpts.SpeculativeLoadHardening = CodeGenOpts.SpeculativeLoadHardening;
418
64.8k
  LangOpts.CurrentModule = LangOpts.ModuleName;
419
420
64.8k
  llvm::Triple T(TargetOpts.Triple);
421
64.8k
  llvm::Triple::ArchType Arch = T.getArch();
422
423
64.8k
  CodeGenOpts.CodeModel = TargetOpts.CodeModel;
424
425
64.8k
  if (LangOpts.getExceptionHandling() != llvm::ExceptionHandling::None &&
426
101
      T.isWindowsMSVCEnvironment())
427
6
    Diags.Report(diag::err_fe_invalid_exception_model)
428
6
        << static_cast<unsigned>(LangOpts.getExceptionHandling()) << T.str();
429
430
64.8k
  if (LangOpts.AppleKext && 
!LangOpts.CPlusPlus11
)
431
0
    Diags.Report(diag::warn_c_kext);
432
433
64.8k
  if (LangOpts.NewAlignOverride &&
434
2
      !llvm::isPowerOf2_32(LangOpts.NewAlignOverride)) {
435
0
    Arg *A = Args.getLastArg(OPT_fnew_alignment_EQ);
436
0
    Diags.Report(diag::err_fe_invalid_alignment)
437
0
        << A->getAsString(Args) << A->getValue();
438
0
    LangOpts.NewAlignOverride = 0;
439
0
  }
440
441
64.8k
  if (Arg *A = Args.getLastArg(OPT_fdefault_calling_conv_EQ)) {
442
10
    auto DefaultCC = LangOpts.getDefaultCallingConv();
443
444
10
    bool emitError = (DefaultCC == LangOptions::DCC_FastCall ||
445
9
                      DefaultCC == LangOptions::DCC_StdCall) &&
446
3
                     Arch != llvm::Triple::x86;
447
10
    emitError |= (DefaultCC == LangOptions::DCC_VectorCall ||
448
5
                  DefaultCC == LangOptions::DCC_RegCall) &&
449
6
                 !T.isX86();
450
10
    if (emitError)
451
0
      Diags.Report(diag::err_drv_argument_not_allowed_with)
452
0
          << A->getSpelling() << T.getTriple();
453
10
  }
454
455
64.8k
  if (!CodeGenOpts.ProfileRemappingFile.empty() && 
CodeGenOpts.LegacyPassManager4
)
456
0
    Diags.Report(diag::err_drv_argument_only_allowed_with)
457
0
        << Args.getLastArg(OPT_fprofile_remapping_file_EQ)->getAsString(Args)
458
0
        << "-fno-legacy-pass-manager";
459
64.8k
}
460
461
//===----------------------------------------------------------------------===//
462
// Deserialization (from args)
463
//===----------------------------------------------------------------------===//
464
465
static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
466
129k
                                     DiagnosticsEngine &Diags) {
467
129k
  unsigned DefaultOpt = llvm::CodeGenOpt::None;
468
129k
  if (IK.getLanguage() == Language::OpenCL && 
!Args.hasArg(OPT_cl_opt_disable)1.34k
)
469
1.33k
    DefaultOpt = llvm::CodeGenOpt::Default;
470
471
129k
  if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
472
11.3k
    if (A->getOption().matches(options::OPT_O0))
473
7.00k
      return llvm::CodeGenOpt::None;
474
475
4.37k
    if (A->getOption().matches(options::OPT_Ofast))
476
4
      return llvm::CodeGenOpt::Aggressive;
477
478
4.36k
    assert(A->getOption().matches(options::OPT_O));
479
480
4.36k
    StringRef S(A->getValue());
481
4.36k
    if (S == "s" || 
S == "z"4.24k
)
482
165
      return llvm::CodeGenOpt::Default;
483
484
4.20k
    if (S == "g")
485
2
      return llvm::CodeGenOpt::Less;
486
487
4.20k
    return getLastArgIntValue(Args, OPT_O, DefaultOpt, Diags);
488
4.20k
  }
489
490
118k
  return DefaultOpt;
491
118k
}
492
493
129k
static unsigned getOptimizationLevelSize(ArgList &Args) {
494
129k
  if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
495
11.3k
    if (A->getOption().matches(options::OPT_O)) {
496
4.36k
      switch (A->getValue()[0]) {
497
4.20k
      default:
498
4.20k
        return 0;
499
119
      case 's':
500
119
        return 1;
501
46
      case 'z':
502
46
        return 2;
503
125k
      }
504
125k
    }
505
11.3k
  }
506
125k
  return 0;
507
125k
}
508
509
0
static std::string GetOptName(llvm::opt::OptSpecifier OptSpecifier) {
510
0
  static const OptTable &OptTable = getDriverOptTable();
511
0
  return OptTable.getOption(OptSpecifier).getPrefixedName();
512
0
}
513
514
static void addDiagnosticArgs(ArgList &Args, OptSpecifier Group,
515
                              OptSpecifier GroupWithValue,
516
210k
                              std::vector<std::string> &Diagnostics) {
517
156k
  for (auto *A : Args.filtered(Group)) {
518
156k
    if (A->getOption().getKind() == Option::FlagClass) {
519
      // The argument is a pure flag (such as OPT_Wall or OPT_Wdeprecated). Add
520
      // its name (minus the "W" or "R" at the beginning) to the warning list.
521
1.37k
      Diagnostics.push_back(
522
1.37k
          std::string(A->getOption().getName().drop_front(1)));
523
154k
    } else if (A->getOption().matches(GroupWithValue)) {
524
      // This is -Wfoo= or -Rfoo=, where foo is the name of the diagnostic group.
525
13.9k
      Diagnostics.push_back(
526
13.9k
          std::string(A->getOption().getName().drop_front(1).rtrim("=-")));
527
140k
    } else {
528
      // Otherwise, add its value (for OPT_W_Joined and similar).
529
140k
      for (const auto *Arg : A->getValues())
530
140k
        Diagnostics.emplace_back(Arg);
531
140k
    }
532
156k
  }
533
210k
}
534
535
// Parse the Static Analyzer configuration. If \p Diags is set to nullptr,
536
// it won't verify the input.
537
static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts,
538
                                 DiagnosticsEngine *Diags);
539
540
static void getAllNoBuiltinFuncValues(ArgList &Args,
541
121k
                                      std::vector<std::string> &Funcs) {
542
121k
  SmallVector<const char *, 8> Values;
543
3.29M
  for (const auto &Arg : Args) {
544
3.29M
    const Option &O = Arg->getOption();
545
3.29M
    if (O.matches(options::OPT_fno_builtin_)) {
546
114
      const char *FuncName = Arg->getValue();
547
114
      if (Builtin::Context::isBuiltinFunc(FuncName))
548
106
        Values.push_back(FuncName);
549
114
    }
550
3.29M
  }
551
121k
  Funcs.insert(Funcs.end(), Values.begin(), Values.end());
552
121k
}
553
554
static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
555
64.8k
                              DiagnosticsEngine &Diags) {
556
64.8k
  bool Success = true;
557
64.8k
  if (Arg *A = Args.getLastArg(OPT_analyzer_store)) {
558
164
    StringRef Name = A->getValue();
559
164
    AnalysisStores Value = llvm::StringSwitch<AnalysisStores>(Name)
560
164
#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) \
561
164
      .Case(CMDFLAG, NAME##Model)
562
164
#include "clang/StaticAnalyzer/Core/Analyses.def"
563
164
      .Default(NumStores);
564
164
    if (Value == NumStores) {
565
0
      Diags.Report(diag::err_drv_invalid_value)
566
0
        << A->getAsString(Args) << Name;
567
0
      Success = false;
568
164
    } else {
569
164
      Opts.AnalysisStoreOpt = Value;
570
164
    }
571
164
  }
572
573
64.8k
  if (Arg *A = Args.getLastArg(OPT_analyzer_constraints)) {
574
1.27k
    StringRef Name = A->getValue();
575
1.27k
    AnalysisConstraints Value = llvm::StringSwitch<AnalysisConstraints>(Name)
576
1.27k
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) \
577
2.55k
      .Case(CMDFLAG, NAME##Model)
578
1.27k
#include "clang/StaticAnalyzer/Core/Analyses.def"
579
1.27k
      .Default(NumConstraints);
580
1.27k
    if (Value == NumConstraints) {
581
0
      Diags.Report(diag::err_drv_invalid_value)
582
0
        << A->getAsString(Args) << Name;
583
0
      Success = false;
584
1.27k
    } else {
585
1.27k
      Opts.AnalysisConstraintsOpt = Value;
586
1.27k
    }
587
1.27k
  }
588
589
64.8k
  if (Arg *A = Args.getLastArg(OPT_analyzer_output)) {
590
232
    StringRef Name = A->getValue();
591
232
    AnalysisDiagClients Value = llvm::StringSwitch<AnalysisDiagClients>(Name)
592
232
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN) \
593
1.85k
      .Case(CMDFLAG, PD_##NAME)
594
232
#include "clang/StaticAnalyzer/Core/Analyses.def"
595
232
      .Default(NUM_ANALYSIS_DIAG_CLIENTS);
596
232
    if (Value == NUM_ANALYSIS_DIAG_CLIENTS) {
597
0
      Diags.Report(diag::err_drv_invalid_value)
598
0
        << A->getAsString(Args) << Name;
599
0
      Success = false;
600
232
    } else {
601
232
      Opts.AnalysisDiagOpt = Value;
602
232
    }
603
232
  }
604
605
64.8k
  if (Arg *A = Args.getLastArg(OPT_analyzer_purge)) {
606
1
    StringRef Name = A->getValue();
607
1
    AnalysisPurgeMode Value = llvm::StringSwitch<AnalysisPurgeMode>(Name)
608
1
#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) \
609
3
      .Case(CMDFLAG, NAME)
610
1
#include "clang/StaticAnalyzer/Core/Analyses.def"
611
1
      .Default(NumPurgeModes);
612
1
    if (Value == NumPurgeModes) {
613
0
      Diags.Report(diag::err_drv_invalid_value)
614
0
        << A->getAsString(Args) << Name;
615
0
      Success = false;
616
1
    } else {
617
1
      Opts.AnalysisPurgeOpt = Value;
618
1
    }
619
1
  }
620
621
64.8k
  if (Arg *A = Args.getLastArg(OPT_analyzer_inlining_mode)) {
622
0
    StringRef Name = A->getValue();
623
0
    AnalysisInliningMode Value = llvm::StringSwitch<AnalysisInliningMode>(Name)
624
0
#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) \
625
0
      .Case(CMDFLAG, NAME)
626
0
#include "clang/StaticAnalyzer/Core/Analyses.def"
627
0
      .Default(NumInliningModes);
628
0
    if (Value == NumInliningModes) {
629
0
      Diags.Report(diag::err_drv_invalid_value)
630
0
        << A->getAsString(Args) << Name;
631
0
      Success = false;
632
0
    } else {
633
0
      Opts.InliningMode = Value;
634
0
    }
635
0
  }
636
637
64.8k
  Opts.CheckersAndPackages.clear();
638
64.8k
  for (const Arg *A :
639
1.94k
       Args.filtered(OPT_analyzer_checker, OPT_analyzer_disable_checker)) {
640
1.94k
    A->claim();
641
1.94k
    bool IsEnabled = A->getOption().getID() == OPT_analyzer_checker;
642
    // We can have a list of comma separated checker names, e.g:
643
    // '-analyzer-checker=cocoa,unix'
644
1.94k
    StringRef CheckerAndPackageList = A->getValue();
645
1.94k
    SmallVector<StringRef, 16> CheckersAndPackages;
646
1.94k
    CheckerAndPackageList.split(CheckersAndPackages, ",");
647
1.94k
    for (const StringRef &CheckerOrPackage : CheckersAndPackages)
648
2.76k
      Opts.CheckersAndPackages.emplace_back(std::string(CheckerOrPackage),
649
2.76k
                                            IsEnabled);
650
1.94k
  }
651
652
  // Go through the analyzer configuration options.
653
611
  for (const auto *A : Args.filtered(OPT_analyzer_config)) {
654
655
    // We can have a list of comma separated config names, e.g:
656
    // '-analyzer-config key1=val1,key2=val2'
657
611
    StringRef configList = A->getValue();
658
611
    SmallVector<StringRef, 4> configVals;
659
611
    configList.split(configVals, ",");
660
636
    for (const auto &configVal : configVals) {
661
636
      StringRef key, val;
662
636
      std::tie(key, val) = configVal.split("=");
663
636
      if (val.empty()) {
664
0
        Diags.Report(SourceLocation(),
665
0
                     diag::err_analyzer_config_no_value) << configVal;
666
0
        Success = false;
667
0
        break;
668
0
      }
669
636
      if (val.find('=') != StringRef::npos) {
670
0
        Diags.Report(SourceLocation(),
671
0
                     diag::err_analyzer_config_multiple_values)
672
0
          << configVal;
673
0
        Success = false;
674
0
        break;
675
0
      }
676
677
      // TODO: Check checker options too, possibly in CheckerRegistry.
678
      // Leave unknown non-checker configs unclaimed.
679
636
      if (!key.contains(":") && 
Opts.isUnknownAnalyzerConfig(key)410
) {
680
10
        if (Opts.ShouldEmitErrorsOnInvalidConfigValue)
681
4
          Diags.Report(diag::err_analyzer_config_unknown) << key;
682
10
        continue;
683
10
      }
684
685
626
      A->claim();
686
626
      Opts.Config[key] = std::string(val);
687
626
    }
688
611
  }
689
690
64.8k
  if (Opts.ShouldEmitErrorsOnInvalidConfigValue)
691
64.8k
    parseAnalyzerConfigs(Opts, &Diags);
692
25
  else
693
25
    parseAnalyzerConfigs(Opts, nullptr);
694
695
64.8k
  llvm::raw_string_ostream os(Opts.FullCompilerInvocation);
696
2.75M
  for (unsigned i = 0; i < Args.getNumInputArgStrings(); 
++i2.68M
) {
697
2.68M
    if (i != 0)
698
2.62M
      os << " ";
699
2.68M
    os << Args.getArgString(i);
700
2.68M
  }
701
64.8k
  os.flush();
702
703
64.8k
  return Success;
704
64.8k
}
705
706
static StringRef getStringOption(AnalyzerOptions::ConfigTable &Config,
707
3.82M
                                 StringRef OptionName, StringRef DefaultVal) {
708
3.82M
  return Config.insert({OptionName, std::string(DefaultVal)}).first->second;
709
3.82M
}
710
711
static void initOption(AnalyzerOptions::ConfigTable &Config,
712
                       DiagnosticsEngine *Diags,
713
                       StringRef &OptionField, StringRef Name,
714
583k
                       StringRef DefaultVal) {
715
  // String options may be known to invalid (e.g. if the expected string is a
716
  // file name, but the file does not exist), those will have to be checked in
717
  // parseConfigs.
718
583k
  OptionField = getStringOption(Config, Name, DefaultVal);
719
583k
}
720
721
static void initOption(AnalyzerOptions::ConfigTable &Config,
722
                       DiagnosticsEngine *Diags,
723
2.59M
                       bool &OptionField, StringRef Name, bool DefaultVal) {
724
2.59M
  auto PossiblyInvalidVal = llvm::StringSwitch<Optional<bool>>(
725
1.29M
                 getStringOption(Config, Name, (DefaultVal ? 
"true"1.29M
: "false")))
726
2.59M
      .Case("true", true)
727
2.59M
      .Case("false", false)
728
2.59M
      .Default(None);
729
730
2.59M
  if (!PossiblyInvalidVal) {
731
4
    if (Diags)
732
2
      Diags->Report(diag::err_analyzer_config_invalid_input)
733
2
        << Name << "a boolean";
734
2
    else
735
2
      OptionField = DefaultVal;
736
4
  } else
737
2.59M
    OptionField = PossiblyInvalidVal.getValue();
738
2.59M
}
739
740
static void initOption(AnalyzerOptions::ConfigTable &Config,
741
                       DiagnosticsEngine *Diags,
742
                       unsigned &OptionField, StringRef Name,
743
648k
                       unsigned DefaultVal) {
744
745
648k
  OptionField = DefaultVal;
746
648k
  bool HasFailed = getStringOption(Config, Name, std::to_string(DefaultVal))
747
648k
                     .getAsInteger(0, OptionField);
748
648k
  if (Diags && 
HasFailed648k
)
749
2
    Diags->Report(diag::err_analyzer_config_invalid_input)
750
2
      << Name << "an unsigned";
751
648k
}
752
753
static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts,
754
64.8k
                                 DiagnosticsEngine *Diags) {
755
  // TODO: There's no need to store the entire configtable, it'd be plenty
756
  // enough tostore checker options.
757
758
64.8k
#define ANALYZER_OPTION(TYPE, NAME, CMDFLAG, DESC, DEFAULT_VAL)                \
759
3.63M
  initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEFAULT_VAL);
760
761
64.8k
#define ANALYZER_OPTION_DEPENDS_ON_USER_MODE(TYPE, NAME, CMDFLAG, DESC,        \
762
64.8k
                                           SHALLOW_VAL, DEEP_VAL)              \
763
194k
  switch (AnOpts.getUserMode()) {                                              \
764
6
  case UMK_Shallow:                                                            \
765
6
    initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, SHALLOW_VAL);       \
766
6
    break;                                                                     \
767
194k
  case UMK_Deep:                                                               \
768
194k
    initOption(AnOpts.Config, Diags, AnOpts.NAME, CMDFLAG, DEEP_VAL);          \
769
194k
    break;                                                                     \
770
194k
  }                                                                            \
771
64.8k
772
129k
#include 
"clang/StaticAnalyzer/Core/AnalyzerOptions.def"64.8k
773
129k
#undef ANALYZER_OPTION
774
129k
#undef ANALYZER_OPTION_DEPENDS_ON_USER_MODE
775
776
  // At this point, AnalyzerOptions is configured. Let's validate some options.
777
778
  // FIXME: Here we try to validate the silenced checkers or packages are valid.
779
  // The current approach only validates the registered checkers which does not
780
  // contain the runtime enabled checkers and optimally we would validate both.
781
64.8k
  if (!AnOpts.RawSilencedCheckersAndPackages.empty()) {
782
8
    std::vector<StringRef> Checkers =
783
8
        AnOpts.getRegisteredCheckers(/*IncludeExperimental=*/true);
784
8
    std::vector<StringRef> Packages =
785
8
        AnOpts.getRegisteredPackages(/*IncludeExperimental=*/true);
786
787
8
    SmallVector<StringRef, 16> CheckersAndPackages;
788
8
    AnOpts.RawSilencedCheckersAndPackages.split(CheckersAndPackages, ";");
789
790
10
    for (const StringRef &CheckerOrPackage : CheckersAndPackages) {
791
10
      if (Diags) {
792
6
        bool IsChecker = CheckerOrPackage.contains('.');
793
6
        bool IsValidName =
794
6
            IsChecker
795
4
                ? llvm::find(Checkers, CheckerOrPackage) != Checkers.end()
796
2
                : llvm::find(Packages, CheckerOrPackage) != Packages.end();
797
798
6
        if (!IsValidName)
799
2
          Diags->Report(diag::err_unknown_analyzer_checker_or_package)
800
2
              << CheckerOrPackage;
801
6
      }
802
803
10
      AnOpts.SilencedCheckersAndPackages.emplace_back(CheckerOrPackage);
804
10
    }
805
8
  }
806
807
64.8k
  if (!Diags)
808
24
    return;
809
810
64.8k
  if (AnOpts.ShouldTrackConditionsDebug && 
!AnOpts.ShouldTrackConditions2
)
811
1
    Diags->Report(diag::err_analyzer_config_invalid_input)
812
1
        << "track-conditions-debug" << "'track-conditions' to also be enabled";
813
814
64.8k
  if (!AnOpts.CTUDir.empty() && 
!llvm::sys::fs::is_directory(AnOpts.CTUDir)10
)
815
2
    Diags->Report(diag::err_analyzer_config_invalid_input) << "ctu-dir"
816
2
                                                           << "a filename";
817
818
64.8k
  if (!AnOpts.ModelPath.empty() &&
819
1
      !llvm::sys::fs::is_directory(AnOpts.ModelPath))
820
0
    Diags->Report(diag::err_analyzer_config_invalid_input) << "model-path"
821
0
                                                           << "a filename";
822
64.8k
}
823
824
/// Create a new Regex instance out of the string value in \p RpassArg.
825
/// It returns a pointer to the newly generated Regex instance.
826
static std::shared_ptr<llvm::Regex>
827
GenerateOptimizationRemarkRegex(DiagnosticsEngine &Diags, ArgList &Args,
828
82
                                Arg *RpassArg) {
829
82
  StringRef Val = RpassArg->getValue();
830
82
  std::string RegexError;
831
82
  std::shared_ptr<llvm::Regex> Pattern = std::make_shared<llvm::Regex>(Val);
832
82
  if (!Pattern->isValid(RegexError)) {
833
0
    Diags.Report(diag::err_drv_optimization_remark_pattern)
834
0
        << RegexError << RpassArg->getAsString(Args);
835
0
    Pattern.reset();
836
0
  }
837
82
  return Pattern;
838
82
}
839
840
static bool parseDiagnosticLevelMask(StringRef FlagName,
841
                                     const std::vector<std::string> &Levels,
842
                                     DiagnosticsEngine &Diags,
843
105k
                                     DiagnosticLevelMask &M) {
844
105k
  bool Success = true;
845
451
  for (const auto &Level : Levels) {
846
451
    DiagnosticLevelMask const PM =
847
451
      llvm::StringSwitch<DiagnosticLevelMask>(Level)
848
451
        .Case("note",    DiagnosticLevelMask::Note)
849
451
        .Case("remark",  DiagnosticLevelMask::Remark)
850
451
        .Case("warning", DiagnosticLevelMask::Warning)
851
451
        .Case("error",   DiagnosticLevelMask::Error)
852
451
        .Default(DiagnosticLevelMask::None);
853
451
    if (PM == DiagnosticLevelMask::None) {
854
1
      Success = false;
855
1
      Diags.Report(diag::err_drv_invalid_value) << FlagName << Level;
856
1
    }
857
451
    M = M | PM;
858
451
  }
859
105k
  return Success;
860
105k
}
861
862
static void parseSanitizerKinds(StringRef FlagName,
863
                                const std::vector<std::string> &Sanitizers,
864
194k
                                DiagnosticsEngine &Diags, SanitizerSet &S) {
865
1.34k
  for (const auto &Sanitizer : Sanitizers) {
866
1.34k
    SanitizerMask K = parseSanitizerValue(Sanitizer, /*AllowGroups=*/false);
867
1.34k
    if (K == SanitizerMask())
868
0
      Diags.Report(diag::err_drv_invalid_value) << FlagName << Sanitizer;
869
1.34k
    else
870
1.34k
      S.set(K, true);
871
1.34k
  }
872
194k
}
873
874
static void parseXRayInstrumentationBundle(StringRef FlagName, StringRef Bundle,
875
                                           ArgList &Args, DiagnosticsEngine &D,
876
20
                                           XRayInstrSet &S) {
877
20
  llvm::SmallVector<StringRef, 2> BundleParts;
878
20
  llvm::SplitString(Bundle, BundleParts, ",");
879
27
  for (const auto &B : BundleParts) {
880
27
    auto Mask = parseXRayInstrValue(B);
881
27
    if (Mask == XRayInstrKind::None)
882
1
      if (B != "none")
883
0
        D.Report(diag::err_drv_invalid_value) << FlagName << Bundle;
884
1
      else
885
1
        S.Mask = Mask;
886
26
    else if (Mask == XRayInstrKind::All)
887
3
      S.Mask = Mask;
888
23
    else
889
23
      S.set(Mask, true);
890
27
  }
891
20
}
892
893
// Set the profile kind using fprofile-instrument-use-path.
894
static void setPGOUseInstrumentor(CodeGenOptions &Opts,
895
75
                                  const Twine &ProfileName) {
896
75
  auto ReaderOrErr = llvm::IndexedInstrProfReader::create(ProfileName);
897
  // In error, return silently and let Clang PGOUse report the error message.
898
75
  if (auto E = ReaderOrErr.takeError()) {
899
1
    llvm::consumeError(std::move(E));
900
1
    Opts.setProfileUse(CodeGenOptions::ProfileClangInstr);
901
1
    return;
902
1
  }
903
74
  std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader =
904
74
    std::move(ReaderOrErr.get());
905
74
  if (PGOReader->isIRLevelProfile()) {
906
32
    if (PGOReader->hasCSIRLevelProfile())
907
11
      Opts.setProfileUse(CodeGenOptions::ProfileCSIRInstr);
908
21
    else
909
21
      Opts.setProfileUse(CodeGenOptions::ProfileIRInstr);
910
32
  } else
911
42
    Opts.setProfileUse(CodeGenOptions::ProfileClangInstr);
912
74
}
913
914
bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
915
                                          InputKind IK,
916
                                          DiagnosticsEngine &Diags,
917
                                          const llvm::Triple &T,
918
                                          const std::string &OutputFile,
919
64.8k
                                          const LangOptions &LangOptsRef) {
920
64.8k
  bool Success = true;
921
922
64.8k
  unsigned OptimizationLevel = getOptimizationLevel(Args, IK, Diags);
923
  // TODO: This could be done in Driver
924
64.8k
  unsigned MaxOptLevel = 3;
925
64.8k
  if (OptimizationLevel > MaxOptLevel) {
926
    // If the optimization level is not supported, fall back on the default
927
    // optimization
928
4
    Diags.Report(diag::warn_drv_optimization_value)
929
4
        << Args.getLastArg(OPT_O)->getAsString(Args) << "-O" << MaxOptLevel;
930
4
    OptimizationLevel = MaxOptLevel;
931
4
  }
932
64.8k
  Opts.OptimizationLevel = OptimizationLevel;
933
934
  // The key paths of codegen options defined in Options.td start with
935
  // "CodeGenOpts.". Let's provide the expected variable name and type.
936
64.8k
  CodeGenOptions &CodeGenOpts = Opts;
937
  // Some codegen options depend on language options. Let's provide the expected
938
  // variable name and type.
939
64.8k
  const LangOptions *LangOpts = &LangOptsRef;
940
941
64.8k
#define CODEGEN_OPTION_WITH_MARSHALLING(                                       \
942
64.8k
    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
943
64.8k
    HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH,   \
944
64.8k
    DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER,     \
945
64.8k
    MERGER, EXTRACTOR, TABLE_INDEX)                                            \
946
17.0M
  PARSE_OPTION_WITH_MARSHALLING(Args, Diags, Success, ID, FLAGS, PARAM,        \
947
17.0M
                                SHOULD_PARSE, KEYPATH, DEFAULT_VALUE,          \
948
17.0M
                                IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER,      \
949
17.0M
                                MERGER, TABLE_INDEX)
950
64.8k
#include "clang/Driver/Options.inc"
951
64.8k
#undef CODEGEN_OPTION_WITH_MARSHALLING
952
953
  // At O0 we want to fully disable inlining outside of cases marked with
954
  // 'alwaysinline' that are required for correctness.
955
64.8k
  Opts.setInlining((Opts.OptimizationLevel == 0)
956
62.1k
                       ? CodeGenOptions::OnlyAlwaysInlining
957
2.75k
                       : CodeGenOptions::NormalInlining);
958
  // Explicit inlining flags can disable some or all inlining even at
959
  // optimization levels above zero.
960
64.8k
  if (Arg *InlineArg = Args.getLastArg(
961
21
          options::OPT_finline_functions, options::OPT_finline_hint_functions,
962
21
          options::OPT_fno_inline_functions, options::OPT_fno_inline)) {
963
21
    if (Opts.OptimizationLevel > 0) {
964
18
      const Option &InlineOpt = InlineArg->getOption();
965
18
      if (InlineOpt.matches(options::OPT_finline_functions))
966
4
        Opts.setInlining(CodeGenOptions::NormalInlining);
967
14
      else if (InlineOpt.matches(options::OPT_finline_hint_functions))
968
4
        Opts.setInlining(CodeGenOptions::OnlyHintInlining);
969
10
      else
970
10
        Opts.setInlining(CodeGenOptions::OnlyAlwaysInlining);
971
18
    }
972
21
  }
973
974
  // PIC defaults to -fno-direct-access-external-data while non-PIC defaults to
975
  // -fdirect-access-external-data.
976
64.8k
  Opts.DirectAccessExternalData =
977
64.8k
      Args.hasArg(OPT_fdirect_access_external_data) ||
978
64.8k
      (!Args.hasArg(OPT_fno_direct_access_external_data) &&
979
64.8k
       getLastArgIntValue(Args, OPT_pic_level, 0, Diags) == 0);
980
981
  // If -fuse-ctor-homing is set and limited debug info is already on, then use
982
  // constructor homing.
983
64.8k
  if (Args.getLastArg(OPT_fuse_ctor_homing))
984
4
    if (Opts.getDebugInfo() == codegenoptions::LimitedDebugInfo)
985
1
      Opts.setDebugInfo(codegenoptions::DebugInfoConstructor);
986
987
16
  for (const auto &Arg : Args.getAllArgValues(OPT_fdebug_prefix_map_EQ)) {
988
16
    auto Split = StringRef(Arg).split('=');
989
16
    Opts.DebugPrefixMap.insert(
990
16
        {std::string(Split.first), std::string(Split.second)});
991
16
  }
992
993
64.8k
  const llvm::Triple::ArchType DebugEntryValueArchs[] = {
994
64.8k
      llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::aarch64,
995
64.8k
      llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::mips,
996
64.8k
      llvm::Triple::mipsel, llvm::Triple::mips64, llvm::Triple::mips64el};
997
998
64.8k
  if (Opts.OptimizationLevel > 0 && 
Opts.hasReducedDebugInfo()2.75k
&&
999
179
      llvm::is_contained(DebugEntryValueArchs, T.getArch()))
1000
174
    Opts.EmitCallSiteInfo = true;
1001
1002
64.8k
  Opts.NewStructPathTBAA = !Args.hasArg(OPT_no_struct_path_tbaa) &&
1003
64.8k
                           Args.hasArg(OPT_new_struct_path_tbaa);
1004
64.8k
  Opts.OptimizeSize = getOptimizationLevelSize(Args);
1005
64.8k
  Opts.SimplifyLibCalls = !(Args.hasArg(OPT_fno_builtin) ||
1006
61.8k
                            Args.hasArg(OPT_ffreestanding));
1007
64.8k
  if (Opts.SimplifyLibCalls)
1008
61.0k
    getAllNoBuiltinFuncValues(Args, Opts.NoBuiltinFuncs);
1009
64.8k
  Opts.UnrollLoops =
1010
64.8k
      Args.hasFlag(OPT_funroll_loops, OPT_fno_unroll_loops,
1011
64.8k
                   (Opts.OptimizationLevel > 1));
1012
1013
64.8k
  Opts.DebugNameTable = static_cast<unsigned>(
1014
64.8k
      Args.hasArg(OPT_ggnu_pubnames)
1015
3
          ? llvm::DICompileUnit::DebugNameTableKind::GNU
1016
64.8k
          : Args.hasArg(OPT_gpubnames)
1017
1
                ? llvm::DICompileUnit::DebugNameTableKind::Default
1018
64.8k
                : llvm::DICompileUnit::DebugNameTableKind::None);
1019
1020
64.8k
  if (!Opts.ProfileInstrumentUsePath.empty())
1021
75
    setPGOUseInstrumentor(Opts, Opts.ProfileInstrumentUsePath);
1022
1023
64.8k
  if (const Arg *A = Args.getLastArg(OPT_ftime_report, OPT_ftime_report_EQ)) {
1024
16
    Opts.TimePasses = true;
1025
1026
    // -ftime-report= is only for new pass manager.
1027
16
    if (A->getOption().getID() == OPT_ftime_report_EQ) {
1028
4
      if (Opts.LegacyPassManager)
1029
2
        Diags.Report(diag::err_drv_argument_only_allowed_with)
1030
2
            << A->getAsString(Args) << "-fno-legacy-pass-manager";
1031
1032
4
      StringRef Val = A->getValue();
1033
4
      if (Val == "per-pass")
1034
2
        Opts.TimePassesPerRun = false;
1035
2
      else if (Val == "per-pass-run")
1036
2
        Opts.TimePassesPerRun = true;
1037
0
      else
1038
0
        Diags.Report(diag::err_drv_invalid_value)
1039
0
            << A->getAsString(Args) << A->getValue();
1040
4
    }
1041
16
  }
1042
1043
  // Basic Block Sections implies Function Sections.
1044
64.8k
  Opts.FunctionSections =
1045
64.8k
      Args.hasArg(OPT_ffunction_sections) ||
1046
64.8k
      (Opts.BBSections != "none" && 
Opts.BBSections != "labels"4
);
1047
1048
64.8k
  Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ);
1049
64.8k
  Opts.PrepareForThinLTO = false;
1050
64.8k
  if (Arg *A = Args.getLastArg(OPT_flto_EQ)) {
1051
72
    StringRef S = A->getValue();
1052
72
    if (S == "thin")
1053
55
      Opts.PrepareForThinLTO = true;
1054
17
    else if (S != "full")
1055
1
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << S;
1056
72
  }
1057
64.8k
  if (Arg *A = Args.getLastArg(OPT_fthinlto_index_EQ)) {
1058
62
    if (IK.getLanguage() != Language::LLVM_IR)
1059
1
      Diags.Report(diag::err_drv_argument_only_allowed_with)
1060
1
          << A->getAsString(Args) << "-x ir";
1061
62
    Opts.ThinLTOIndexFile =
1062
62
        std::string(Args.getLastArgValue(OPT_fthinlto_index_EQ));
1063
62
  }
1064
64.8k
  if (Arg *A = Args.getLastArg(OPT_save_temps_EQ))
1065
8
    Opts.SaveTempsFilePrefix =
1066
8
        llvm::StringSwitch<std::string>(A->getValue())
1067
8
            .Case("obj", OutputFile)
1068
8
            .Default(llvm::sys::path::filename(OutputFile).str());
1069
1070
  // The memory profile runtime appends the pid to make this name more unique.
1071
64.8k
  const char *MemProfileBasename = "memprof.profraw";
1072
64.8k
  if (Args.hasArg(OPT_fmemory_profile_EQ)) {
1073
1
    SmallString<128> Path(
1074
1
        std::string(Args.getLastArgValue(OPT_fmemory_profile_EQ)));
1075
1
    llvm::sys::path::append(Path, MemProfileBasename);
1076
1
    Opts.MemoryProfileOutput = std::string(Path);
1077
64.8k
  } else if (Args.hasArg(OPT_fmemory_profile))
1078
3
    Opts.MemoryProfileOutput = MemProfileBasename;
1079
1080
64.8k
  if (Opts.EmitGcovArcs || 
Opts.EmitGcovNotes64.8k
) {
1081
16
    if (Args.hasArg(OPT_coverage_version_EQ)) {
1082
2
      StringRef CoverageVersion = Args.getLastArgValue(OPT_coverage_version_EQ);
1083
2
      if (CoverageVersion.size() != 4) {
1084
0
        Diags.Report(diag::err_drv_invalid_value)
1085
0
            << Args.getLastArg(OPT_coverage_version_EQ)->getAsString(Args)
1086
0
            << CoverageVersion;
1087
2
      } else {
1088
2
        memcpy(Opts.CoverageVersion, CoverageVersion.data(), 4);
1089
2
      }
1090
2
    }
1091
16
  }
1092
  // FIXME: For backend options that are not yet recorded as function
1093
  // attributes in the IR, keep track of them so we can embed them in a
1094
  // separate data section and use them when building the bitcode.
1095
1.82M
  for (const auto &A : Args) {
1096
    // Do not encode output and input.
1097
1.82M
    if (A->getOption().getID() == options::OPT_o ||
1098
1.80M
        A->getOption().getID() == options::OPT_INPUT ||
1099
1.73M
        A->getOption().getID() == options::OPT_x ||
1100
1.69M
        A->getOption().getID() == options::OPT_fembed_bitcode ||
1101
1.69M
        A->getOption().matches(options::OPT_W_Group))
1102
241k
      continue;
1103
1.58M
    ArgStringList ASL;
1104
1.58M
    A->render(Args, ASL);
1105
2.38M
    for (const auto &arg : ASL) {
1106
2.38M
      StringRef ArgStr(arg);
1107
2.38M
      Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
1108
      // using \00 to separate each commandline options.
1109
2.38M
      Opts.CmdArgs.push_back('\0');
1110
2.38M
    }
1111
1.58M
  }
1112
1113
64.8k
  auto XRayInstrBundles =
1114
64.8k
      Args.getAllArgValues(OPT_fxray_instrumentation_bundle);
1115
64.8k
  if (XRayInstrBundles.empty())
1116
64.8k
    Opts.XRayInstrumentationBundle.Mask = XRayInstrKind::All;
1117
16
  else
1118
16
    for (const auto &A : XRayInstrBundles)
1119
20
      parseXRayInstrumentationBundle("-fxray-instrumentation-bundle=", A, Args,
1120
20
                                     Diags, Opts.XRayInstrumentationBundle);
1121
1122
64.8k
  if (const Arg *A = Args.getLastArg(OPT_fcf_protection_EQ)) {
1123
15
    StringRef Name = A->getValue();
1124
15
    if (Name == "full") {
1125
5
      Opts.CFProtectionReturn = 1;
1126
5
      Opts.CFProtectionBranch = 1;
1127
10
    } else if (Name == "return")
1128
1
      Opts.CFProtectionReturn = 1;
1129
9
    else if (Name == "branch")
1130
9
      Opts.CFProtectionBranch = 1;
1131
0
    else if (Name != "none") {
1132
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Name;
1133
0
      Success = false;
1134
0
    }
1135
15
  }
1136
1137
64.8k
  for (auto *A :
1138
14
       Args.filtered(OPT_mlink_bitcode_file, OPT_mlink_builtin_bitcode)) {
1139
14
    CodeGenOptions::BitcodeFileToLink F;
1140
14
    F.Filename = A->getValue();
1141
14
    if (A->getOption().matches(OPT_mlink_builtin_bitcode)) {
1142
8
      F.LinkFlags = llvm::Linker::Flags::LinkOnlyNeeded;
1143
      // When linking CUDA bitcode, propagate function attributes so that
1144
      // e.g. libdevice gets fast-math attrs if we're building with fast-math.
1145
8
      F.PropagateAttrs = true;
1146
8
      F.Internalize = true;
1147
8
    }
1148
14
    Opts.LinkBitcodeFiles.push_back(F);
1149
14
  }
1150
1151
64.8k
  if (Args.getLastArg(OPT_femulated_tls) ||
1152
64.8k
      Args.getLastArg(OPT_fno_emulated_tls)) {
1153
3
    Opts.ExplicitEmulatedTLS = true;
1154
3
  }
1155
1156
64.8k
  if (Arg *A = Args.getLastArg(OPT_fdenormal_fp_math_EQ)) {
1157
12
    StringRef Val = A->getValue();
1158
12
    Opts.FPDenormalMode = llvm::parseDenormalFPAttribute(Val);
1159
12
    if (!Opts.FPDenormalMode.isValid())
1160
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
1161
12
  }
1162
1163
64.8k
  if (Arg *A = Args.getLastArg(OPT_fdenormal_fp_math_f32_EQ)) {
1164
11
    StringRef Val = A->getValue();
1165
11
    Opts.FP32DenormalMode = llvm::parseDenormalFPAttribute(Val);
1166
11
    if (!Opts.FP32DenormalMode.isValid())
1167
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
1168
11
  }
1169
1170
  // X86_32 has -fppc-struct-return and -freg-struct-return.
1171
  // PPC32 has -maix-struct-return and -msvr4-struct-return.
1172
64.8k
  if (Arg *A =
1173
16
          Args.getLastArg(OPT_fpcc_struct_return, OPT_freg_struct_return,
1174
16
                          OPT_maix_struct_return, OPT_msvr4_struct_return)) {
1175
    // TODO: We might want to consider enabling these options on AIX in the
1176
    // future.
1177
16
    if (T.isOSAIX())
1178
4
      Diags.Report(diag::err_drv_unsupported_opt_for_target)
1179
4
          << A->getSpelling() << T.str();
1180
1181
16
    const Option &O = A->getOption();
1182
16
    if (O.matches(OPT_fpcc_struct_return) ||
1183
13
        O.matches(OPT_maix_struct_return)) {
1184
8
      Opts.setStructReturnConvention(CodeGenOptions::SRCK_OnStack);
1185
8
    } else {
1186
8
      assert(O.matches(OPT_freg_struct_return) ||
1187
8
             O.matches(OPT_msvr4_struct_return));
1188
8
      Opts.setStructReturnConvention(CodeGenOptions::SRCK_InRegs);
1189
8
    }
1190
16
  }
1191
1192
64.8k
  if (T.isOSAIX() && 
(139
Args.hasArg(OPT_mignore_xcoff_visibility)139
||
1193
135
                      !Args.hasArg(OPT_fvisibility)))
1194
136
    Opts.IgnoreXCOFFVisibility = 1;
1195
1196
64.8k
  if (Arg *A =
1197
8
          Args.getLastArg(OPT_mabi_EQ_vec_default, OPT_mabi_EQ_vec_extabi)) {
1198
8
    if (!T.isOSAIX())
1199
0
      Diags.Report(diag::err_drv_unsupported_opt_for_target)
1200
0
          << A->getSpelling() << T.str();
1201
1202
8
    const Option &O = A->getOption();
1203
8
    if (O.matches(OPT_mabi_EQ_vec_default))
1204
2
      Diags.Report(diag::err_aix_default_altivec_abi)
1205
2
          << A->getSpelling() << T.str();
1206
6
    else {
1207
6
      assert(O.matches(OPT_mabi_EQ_vec_extabi));
1208
6
      Opts.EnableAIXExtendedAltivecABI = 1;
1209
6
    }
1210
8
  }
1211
1212
64.8k
  bool NeedLocTracking = false;
1213
1214
64.8k
  if (!Opts.OptRecordFile.empty())
1215
11
    NeedLocTracking = true;
1216
1217
64.8k
  if (Arg *A = Args.getLastArg(OPT_opt_record_passes)) {
1218
3
    Opts.OptRecordPasses = A->getValue();
1219
3
    NeedLocTracking = true;
1220
3
  }
1221
1222
64.8k
  if (Arg *A = Args.getLastArg(OPT_opt_record_format)) {
1223
4
    Opts.OptRecordFormat = A->getValue();
1224
4
    NeedLocTracking = true;
1225
4
  }
1226
1227
64.8k
  if (Arg *A = Args.getLastArg(OPT_Rpass_EQ)) {
1228
42
    Opts.OptimizationRemarkPattern =
1229
42
        GenerateOptimizationRemarkRegex(Diags, Args, A);
1230
42
    NeedLocTracking = true;
1231
42
  }
1232
1233
64.8k
  if (Arg *A = Args.getLastArg(OPT_Rpass_missed_EQ)) {
1234
16
    Opts.OptimizationRemarkMissedPattern =
1235
16
        GenerateOptimizationRemarkRegex(Diags, Args, A);
1236
16
    NeedLocTracking = true;
1237
16
  }
1238
1239
64.8k
  if (Arg *A = Args.getLastArg(OPT_Rpass_analysis_EQ)) {
1240
24
    Opts.OptimizationRemarkAnalysisPattern =
1241
24
        GenerateOptimizationRemarkRegex(Diags, Args, A);
1242
24
    NeedLocTracking = true;
1243
24
  }
1244
1245
64.8k
  bool UsingSampleProfile = !Opts.SampleProfileFile.empty();
1246
64.8k
  bool UsingProfile = UsingSampleProfile ||
1247
64.8k
      (Opts.getProfileUse() != CodeGenOptions::ProfileNone);
1248
1249
64.8k
  if (Opts.DiagnosticsWithHotness && 
!UsingProfile16
&&
1250
      // An IR file will contain PGO as metadata
1251
4
      IK.getLanguage() != Language::LLVM_IR)
1252
2
    Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo)
1253
2
        << "-fdiagnostics-show-hotness";
1254
1255
  // Parse remarks hotness threshold. Valid value is either integer or 'auto'.
1256
64.8k
  if (auto *arg =
1257
9
          Args.getLastArg(options::OPT_fdiagnostics_hotness_threshold_EQ)) {
1258
9
    auto ResultOrErr =
1259
9
        llvm::remarks::parseHotnessThresholdOption(arg->getValue());
1260
1261
9
    if (!ResultOrErr) {
1262
0
      Diags.Report(diag::err_drv_invalid_diagnotics_hotness_threshold)
1263
0
          << "-fdiagnostics-hotness-threshold=";
1264
9
    } else {
1265
9
      Opts.DiagnosticsHotnessThreshold = *ResultOrErr;
1266
9
      if ((!Opts.DiagnosticsHotnessThreshold.hasValue() ||
1267
8
           Opts.DiagnosticsHotnessThreshold.getValue() > 0) &&
1268
9
          !UsingProfile)
1269
2
        Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo)
1270
2
            << "-fdiagnostics-hotness-threshold=";
1271
9
    }
1272
9
  }
1273
1274
  // If the user requested to use a sample profile for PGO, then the
1275
  // backend will need to track source location information so the profile
1276
  // can be incorporated into the IR.
1277
64.8k
  if (UsingSampleProfile)
1278
16
    NeedLocTracking = true;
1279
1280
  // If the user requested a flag that requires source locations available in
1281
  // the backend, make sure that the backend tracks source location information.
1282
64.8k
  if (NeedLocTracking && 
Opts.getDebugInfo() == codegenoptions::NoDebugInfo69
)
1283
64
    Opts.setDebugInfo(codegenoptions::LocTrackingOnly);
1284
1285
  // Parse -fsanitize-recover= arguments.
1286
  // FIXME: Report unrecoverable sanitizers incorrectly specified here.
1287
64.8k
  parseSanitizerKinds("-fsanitize-recover=",
1288
64.8k
                      Args.getAllArgValues(OPT_fsanitize_recover_EQ), Diags,
1289
64.8k
                      Opts.SanitizeRecover);
1290
64.8k
  parseSanitizerKinds("-fsanitize-trap=",
1291
64.8k
                      Args.getAllArgValues(OPT_fsanitize_trap_EQ), Diags,
1292
64.8k
                      Opts.SanitizeTrap);
1293
1294
64.8k
  Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true);
1295
1296
64.8k
  return Success;
1297
64.8k
}
1298
1299
static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
1300
64.8k
                                      ArgList &Args) {
1301
64.8k
  if (Args.hasArg(OPT_show_includes)) {
1302
    // Writing both /showIncludes and preprocessor output to stdout
1303
    // would produce interleaved output, so use stderr for /showIncludes.
1304
    // This behaves the same as cl.exe, when /E, /EP or /P are passed.
1305
10
    if (Args.hasArg(options::OPT_E) || 
Args.hasArg(options::OPT_P)9
)
1306
1
      Opts.ShowIncludesDest = ShowIncludesDestination::Stderr;
1307
9
    else
1308
9
      Opts.ShowIncludesDest = ShowIncludesDestination::Stdout;
1309
64.8k
  } else {
1310
64.8k
    Opts.ShowIncludesDest = ShowIncludesDestination::None;
1311
64.8k
  }
1312
  // Add sanitizer blacklists as extra dependencies.
1313
  // They won't be discovered by the regular preprocessor, so
1314
  // we let make / ninja to know about this implicit dependency.
1315
64.8k
  if (!Args.hasArg(OPT_fno_sanitize_blacklist)) {
1316
33
    for (const auto *A : Args.filtered(OPT_fsanitize_blacklist)) {
1317
33
      StringRef Val = A->getValue();
1318
33
      if (Val.find('=') == StringRef::npos)
1319
33
        Opts.ExtraDeps.push_back(std::string(Val));
1320
33
    }
1321
64.8k
    if (Opts.IncludeSystemHeaders) {
1322
3
      for (const auto *A : Args.filtered(OPT_fsanitize_system_blacklist)) {
1323
3
        StringRef Val = A->getValue();
1324
3
        if (Val.find('=') == StringRef::npos)
1325
3
          Opts.ExtraDeps.push_back(std::string(Val));
1326
3
      }
1327
3.14k
    }
1328
64.8k
  }
1329
1330
  // Propagate the extra dependencies.
1331
4
  for (const auto *A : Args.filtered(OPT_fdepfile_entry)) {
1332
4
    Opts.ExtraDeps.push_back(A->getValue());
1333
4
  }
1334
1335
  // Only the -fmodule-file=<file> form.
1336
408
  for (const auto *A : Args.filtered(OPT_fmodule_file)) {
1337
408
    StringRef Val = A->getValue();
1338
408
    if (Val.find('=') == StringRef::npos)
1339
397
      Opts.ExtraDeps.push_back(std::string(Val));
1340
408
  }
1341
64.8k
}
1342
1343
105k
static bool parseShowColorsArgs(const ArgList &Args, bool DefaultColor) {
1344
  // Color diagnostics default to auto ("on" if terminal supports) in the driver
1345
  // but default to off in cc1, needing an explicit OPT_fdiagnostics_color.
1346
  // Support both clang's -f[no-]color-diagnostics and gcc's
1347
  // -f[no-]diagnostics-colors[=never|always|auto].
1348
105k
  enum {
1349
105k
    Colors_On,
1350
105k
    Colors_Off,
1351
105k
    Colors_Auto
1352
64.8k
  } ShowColors = DefaultColor ? 
Colors_Auto40.5k
: Colors_Off;
1353
2.47M
  for (auto *A : Args) {
1354
2.47M
    const Option &O = A->getOption();
1355
2.47M
    if (O.matches(options::OPT_fcolor_diagnostics) ||
1356
2.47M
        O.matches(options::OPT_fdiagnostics_color)) {
1357
20
      ShowColors = Colors_On;
1358
2.47M
    } else if (O.matches(options::OPT_fno_color_diagnostics) ||
1359
2.47M
               O.matches(options::OPT_fno_diagnostics_color)) {
1360
12
      ShowColors = Colors_Off;
1361
2.47M
    } else if (O.matches(options::OPT_fdiagnostics_color_EQ)) {
1362
6
      StringRef Value(A->getValue());
1363
6
      if (Value == "always")
1364
2
        ShowColors = Colors_On;
1365
4
      else if (Value == "never")
1366
1
        ShowColors = Colors_Off;
1367
3
      else if (Value == "auto")
1368
2
        ShowColors = Colors_Auto;
1369
6
    }
1370
2.47M
  }
1371
105k
  return ShowColors == Colors_On ||
1372
105k
         (ShowColors == Colors_Auto &&
1373
40.5k
          llvm::sys::Process::StandardErrHasColors());
1374
105k
}
1375
1376
static bool checkVerifyPrefixes(const std::vector<std::string> &VerifyPrefixes,
1377
105k
                                DiagnosticsEngine &Diags) {
1378
105k
  bool Success = true;
1379
18.3k
  for (const auto &Prefix : VerifyPrefixes) {
1380
    // Every prefix must start with a letter and contain only alphanumeric
1381
    // characters, hyphens, and underscores.
1382
142k
    auto BadChar = llvm::find_if(Prefix, [](char C) {
1383
142k
      return !isAlphanumeric(C) && 
C != '-'89
&&
C != '_'7
;
1384
142k
    });
1385
18.3k
    if (BadChar != Prefix.end() || 
!isLetter(Prefix[0])18.3k
) {
1386
6
      Success = false;
1387
6
      Diags.Report(diag::err_drv_invalid_value) << "-verify=" << Prefix;
1388
6
      Diags.Report(diag::note_drv_verify_prefix_spelling);
1389
6
    }
1390
18.3k
  }
1391
105k
  return Success;
1392
105k
}
1393
1394
bool CompilerInvocation::parseSimpleArgs(const ArgList &Args,
1395
64.8k
                                         DiagnosticsEngine &Diags) {
1396
64.8k
  bool Success = true;
1397
1398
64.8k
#define OPTION_WITH_MARSHALLING(                                               \
1399
64.8k
    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
1400
64.8k
    HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH,   \
1401
64.8k
    DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER,     \
1402
64.8k
    MERGER, EXTRACTOR, TABLE_INDEX)                                            \
1403
9.79M
  PARSE_OPTION_WITH_MARSHALLING(Args, Diags, Success, ID, FLAGS, PARAM,        \
1404
9.79M
                                SHOULD_PARSE, this->KEYPATH, DEFAULT_VALUE,    \
1405
9.79M
                                IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER,      \
1406
9.79M
                                MERGER, TABLE_INDEX)
1407
64.8k
#include "clang/Driver/Options.inc"
1408
64.8k
#undef OPTION_WITH_MARSHALLING
1409
1410
64.8k
  return Success;
1411
64.8k
}
1412
1413
bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
1414
                                DiagnosticsEngine *Diags,
1415
105k
                                bool DefaultDiagColor) {
1416
105k
  Optional<DiagnosticsEngine> IgnoringDiags;
1417
105k
  if (!Diags) {
1418
40.5k
    IgnoringDiags.emplace(new DiagnosticIDs(), new DiagnosticOptions(),
1419
40.5k
                          new IgnoringDiagConsumer());
1420
40.5k
    Diags = &*IgnoringDiags;
1421
40.5k
  }
1422
1423
  // The key paths of diagnostic options defined in Options.td start with
1424
  // "DiagnosticOpts->". Let's provide the expected variable name and type.
1425
105k
  DiagnosticOptions *DiagnosticOpts = &Opts;
1426
105k
  bool Success = true;
1427
1428
105k
#define DIAG_OPTION_WITH_MARSHALLING(                                          \
1429
105k
    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
1430
105k
    HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH,   \
1431
105k
    DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER,     \
1432
105k
    MERGER, EXTRACTOR, TABLE_INDEX)                                            \
1433
3.79M
  PARSE_OPTION_WITH_MARSHALLING(Args, *Diags, Success, ID, FLAGS, PARAM,       \
1434
3.79M
                                SHOULD_PARSE, KEYPATH, DEFAULT_VALUE,          \
1435
3.79M
                                IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER,      \
1436
3.79M
                                MERGER, TABLE_INDEX)
1437
105k
#include "clang/Driver/Options.inc"
1438
105k
#undef DIAG_OPTION_WITH_MARSHALLING
1439
1440
105k
  llvm::sys::Process::UseANSIEscapeCodes(Opts.UseANSIEscapeCodes);
1441
1442
105k
  if (Arg *A =
1443
26
          Args.getLastArg(OPT_diagnostic_serialized_file, OPT__serialize_diags))
1444
26
    Opts.DiagnosticSerializationFile = A->getValue();
1445
105k
  Opts.ShowColors = parseShowColorsArgs(Args, DefaultDiagColor);
1446
1447
105k
  if (Args.getLastArgValue(OPT_fdiagnostics_format) == "msvc-fallback")
1448
5
    Opts.CLFallbackMode = true;
1449
1450
105k
  Opts.VerifyDiagnostics = Args.hasArg(OPT_verify) || 
Args.hasArg(OPT_verify_EQ)89.8k
;
1451
105k
  if (Args.hasArg(OPT_verify))
1452
15.6k
    Opts.VerifyPrefixes.push_back("expected");
1453
  // Keep VerifyPrefixes in its original order for the sake of diagnostics, and
1454
  // then sort it to prepare for fast lookup using std::binary_search.
1455
105k
  if (!checkVerifyPrefixes(Opts.VerifyPrefixes, *Diags)) {
1456
2
    Opts.VerifyDiagnostics = false;
1457
2
    Success = false;
1458
2
  }
1459
105k
  else
1460
105k
    llvm::sort(Opts.VerifyPrefixes);
1461
105k
  DiagnosticLevelMask DiagMask = DiagnosticLevelMask::None;
1462
105k
  Success &= parseDiagnosticLevelMask("-verify-ignore-unexpected=",
1463
105k
    Args.getAllArgValues(OPT_verify_ignore_unexpected_EQ),
1464
105k
    *Diags, DiagMask);
1465
105k
  if (Args.hasArg(OPT_verify_ignore_unexpected))
1466
3
    DiagMask = DiagnosticLevelMask::All;
1467
105k
  Opts.setVerifyIgnoreUnexpected(DiagMask);
1468
105k
  if (Opts.TabStop == 0 || 
Opts.TabStop > DiagnosticOptions::MaxTabStop105k
) {
1469
0
    Opts.TabStop = DiagnosticOptions::DefaultTabStop;
1470
0
    Diags->Report(diag::warn_ignoring_ftabstop_value)
1471
0
        << Opts.TabStop << DiagnosticOptions::DefaultTabStop;
1472
0
  }
1473
1474
105k
  addDiagnosticArgs(Args, OPT_W_Group, OPT_W_value_Group, Opts.Warnings);
1475
105k
  addDiagnosticArgs(Args, OPT_R_Group, OPT_R_value_Group, Opts.Remarks);
1476
1477
105k
  return Success;
1478
105k
}
1479
1480
/// Parse the argument to the -ftest-module-file-extension
1481
/// command-line argument.
1482
///
1483
/// \returns true on error, false on success.
1484
static bool parseTestModuleFileExtensionArg(StringRef Arg,
1485
                                            std::string &BlockName,
1486
                                            unsigned &MajorVersion,
1487
                                            unsigned &MinorVersion,
1488
                                            bool &Hashed,
1489
16
                                            std::string &UserInfo) {
1490
16
  SmallVector<StringRef, 5> Args;
1491
16
  Arg.split(Args, ':', 5);
1492
16
  if (Args.size() < 5)
1493
0
    return true;
1494
1495
16
  BlockName = std::string(Args[0]);
1496
16
  if (Args[1].getAsInteger(10, MajorVersion)) 
return true0
;
1497
16
  if (Args[2].getAsInteger(10, MinorVersion)) 
return true0
;
1498
16
  if (Args[3].getAsInteger(2, Hashed)) 
return true0
;
1499
16
  if (Args.size() > 4)
1500
16
    UserInfo = std::string(Args[4]);
1501
16
  return false;
1502
16
}
1503
1504
static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
1505
                                   DiagnosticsEngine &Diags,
1506
64.8k
                                   bool &IsHeaderFile) {
1507
64.8k
  Opts.ProgramAction = frontend::ParseSyntaxOnly;
1508
64.8k
  if (const Arg *A = Args.getLastArg(OPT_Action_Group)) {
1509
60.2k
    switch (A->getOption().getID()) {
1510
0
    default:
1511
0
      llvm_unreachable("Invalid option in group!");
1512
0
    case OPT_ast_list:
1513
0
      Opts.ProgramAction = frontend::ASTDeclList; break;
1514
0
    case OPT_ast_dump_all_EQ:
1515
50
    case OPT_ast_dump_EQ: {
1516
50
      unsigned Val = llvm::StringSwitch<unsigned>(A->getValue())
1517
50
                         .CaseLower("default", ADOF_Default)
1518
50
                         .CaseLower("json", ADOF_JSON)
1519
50
                         .Default(std::numeric_limits<unsigned>::max());
1520
1521
50
      if (Val != std::numeric_limits<unsigned>::max())
1522
50
        Opts.ASTDumpFormat = static_cast<ASTDumpOutputFormat>(Val);
1523
0
      else {
1524
0
        Diags.Report(diag::err_drv_invalid_value)
1525
0
            << A->getAsString(Args) << A->getValue();
1526
0
        Opts.ASTDumpFormat = ADOF_Default;
1527
0
      }
1528
50
      LLVM_FALLTHROUGH;
1529
50
    }
1530
335
    case OPT_ast_dump:
1531
403
    case OPT_ast_dump_all:
1532
409
    case OPT_ast_dump_lookups:
1533
410
    case OPT_ast_dump_decl_types:
1534
410
      Opts.ProgramAction = frontend::ASTDump; break;
1535
532
    case OPT_ast_print:
1536
532
      Opts.ProgramAction = frontend::ASTPrint; break;
1537
0
    case OPT_ast_view:
1538
0
      Opts.ProgramAction = frontend::ASTView; break;
1539
3
    case OPT_compiler_options_dump:
1540
3
      Opts.ProgramAction = frontend::DumpCompilerOptions; break;
1541
0
    case OPT_dump_raw_tokens:
1542
0
      Opts.ProgramAction = frontend::DumpRawTokens; break;
1543
3
    case OPT_dump_tokens:
1544
3
      Opts.ProgramAction = frontend::DumpTokens; break;
1545
588
    case OPT_S:
1546
588
      Opts.ProgramAction = frontend::EmitAssembly; break;
1547
570
    case OPT_emit_llvm_bc:
1548
570
      Opts.ProgramAction = frontend::EmitBC; break;
1549
3
    case OPT_emit_html:
1550
3
      Opts.ProgramAction = frontend::EmitHTML; break;
1551
13.1k
    case OPT_emit_llvm:
1552
13.1k
      Opts.ProgramAction = frontend::EmitLLVM; break;
1553
243
    case OPT_emit_llvm_only:
1554
243
      Opts.ProgramAction = frontend::EmitLLVMOnly; break;
1555
3
    case OPT_emit_codegen_only:
1556
3
      Opts.ProgramAction = frontend::EmitCodeGenOnly; break;
1557
3.44k
    case OPT_emit_obj:
1558
3.44k
      Opts.ProgramAction = frontend::EmitObj; break;
1559
1
    case OPT_fixit_EQ:
1560
1
      Opts.FixItSuffix = A->getValue();
1561
1
      LLVM_FALLTHROUGH;
1562
63
    case OPT_fixit:
1563
63
      Opts.ProgramAction = frontend::FixIt; break;
1564
201
    case OPT_emit_module:
1565
201
      Opts.ProgramAction = frontend::GenerateModule; break;
1566
49
    case OPT_emit_module_interface:
1567
49
      Opts.ProgramAction = frontend::GenerateModuleInterface; break;
1568
6
    case OPT_emit_header_module:
1569
6
      Opts.ProgramAction = frontend::GenerateHeaderModule; break;
1570
3.10k
    case OPT_emit_pch:
1571
3.10k
      Opts.ProgramAction = frontend::GeneratePCH; break;
1572
77
    case OPT_emit_interface_stubs: {
1573
77
      StringRef ArgStr =
1574
77
          Args.hasArg(OPT_interface_stub_version_EQ)
1575
28
              ? Args.getLastArgValue(OPT_interface_stub_version_EQ)
1576
49
              : "experimental-ifs-v2";
1577
77
      if (ArgStr == "experimental-yaml-elf-v1" ||
1578
75
          ArgStr == "experimental-ifs-v1" ||
1579
74
          ArgStr == "experimental-tapi-elf-v1") {
1580
5
        std::string ErrorMessage =
1581
5
            "Invalid interface stub format: " + ArgStr.str() +
1582
5
            " is deprecated.";
1583
5
        Diags.Report(diag::err_drv_invalid_value)
1584
5
            << "Must specify a valid interface stub format type, ie: "
1585
5
               "-interface-stub-version=experimental-ifs-v2"
1586
5
            << ErrorMessage;
1587
72
      } else if (!ArgStr.startswith("experimental-ifs-")) {
1588
2
        std::string ErrorMessage =
1589
2
            "Invalid interface stub format: " + ArgStr.str() + ".";
1590
2
        Diags.Report(diag::err_drv_invalid_value)
1591
2
            << "Must specify a valid interface stub format type, ie: "
1592
2
               "-interface-stub-version=experimental-ifs-v2"
1593
2
            << ErrorMessage;
1594
70
      } else {
1595
70
        Opts.ProgramAction = frontend::GenerateInterfaceStubs;
1596
70
      }
1597
77
      break;
1598
1
    }
1599
0
    case OPT_init_only:
1600
0
      Opts.ProgramAction = frontend::InitOnly; break;
1601
34.1k
    case OPT_fsyntax_only:
1602
34.1k
      Opts.ProgramAction = frontend::ParseSyntaxOnly; break;
1603
5
    case OPT_module_file_info:
1604
5
      Opts.ProgramAction = frontend::ModuleFileInfo; break;
1605
7
    case OPT_verify_pch:
1606
7
      Opts.ProgramAction = frontend::VerifyPCH; break;
1607
2
    case OPT_print_preamble:
1608
2
      Opts.ProgramAction = frontend::PrintPreamble; break;
1609
2.03k
    case OPT_E:
1610
2.03k
      Opts.ProgramAction = frontend::PrintPreprocessedInput; break;
1611
11
    case OPT_templight_dump:
1612
11
      Opts.ProgramAction = frontend::TemplightDump; break;
1613
1
    case OPT_rewrite_macros:
1614
1
      Opts.ProgramAction = frontend::RewriteMacros; break;
1615
164
    case OPT_rewrite_objc:
1616
164
      Opts.ProgramAction = frontend::RewriteObjC; break;
1617
0
    case OPT_rewrite_test:
1618
0
      Opts.ProgramAction = frontend::RewriteTest; break;
1619
1.33k
    case OPT_analyze:
1620
1.33k
      Opts.ProgramAction = frontend::RunAnalysis; break;
1621
8
    case OPT_migrate:
1622
8
      Opts.ProgramAction = frontend::MigrateSource; break;
1623
119
    case OPT_Eonly:
1624
119
      Opts.ProgramAction = frontend::RunPreprocessorOnly; break;
1625
7
    case OPT_print_dependency_directives_minimized_source:
1626
7
      Opts.ProgramAction =
1627
7
          frontend::PrintDependencyDirectivesSourceMinimizerOutput;
1628
7
      break;
1629
64.8k
    }
1630
64.8k
  }
1631
1632
64.8k
  if (const Arg* A = Args.getLastArg(OPT_plugin)) {
1633
1
    Opts.Plugins.emplace_back(A->getValue(0));
1634
1
    Opts.ProgramAction = frontend::PluginAction;
1635
1
    Opts.ActionName = A->getValue();
1636
1
  }
1637
64.8k
  for (const auto *AA : Args.filtered(OPT_plugin_arg))
1638
0
    Opts.PluginArgs[AA->getValue(0)].emplace_back(AA->getValue(1));
1639
1640
64.8k
  for (const std::string &Arg :
1641
16
         Args.getAllArgValues(OPT_ftest_module_file_extension_EQ)) {
1642
16
    std::string BlockName;
1643
16
    unsigned MajorVersion;
1644
16
    unsigned MinorVersion;
1645
16
    bool Hashed;
1646
16
    std::string UserInfo;
1647
16
    if (parseTestModuleFileExtensionArg(Arg, BlockName, MajorVersion,
1648
0
                                        MinorVersion, Hashed, UserInfo)) {
1649
0
      Diags.Report(diag::err_test_module_file_extension_format) << Arg;
1650
1651
0
      continue;
1652
0
    }
1653
1654
    // Add the testing module file extension.
1655
16
    Opts.ModuleFileExtensions.push_back(
1656
16
        std::make_shared<TestModuleFileExtension>(
1657
16
            BlockName, MajorVersion, MinorVersion, Hashed, UserInfo));
1658
16
  }
1659
1660
64.8k
  if (const Arg *A = Args.getLastArg(OPT_code_completion_at)) {
1661
269
    Opts.CodeCompletionAt =
1662
269
      ParsedSourceLocation::FromString(A->getValue());
1663
269
    if (Opts.CodeCompletionAt.FileName.empty())
1664
0
      Diags.Report(diag::err_drv_invalid_value)
1665
0
        << A->getAsString(Args) << A->getValue();
1666
269
  }
1667
1668
64.8k
  Opts.Plugins = Args.getAllArgValues(OPT_load);
1669
64.8k
  Opts.ASTDumpDecls = Args.hasArg(OPT_ast_dump, OPT_ast_dump_EQ);
1670
64.8k
  Opts.ASTDumpAll = Args.hasArg(OPT_ast_dump_all, OPT_ast_dump_all_EQ);
1671
  // Only the -fmodule-file=<file> form.
1672
408
  for (const auto *A : Args.filtered(OPT_fmodule_file)) {
1673
408
    StringRef Val = A->getValue();
1674
408
    if (Val.find('=') == StringRef::npos)
1675
397
      Opts.ModuleFiles.push_back(std::string(Val));
1676
408
  }
1677
1678
64.8k
  if (Opts.ProgramAction != frontend::GenerateModule && 
Opts.IsSystemModule64.6k
)
1679
1
    Diags.Report(diag::err_drv_argument_only_allowed_with) << "-fsystem-module"
1680
1
                                                           << "-emit-module";
1681
1682
64.8k
  if (Args.hasArg(OPT_aux_target_cpu))
1683
30
    Opts.AuxTargetCPU = std::string(Args.getLastArgValue(OPT_aux_target_cpu));
1684
64.8k
  if (Args.hasArg(OPT_aux_target_feature))
1685
1
    Opts.AuxTargetFeatures = Args.getAllArgValues(OPT_aux_target_feature);
1686
1687
64.8k
  if (Opts.ARCMTAction != FrontendOptions::ARCMT_None &&
1688
25
      Opts.ObjCMTAction != FrontendOptions::ObjCMT_None) {
1689
0
    Diags.Report(diag::err_drv_argument_not_allowed_with)
1690
0
      << "ARC migration" << "ObjC migration";
1691
0
  }
1692
1693
64.8k
  InputKind DashX(Language::Unknown);
1694
64.8k
  if (const Arg *A = Args.getLastArg(OPT_x)) {
1695
43.4k
    StringRef XValue = A->getValue();
1696
1697
    // Parse suffixes: '<lang>(-header|[-module-map][-cpp-output])'.
1698
    // FIXME: Supporting '<lang>-header-cpp-output' would be useful.
1699
43.4k
    bool Preprocessed = XValue.consume_back("-cpp-output");
1700
43.4k
    bool ModuleMap = XValue.consume_back("-module-map");
1701
43.4k
    IsHeaderFile = !Preprocessed && 
!ModuleMap43.4k
&&
1702
43.4k
                   XValue != "precompiled-header" &&
1703
43.4k
                   XValue.consume_back("-header");
1704
1705
    // Principal languages.
1706
43.4k
    DashX = llvm::StringSwitch<InputKind>(XValue)
1707
43.4k
                .Case("c", Language::C)
1708
43.4k
                .Case("cl", Language::OpenCL)
1709
43.4k
                .Case("cuda", Language::CUDA)
1710
43.4k
                .Case("hip", Language::HIP)
1711
43.4k
                .Case("c++", Language::CXX)
1712
43.4k
                .Case("objective-c", Language::ObjC)
1713
43.4k
                .Case("objective-c++", Language::ObjCXX)
1714
43.4k
                .Case("renderscript", Language::RenderScript)
1715
43.4k
                .Default(Language::Unknown);
1716
1717
    // "objc[++]-cpp-output" is an acceptable synonym for
1718
    // "objective-c[++]-cpp-output".
1719
43.4k
    if (DashX.isUnknown() && 
Preprocessed170
&&
!IsHeaderFile2
&&
!ModuleMap2
)
1720
2
      DashX = llvm::StringSwitch<InputKind>(XValue)
1721
2
                  .Case("objc", Language::ObjC)
1722
2
                  .Case("objc++", Language::ObjCXX)
1723
2
                  .Default(Language::Unknown);
1724
1725
    // Some special cases cannot be combined with suffixes.
1726
43.4k
    if (DashX.isUnknown() && 
!Preprocessed168
&&
!ModuleMap168
&&
!IsHeaderFile168
)
1727
168
      DashX = llvm::StringSwitch<InputKind>(XValue)
1728
168
                  .Case("cpp-output", InputKind(Language::C).getPreprocessed())
1729
168
                  .Case("assembler-with-cpp", Language::Asm)
1730
168
                  .Cases("ast", "pcm", "precompiled-header",
1731
168
                         InputKind(Language::Unknown, InputKind::Precompiled))
1732
168
                  .Case("ir", Language::LLVM_IR)
1733
168
                  .Default(Language::Unknown);
1734
1735
43.4k
    if (DashX.isUnknown())
1736
0
      Diags.Report(diag::err_drv_invalid_value)
1737
0
        << A->getAsString(Args) << A->getValue();
1738
1739
43.4k
    if (Preprocessed)
1740
20
      DashX = DashX.getPreprocessed();
1741
43.4k
    if (ModuleMap)
1742
26
      DashX = DashX.withFormat(InputKind::ModuleMap);
1743
43.4k
  }
1744
1745
  // '-' is the default input if none is given.
1746
64.8k
  std::vector<std::string> Inputs = Args.getAllArgValues(OPT_INPUT);
1747
64.8k
  Opts.Inputs.clear();
1748
64.8k
  if (Inputs.empty())
1749
769
    Inputs.push_back("-");
1750
129k
  for (unsigned i = 0, e = Inputs.size(); i != e; 
++i64.8k
) {
1751
64.8k
    InputKind IK = DashX;
1752
64.8k
    if (IK.isUnknown()) {
1753
21.3k
      IK = FrontendOptions::getInputKindForExtension(
1754
21.3k
        StringRef(Inputs[i]).rsplit('.').second);
1755
      // FIXME: Warn on this?
1756
21.3k
      if (IK.isUnknown())
1757
733
        IK = Language::C;
1758
      // FIXME: Remove this hack.
1759
21.3k
      if (i == 0)
1760
21.3k
        DashX = IK;
1761
21.3k
    }
1762
1763
64.8k
    bool IsSystem = false;
1764
1765
    // The -emit-module action implicitly takes a module map.
1766
64.8k
    if (Opts.ProgramAction == frontend::GenerateModule &&
1767
201
        IK.getFormat() == InputKind::Source) {
1768
186
      IK = IK.withFormat(InputKind::ModuleMap);
1769
186
      IsSystem = Opts.IsSystemModule;
1770
186
    }
1771
1772
64.8k
    Opts.Inputs.emplace_back(std::move(Inputs[i]), IK, IsSystem);
1773
64.8k
  }
1774
1775
64.8k
  return DashX;
1776
64.8k
}
1777
1778
std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
1779
32.2k
                                                 void *MainAddr) {
1780
32.2k
  std::string ClangExecutable =
1781
32.2k
      llvm::sys::fs::getMainExecutable(Argv0, MainAddr);
1782
32.2k
  return Driver::GetResourcesPath(ClangExecutable, CLANG_RESOURCE_DIR);
1783
32.2k
}
1784
1785
static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
1786
64.8k
                                  const std::string &WorkingDir) {
1787
64.8k
  if (const Arg *A = Args.getLastArg(OPT_stdlib_EQ))
1788
10.8k
    Opts.UseLibcxx = (strcmp(A->getValue(), "libc++") == 0);
1789
1790
  // Canonicalize -fmodules-cache-path before storing it.
1791
64.8k
  SmallString<128> P(Args.getLastArgValue(OPT_fmodules_cache_path));
1792
64.8k
  if (!(P.empty() || 
llvm::sys::path::is_absolute(P)3.19k
)) {
1793
5
    if (WorkingDir.empty())
1794
4
      llvm::sys::fs::make_absolute(P);
1795
1
    else
1796
1
      llvm::sys::fs::make_absolute(WorkingDir, P);
1797
5
  }
1798
64.8k
  llvm::sys::path::remove_dots(P);
1799
64.8k
  Opts.ModuleCachePath = std::string(P.str());
1800
1801
  // Only the -fmodule-file=<name>=<file> form.
1802
408
  for (const auto *A : Args.filtered(OPT_fmodule_file)) {
1803
408
    StringRef Val = A->getValue();
1804
408
    if (Val.find('=') != StringRef::npos){
1805
11
      auto Split = Val.split('=');
1806
11
      Opts.PrebuiltModuleFiles.insert(
1807
11
          {std::string(Split.first), std::string(Split.second)});
1808
11
    }
1809
408
  }
1810
64.8k
  for (const auto *A : Args.filtered(OPT_fprebuilt_module_path))
1811
10
    Opts.AddPrebuiltModulePath(A->getValue());
1812
1813
25
  for (const auto *A : Args.filtered(OPT_fmodules_ignore_macro)) {
1814
25
    StringRef MacroDef = A->getValue();
1815
25
    Opts.ModulesIgnoreMacros.insert(
1816
25
        llvm::CachedHashString(MacroDef.split('=').first));
1817
25
  }
1818
1819
  // Add -I..., -F..., and -index-header-map options in order.
1820
64.8k
  bool IsIndexHeaderMap = false;
1821
64.8k
  bool IsSysrootSpecified =
1822
64.8k
      Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot);
1823
10.7k
  for (const auto *A : Args.filtered(OPT_I, OPT_F, OPT_index_header_map)) {
1824
10.7k
    if (A->getOption().matches(OPT_index_header_map)) {
1825
      // -index-header-map applies to the next -I or -F.
1826
0
      IsIndexHeaderMap = true;
1827
0
      continue;
1828
0
    }
1829
1830
10.7k
    frontend::IncludeDirGroup Group =
1831
10.7k
        IsIndexHeaderMap ? 
frontend::IndexHeaderMap0
: frontend::Angled;
1832
1833
10.7k
    bool IsFramework = A->getOption().matches(OPT_F);
1834
10.7k
    std::string Path = A->getValue();
1835
1836
10.7k
    if (IsSysrootSpecified && 
!IsFramework9.42k
&&
A->getValue()[0] == '='9.38k
) {
1837
4
      SmallString<32> Buffer;
1838
4
      llvm::sys::path::append(Buffer, Opts.Sysroot,
1839
4
                              llvm::StringRef(A->getValue()).substr(1));
1840
4
      Path = std::string(Buffer.str());
1841
4
    }
1842
1843
10.7k
    Opts.AddPath(Path, Group, IsFramework,
1844
10.7k
                 /*IgnoreSysroot*/ true);
1845
10.7k
    IsIndexHeaderMap = false;
1846
10.7k
  }
1847
1848
  // Add -iprefix/-iwithprefix/-iwithprefixbefore options.
1849
64.8k
  StringRef Prefix = ""; // FIXME: This isn't the correct default prefix.
1850
64.8k
  for (const auto *A :
1851
32
       Args.filtered(OPT_iprefix, OPT_iwithprefix, OPT_iwithprefixbefore)) {
1852
32
    if (A->getOption().matches(OPT_iprefix))
1853
11
      Prefix = A->getValue();
1854
21
    else if (A->getOption().matches(OPT_iwithprefix))
1855
11
      Opts.AddPath(Prefix.str() + A->getValue(), frontend::After, false, true);
1856
10
    else
1857
10
      Opts.AddPath(Prefix.str() + A->getValue(), frontend::Angled, false, true);
1858
32
  }
1859
1860
64.8k
  for (const auto *A : Args.filtered(OPT_idirafter))
1861
10
    Opts.AddPath(A->getValue(), frontend::After, false, true);
1862
64.8k
  for (const auto *A : Args.filtered(OPT_iquote))
1863
41
    Opts.AddPath(A->getValue(), frontend::Quoted, false, true);
1864
64.8k
  for (const auto *A : Args.filtered(OPT_isystem, OPT_iwithsysroot))
1865
138
    Opts.AddPath(A->getValue(), frontend::System, false,
1866
138
                 !A->getOption().matches(OPT_iwithsysroot));
1867
64.8k
  for (const auto *A : Args.filtered(OPT_iframework))
1868
7
    Opts.AddPath(A->getValue(), frontend::System, true, true);
1869
64.8k
  for (const auto *A : Args.filtered(OPT_iframeworkwithsysroot))
1870
1
    Opts.AddPath(A->getValue(), frontend::System, /*IsFramework=*/true,
1871
1
                 /*IgnoreSysRoot=*/false);
1872
1873
  // Add the paths for the various language specific isystem flags.
1874
64.8k
  for (const auto *A : Args.filtered(OPT_c_isystem))
1875
2
    Opts.AddPath(A->getValue(), frontend::CSystem, false, true);
1876
64.8k
  for (const auto *A : Args.filtered(OPT_cxx_isystem))
1877
4
    Opts.AddPath(A->getValue(), frontend::CXXSystem, false, true);
1878
64.8k
  for (const auto *A : Args.filtered(OPT_objc_isystem))
1879
3
    Opts.AddPath(A->getValue(), frontend::ObjCSystem, false,true);
1880
64.8k
  for (const auto *A : Args.filtered(OPT_objcxx_isystem))
1881
2
    Opts.AddPath(A->getValue(), frontend::ObjCXXSystem, false, true);
1882
1883
  // Add the internal paths from a driver that detects standard include paths.
1884
64.8k
  for (const auto *A :
1885
90.7k
       Args.filtered(OPT_internal_isystem, OPT_internal_externc_isystem)) {
1886
90.7k
    frontend::IncludeDirGroup Group = frontend::System;
1887
90.7k
    if (A->getOption().matches(OPT_internal_externc_isystem))
1888
17.5k
      Group = frontend::ExternCSystem;
1889
90.7k
    Opts.AddPath(A->getValue(), Group, false, true);
1890
90.7k
  }
1891
1892
  // Add the path prefixes which are implicitly treated as being system headers.
1893
64.8k
  for (const auto *A :
1894
64.8k
       Args.filtered(OPT_system_header_prefix, OPT_no_system_header_prefix))
1895
4
    Opts.AddSystemHeaderPrefix(
1896
4
        A->getValue(), A->getOption().matches(OPT_system_header_prefix));
1897
1898
64.8k
  for (const auto *A : Args.filtered(OPT_ivfsoverlay))
1899
70
    Opts.AddVFSOverlayFile(A->getValue());
1900
64.8k
}
1901
1902
void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
1903
                                         const llvm::Triple &T,
1904
                                         std::vector<std::string> &Includes,
1905
64.6k
                                         LangStandard::Kind LangStd) {
1906
  // Set some properties which depend solely on the input kind; it would be nice
1907
  // to move these to the language standard, and have the driver resolve the
1908
  // input kind + language standard.
1909
  //
1910
  // FIXME: Perhaps a better model would be for a single source file to have
1911
  // multiple language standards (C / C++ std, ObjC std, OpenCL std, OpenMP std)
1912
  // simultaneously active?
1913
64.6k
  if (IK.getLanguage() == Language::Asm) {
1914
40
    Opts.AsmPreprocessor = 1;
1915
64.6k
  } else if (IK.isObjectiveC()) {
1916
6.13k
    Opts.ObjC = 1;
1917
6.13k
  }
1918
1919
64.6k
  if (LangStd == LangStandard::lang_unspecified) {
1920
    // Based on the base language, pick one.
1921
28.3k
    switch (IK.getLanguage()) {
1922
0
    case Language::Unknown:
1923
0
    case Language::LLVM_IR:
1924
0
      llvm_unreachable("Invalid input kind!");
1925
338
    case Language::OpenCL:
1926
338
      LangStd = LangStandard::lang_opencl10;
1927
338
      break;
1928
200
    case Language::CUDA:
1929
200
      LangStd = LangStandard::lang_cuda;
1930
200
      break;
1931
39
    case Language::Asm:
1932
11.1k
    case Language::C:
1933
#if defined(CLANG_DEFAULT_STD_C)
1934
      LangStd = CLANG_DEFAULT_STD_C;
1935
#else
1936
      // The PS4 uses C99 as the default C standard.
1937
11.1k
      if (T.isPS4())
1938
17
        LangStd = LangStandard::lang_gnu99;
1939
11.1k
      else
1940
11.1k
        LangStd = LangStandard::lang_gnu17;
1941
11.1k
#endif
1942
11.1k
      break;
1943
3.93k
    case Language::ObjC:
1944
#if defined(CLANG_DEFAULT_STD_C)
1945
      LangStd = CLANG_DEFAULT_STD_C;
1946
#else
1947
3.93k
      LangStd = LangStandard::lang_gnu11;
1948
3.93k
#endif
1949
3.93k
      break;
1950
10.6k
    case Language::CXX:
1951
12.6k
    case Language::ObjCXX:
1952
#if defined(CLANG_DEFAULT_STD_CXX)
1953
      LangStd = CLANG_DEFAULT_STD_CXX;
1954
#else
1955
12.6k
      LangStd = LangStandard::lang_gnucxx14;
1956
12.6k
#endif
1957
12.6k
      break;
1958
4
    case Language::RenderScript:
1959
4
      LangStd = LangStandard::lang_c99;
1960
4
      break;
1961
65
    case Language::HIP:
1962
65
      LangStd = LangStandard::lang_hip;
1963
65
      break;
1964
64.6k
    }
1965
64.6k
  }
1966
1967
64.6k
  const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd);
1968
64.6k
  Opts.LineComment = Std.hasLineComments();
1969
64.6k
  Opts.C99 = Std.isC99();
1970
64.6k
  Opts.C11 = Std.isC11();
1971
64.6k
  Opts.C17 = Std.isC17();
1972
64.6k
  Opts.C2x = Std.isC2x();
1973
64.6k
  Opts.CPlusPlus = Std.isCPlusPlus();
1974
64.6k
  Opts.CPlusPlus11 = Std.isCPlusPlus11();
1975
64.6k
  Opts.CPlusPlus14 = Std.isCPlusPlus14();
1976
64.6k
  Opts.CPlusPlus17 = Std.isCPlusPlus17();
1977
64.6k
  Opts.CPlusPlus20 = Std.isCPlusPlus20();
1978
64.6k
  Opts.CPlusPlus2b = Std.isCPlusPlus2b();
1979
64.6k
  Opts.Digraphs = Std.hasDigraphs();
1980
64.6k
  Opts.GNUMode = Std.isGNUMode();
1981
64.6k
  Opts.GNUInline = !Opts.C99 && 
!Opts.CPlusPlus47.4k
;
1982
64.6k
  Opts.GNUCVersion = 0;
1983
64.6k
  Opts.HexFloats = Std.hasHexFloats();
1984
64.6k
  Opts.ImplicitInt = Std.hasImplicitInt();
1985
1986
  // Set OpenCL Version.
1987
64.6k
  Opts.OpenCL = Std.isOpenCL();
1988
64.6k
  if (LangStd == LangStandard::lang_opencl10)
1989
358
    Opts.OpenCLVersion = 100;
1990
64.3k
  else if (LangStd == LangStandard::lang_opencl11)
1991
25
    Opts.OpenCLVersion = 110;
1992
64.3k
  else if (LangStd == LangStandard::lang_opencl12)
1993
64
    Opts.OpenCLVersion = 120;
1994
64.2k
  else if (LangStd == LangStandard::lang_opencl20)
1995
161
    Opts.OpenCLVersion = 200;
1996
64.0k
  else if (LangStd == LangStandard::lang_opencl30)
1997
3
    Opts.OpenCLVersion = 300;
1998
64.0k
  else if (LangStd == LangStandard::lang_openclcpp)
1999
77
    Opts.OpenCLCPlusPlusVersion = 100;
2000
2001
  // OpenCL has some additional defaults.
2002
64.6k
  if (Opts.OpenCL) {
2003
688
    Opts.AltiVec = 0;
2004
688
    Opts.ZVector = 0;
2005
688
    Opts.setDefaultFPContractMode(LangOptions::FPM_On);
2006
688
    Opts.NativeHalfType = 1;
2007
688
    Opts.NativeHalfArgsAndReturns = 1;
2008
688
    Opts.OpenCLCPlusPlus = Opts.CPlusPlus;
2009
2010
    // Include default header file for OpenCL.
2011
688
    if (Opts.IncludeDefaultHeader) {
2012
27
      if (Opts.DeclareOpenCLBuiltins) {
2013
        // Only include base header file for builtin types and constants.
2014
6
        Includes.push_back("opencl-c-base.h");
2015
21
      } else {
2016
21
        Includes.push_back("opencl-c.h");
2017
21
      }
2018
27
    }
2019
688
  }
2020
2021
64.6k
  Opts.HIP = IK.getLanguage() == Language::HIP;
2022
64.6k
  Opts.CUDA = IK.getLanguage() == Language::CUDA || 
Opts.HIP64.3k
;
2023
64.6k
  if (Opts.HIP) {
2024
    // HIP toolchain does not support 'Fast' FPOpFusion in backends since it
2025
    // fuses multiplication/addition instructions without contract flag from
2026
    // device library functions in LLVM bitcode, which causes accuracy loss in
2027
    // certain math functions, e.g. tan(-1e20) becomes -0.933 instead of 0.8446.
2028
    // For device library functions in bitcode to work, 'Strict' or 'Standard'
2029
    // FPOpFusion options in backends is needed. Therefore 'fast-honor-pragmas'
2030
    // FP contract option is used to allow fuse across statements in frontend
2031
    // whereas respecting contract flag in backend.
2032
88
    Opts.setDefaultFPContractMode(LangOptions::FPM_FastHonorPragmas);
2033
64.6k
  } else if (Opts.CUDA) {
2034
    // Allow fuse across statements disregarding pragmas.
2035
291
    Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
2036
291
  }
2037
2038
64.6k
  Opts.RenderScript = IK.getLanguage() == Language::RenderScript;
2039
64.6k
  if (Opts.RenderScript) {
2040
4
    Opts.NativeHalfType = 1;
2041
4
    Opts.NativeHalfArgsAndReturns = 1;
2042
4
  }
2043
2044
  // OpenCL and C++ both have bool, true, false keywords.
2045
64.6k
  Opts.Bool = Opts.OpenCL || 
Opts.CPlusPlus64.0k
;
2046
2047
  // OpenCL has half keyword
2048
64.6k
  Opts.Half = Opts.OpenCL;
2049
2050
  // C++ has wchar_t keyword.
2051
64.6k
  Opts.WChar = Opts.CPlusPlus;
2052
2053
64.6k
  Opts.GNUKeywords = Opts.GNUMode;
2054
64.6k
  Opts.CXXOperatorNames = Opts.CPlusPlus;
2055
2056
64.6k
  Opts.AlignedAllocation = Opts.CPlusPlus17;
2057
2058
64.6k
  Opts.DollarIdents = !Opts.AsmPreprocessor;
2059
2060
  // Enable [[]] attributes in C++11 and C2x by default.
2061
64.6k
  Opts.DoubleSquareBracketAttributes = Opts.CPlusPlus11 || 
Opts.C2x25.2k
;
2062
64.6k
}
2063
2064
/// Check if input file kind and language standard are compatible.
2065
static bool IsInputCompatibleWithStandard(InputKind IK,
2066
36.2k
                                          const LangStandard &S) {
2067
36.2k
  switch (IK.getLanguage()) {
2068
0
  case Language::Unknown:
2069
0
  case Language::LLVM_IR:
2070
0
    llvm_unreachable("should not parse language flags for this input");
2071
2072
2.48k
  case Language::C:
2073
2.52k
  case Language::ObjC:
2074
2.55k
  case Language::RenderScript:
2075
2.55k
    return S.getLanguage() == Language::C;
2076
2077
35
  case Language::OpenCL:
2078
35
    return S.getLanguage() == Language::OpenCL;
2079
2080
33.2k
  case Language::CXX:
2081
33.5k
  case Language::ObjCXX:
2082
33.5k
    return S.getLanguage() == Language::CXX;
2083
2084
122
  case Language::CUDA:
2085
    // FIXME: What -std= values should be permitted for CUDA compilations?
2086
122
    return S.getLanguage() == Language::CUDA ||
2087
121
           S.getLanguage() == Language::CXX;
2088
2089
23
  case Language::HIP:
2090
23
    return S.getLanguage() == Language::CXX || 
S.getLanguage() == Language::HIP0
;
2091
2092
1
  case Language::Asm:
2093
    // Accept (and ignore) all -std= values.
2094
    // FIXME: The -std= value is not ignored; it affects the tokenization
2095
    // and preprocessing rules if we're preprocessing this asm input.
2096
1
    return true;
2097
0
  }
2098
2099
0
  llvm_unreachable("unexpected input language");
2100
0
}
2101
2102
/// Get language name for given input kind.
2103
4
static const StringRef GetInputKindName(InputKind IK) {
2104
4
  switch (IK.getLanguage()) {
2105
1
  case Language::C:
2106
1
    return "C";
2107
0
  case Language::ObjC:
2108
0
    return "Objective-C";
2109
1
  case Language::CXX:
2110
1
    return "C++";
2111
1
  case Language::ObjCXX:
2112
1
    return "Objective-C++";
2113
1
  case Language::OpenCL:
2114
1
    return "OpenCL";
2115
0
  case Language::CUDA:
2116
0
    return "CUDA";
2117
0
  case Language::RenderScript:
2118
0
    return "RenderScript";
2119
0
  case Language::HIP:
2120
0
    return "HIP";
2121
2122
0
  case Language::Asm:
2123
0
    return "Asm";
2124
0
  case Language::LLVM_IR:
2125
0
    return "LLVM IR";
2126
2127
0
  case Language::Unknown:
2128
0
    break;
2129
0
  }
2130
0
  llvm_unreachable("unknown input language");
2131
0
}
2132
2133
static void GenerateLangArgs(const LangOptions &Opts,
2134
                             SmallVectorImpl<const char *> &Args,
2135
38
                             CompilerInvocation::StringAllocator SA) {
2136
38
  if (Opts.IncludeDefaultHeader)
2137
0
    Args.push_back(SA(GetOptName(OPT_finclude_default_header)));
2138
38
  if (Opts.DeclareOpenCLBuiltins)
2139
0
    Args.push_back(SA(GetOptName(OPT_fdeclare_opencl_builtins)));
2140
38
}
2141
2142
void CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
2143
                                       InputKind IK, const llvm::Triple &T,
2144
                                       std::vector<std::string> &Includes,
2145
64.6k
                                       DiagnosticsEngine &Diags) {
2146
  // FIXME: Cleanup per-file based stuff.
2147
64.6k
  LangStandard::Kind LangStd = LangStandard::lang_unspecified;
2148
64.6k
  if (const Arg *A = Args.getLastArg(OPT_std_EQ)) {
2149
36.0k
    LangStd = LangStandard::getLangKind(A->getValue());
2150
36.0k
    if (LangStd == LangStandard::lang_unspecified) {
2151
8
      Diags.Report(diag::err_drv_invalid_value)
2152
8
        << A->getAsString(Args) << A->getValue();
2153
      // Report supported standards with short description.
2154
8
      for (unsigned KindValue = 0;
2155
256
           KindValue != LangStandard::lang_unspecified;
2156
248
           ++KindValue) {
2157
248
        const LangStandard &Std = LangStandard::getLangStandardForKind(
2158
248
          static_cast<LangStandard::Kind>(KindValue));
2159
248
        if (IsInputCompatibleWithStandard(IK, Std)) {
2160
87
          auto Diag = Diags.Report(diag::note_drv_use_standard);
2161
87
          Diag << Std.getName() << Std.getDescription();
2162
87
          unsigned NumAliases = 0;
2163
87
#define LANGSTANDARD(id, name, lang, desc, features)
2164
87
#define LANGSTANDARD_ALIAS(id, alias) \
2165
957
          if (KindValue == LangStandard::lang_##id) 
++NumAliases42
;
2166
87
#define LANGSTANDARD_ALIAS_DEPR(id, alias)
2167
87
#include "clang/Basic/LangStandards.def"
2168
87
          Diag << NumAliases;
2169
87
#define LANGSTANDARD(id, name, lang, desc, features)
2170
87
#define LANGSTANDARD_ALIAS(id, alias) \
2171
957
          if (KindValue == LangStandard::lang_##id) 
Diag << alias42
;
2172
87
#define LANGSTANDARD_ALIAS_DEPR(id, alias)
2173
87
#include "clang/Basic/LangStandards.def"
2174
87
        }
2175
248
      }
2176
36.0k
    } else {
2177
      // Valid standard, check to make sure language and standard are
2178
      // compatible.
2179
36.0k
      const LangStandard &Std = LangStandard::getLangStandardForKind(LangStd);
2180
36.0k
      if (!IsInputCompatibleWithStandard(IK, Std)) {
2181
2
        Diags.Report(diag::err_drv_argument_not_allowed_with)
2182
2
          << A->getAsString(Args) << GetInputKindName(IK);
2183
2
      }
2184
36.0k
    }
2185
36.0k
  }
2186
2187
  // -cl-std only applies for OpenCL language standards.
2188
  // Override the -std option in this case.
2189
64.6k
  if (const Arg *A = Args.getLastArg(OPT_cl_std_EQ)) {
2190
350
    LangStandard::Kind OpenCLLangStd
2191
350
      = llvm::StringSwitch<LangStandard::Kind>(A->getValue())
2192
350
        .Cases("cl", "CL", LangStandard::lang_opencl10)
2193
350
        .Cases("cl1.0", "CL1.0", LangStandard::lang_opencl10)
2194
350
        .Cases("cl1.1", "CL1.1", LangStandard::lang_opencl11)
2195
350
        .Cases("cl1.2", "CL1.2", LangStandard::lang_opencl12)
2196
350
        .Cases("cl2.0", "CL2.0", LangStandard::lang_opencl20)
2197
350
        .Cases("cl3.0", "CL3.0", LangStandard::lang_opencl30)
2198
350
        .Cases("clc++", "CLC++", LangStandard::lang_openclcpp)
2199
350
        .Default(LangStandard::lang_unspecified);
2200
2201
350
    if (OpenCLLangStd == LangStandard::lang_unspecified) {
2202
3
      Diags.Report(diag::err_drv_invalid_value)
2203
3
        << A->getAsString(Args) << A->getValue();
2204
3
    }
2205
347
    else
2206
347
      LangStd = OpenCLLangStd;
2207
350
  }
2208
2209
  // These need to be parsed now. They are used to set OpenCL defaults.
2210
64.6k
  Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header);
2211
64.6k
  Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins);
2212
2213
64.6k
  CompilerInvocation::setLangDefaults(Opts, IK, T, Includes, LangStd);
2214
2215
  // The key paths of codegen options defined in Options.td start with
2216
  // "LangOpts->". Let's provide the expected variable name and type.
2217
64.6k
  LangOptions *LangOpts = &Opts;
2218
64.6k
  bool Success = true;
2219
2220
64.6k
#define LANG_OPTION_WITH_MARSHALLING(                                          \
2221
64.6k
    PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM,        \
2222
64.6k
    HELPTEXT, METAVAR, VALUES, SPELLING, SHOULD_PARSE, ALWAYS_EMIT, KEYPATH,   \
2223
64.6k
    DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER, DENORMALIZER,     \
2224
64.6k
    MERGER, EXTRACTOR, TABLE_INDEX)                                            \
2225
12.4M
  PARSE_OPTION_WITH_MARSHALLING(Args, Diags, Success, ID, FLAGS, PARAM,        \
2226
12.4M
                                SHOULD_PARSE, KEYPATH, DEFAULT_VALUE,          \
2227
12.4M
                                IMPLIED_CHECK, IMPLIED_VALUE, NORMALIZER,      \
2228
12.4M
                                MERGER, TABLE_INDEX)
2229
64.6k
#include "clang/Driver/Options.inc"
2230
64.6k
#undef LANG_OPTION_WITH_MARSHALLING
2231
2232
64.6k
  if (const Arg *A = Args.getLastArg(OPT_fcf_protection_EQ)) {
2233
15
    StringRef Name = A->getValue();
2234
15
    if (Name == "full" || 
Name == "branch"10
) {
2235
14
      Opts.CFProtectionBranch = 1;
2236
14
    }
2237
15
  }
2238
2239
64.6k
  Opts.SYCLIsDevice = Opts.SYCL && 
Args.hasArg(options::OPT_fsycl_is_device)12
;
2240
2241
  // -cl-strict-aliasing needs to emit diagnostic in the case where CL > 1.0.
2242
  // This option should be deprecated for CL > 1.0 because
2243
  // this option was added for compatibility with OpenCL 1.0.
2244
64.6k
  if (Args.getLastArg(OPT_cl_strict_aliasing)
2245
4
       && Opts.OpenCLVersion > 100) {
2246
3
    Diags.Report(diag::warn_option_invalid_ocl_version)
2247
3
        << Opts.getOpenCLVersionTuple().getAsString()
2248
3
        << Args.getLastArg(OPT_cl_strict_aliasing)->getAsString(Args);
2249
3
  }
2250
2251
  // We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension
2252
  // keywords. This behavior is provided by GCC's poorly named '-fasm' flag,
2253
  // while a subset (the non-C++ GNU keywords) is provided by GCC's
2254
  // '-fgnu-keywords'. Clang conflates the two for simplicity under the single
2255
  // name, as it doesn't seem a useful distinction.
2256
64.6k
  Opts.GNUKeywords = Args.hasFlag(OPT_fgnu_keywords, OPT_fno_gnu_keywords,
2257
64.6k
                                  Opts.GNUKeywords);
2258
2259
64.6k
  Opts.Digraphs = Args.hasFlag(OPT_fdigraphs, OPT_fno_digraphs, Opts.Digraphs);
2260
2261
64.6k
  if (Args.hasArg(OPT_fno_operator_names))
2262
1
    Opts.CXXOperatorNames = 0;
2263
2264
64.6k
  if (Opts.CUDAIsDevice && 
Args.hasArg(OPT_fcuda_approx_transcendentals)218
)
2265
1
    Opts.CUDADeviceApproxTranscendentals = 1;
2266
2267
64.6k
  if (Args.hasArg(OPT_fgpu_allow_device_init)) {
2268
1
    if (Opts.HIP)
2269
1
      Opts.GPUAllowDeviceInit = 1;
2270
0
    else
2271
0
      Diags.Report(diag::warn_ignored_hip_only_option)
2272
0
          << Args.getLastArg(OPT_fgpu_allow_device_init)->getAsString(Args);
2273
1
  }
2274
64.6k
  if (Opts.HIP)
2275
88
    Opts.GPUMaxThreadsPerBlock = getLastArgIntValue(
2276
88
        Args, OPT_gpu_max_threads_per_block_EQ, Opts.GPUMaxThreadsPerBlock);
2277
64.6k
  else if (Args.hasArg(OPT_gpu_max_threads_per_block_EQ))
2278
0
    Diags.Report(diag::warn_ignored_hip_only_option)
2279
0
        << Args.getLastArg(OPT_gpu_max_threads_per_block_EQ)->getAsString(Args);
2280
2281
64.6k
  if (Opts.ObjC) {
2282
6.13k
    if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) {
2283
3.53k
      StringRef value = arg->getValue();
2284
3.53k
      if (Opts.ObjCRuntime.tryParse(value))
2285
0
        Diags.Report(diag::err_drv_unknown_objc_runtime) << value;
2286
3.53k
    }
2287
2288
6.13k
    if (Args.hasArg(OPT_fobjc_gc_only))
2289
20
      Opts.setGC(LangOptions::GCOnly);
2290
6.11k
    else if (Args.hasArg(OPT_fobjc_gc))
2291
83
      Opts.setGC(LangOptions::HybridGC);
2292
6.03k
    else if (Args.hasArg(OPT_fobjc_arc)) {
2293
1.72k
      Opts.ObjCAutoRefCount = 1;
2294
1.72k
      if (!Opts.ObjCRuntime.allowsARC())
2295
10
        Diags.Report(diag::err_arc_unsupported_on_runtime);
2296
1.72k
    }
2297
2298
    // ObjCWeakRuntime tracks whether the runtime supports __weak, not
2299
    // whether the feature is actually enabled.  This is predominantly
2300
    // determined by -fobjc-runtime, but we allow it to be overridden
2301
    // from the command line for testing purposes.
2302
6.13k
    if (Args.hasArg(OPT_fobjc_runtime_has_weak))
2303
143
      Opts.ObjCWeakRuntime = 1;
2304
5.99k
    else
2305
5.99k
      Opts.ObjCWeakRuntime = Opts.ObjCRuntime.allowsWeak();
2306
2307
    // ObjCWeak determines whether __weak is actually enabled.
2308
    // Note that we allow -fno-objc-weak to disable this even in ARC mode.
2309
6.13k
    if (auto weakArg = Args.getLastArg(OPT_fobjc_weak, OPT_fno_objc_weak)) {
2310
22
      if (!weakArg->getOption().matches(OPT_fobjc_weak)) {
2311
0
        assert(!Opts.ObjCWeak);
2312
22
      } else if (Opts.getGC() != LangOptions::NonGC) {
2313
0
        Diags.Report(diag::err_objc_weak_with_gc);
2314
22
      } else if (!Opts.ObjCWeakRuntime) {
2315
0
        Diags.Report(diag::err_objc_weak_unsupported);
2316
22
      } else {
2317
22
        Opts.ObjCWeak = 1;
2318
22
      }
2319
6.11k
    } else if (Opts.ObjCAutoRefCount) {
2320
1.71k
      Opts.ObjCWeak = Opts.ObjCWeakRuntime;
2321
1.71k
    }
2322
2323
6.13k
    if (Args.hasArg(OPT_fobjc_subscripting_legacy_runtime))
2324
9
      Opts.ObjCSubscriptingLegacyRuntime =
2325
9
        (Opts.ObjCRuntime.getKind() == ObjCRuntime::FragileMacOSX);
2326
6.13k
  }
2327
2328
64.6k
  if (Arg *A = Args.getLastArg(options::OPT_fgnuc_version_EQ)) {
2329
    // Check that the version has 1 to 3 components and the minor and patch
2330
    // versions fit in two decimal digits.
2331
23.2k
    VersionTuple GNUCVer;
2332
23.2k
    bool Invalid = GNUCVer.tryParse(A->getValue());
2333
23.2k
    unsigned Major = GNUCVer.getMajor();
2334
23.2k
    unsigned Minor = GNUCVer.getMinor().getValueOr(0);
2335
23.2k
    unsigned Patch = GNUCVer.getSubminor().getValueOr(0);
2336
23.2k
    if (
Invalid23.2k
||
GNUCVer.getBuild()23.2k
|| Minor >= 100 || Patch >= 100) {
2337
0
      Diags.Report(diag::err_drv_invalid_value)
2338
0
          << A->getAsString(Args) << A->getValue();
2339
0
    }
2340
23.2k
    Opts.GNUCVersion = Major * 100 * 100 + Minor * 100 + Patch;
2341
23.2k
  }
2342
2343
64.6k
  if (Args.hasArg(OPT_fgnu89_inline)) {
2344
4
    if (Opts.CPlusPlus)
2345
2
      Diags.Report(diag::err_drv_argument_not_allowed_with)
2346
2
        << "-fgnu89-inline" << GetInputKindName(IK);
2347
2
    else
2348
2
      Opts.GNUInline = 1;
2349
4
  }
2350
2351
64.6k
  if (Args.hasArg(OPT_ftrapv)) {
2352
8
    Opts.setSignedOverflowBehavior(LangOptions::SOB_Trapping);
2353
    // Set the handler, if one is specified.
2354
8
    Opts.OverflowHandler =
2355
8
        std::string(Args.getLastArgValue(OPT_ftrapv_handler));
2356
8
  }
2357
64.6k
  else if (Args.hasArg(OPT_fwrapv))
2358
3
    Opts.setSignedOverflowBehavior(LangOptions::SOB_Defined);
2359
2360
64.6k
  Opts.MicrosoftExt = Opts.MSVCCompat || 
Args.hasArg(OPT_fms_extensions)54.8k
;
2361
64.6k
  Opts.AsmBlocks = Args.hasArg(OPT_fasm_blocks) || 
Opts.MicrosoftExt64.6k
;
2362
64.6k
  Opts.MSCompatibilityVersion = 0;
2363
64.6k
  if (const Arg *A = Args.getLastArg(OPT_fms_compatibility_version)) {
2364
7.23k
    VersionTuple VT;
2365
7.23k
    if (VT.tryParse(A->getValue()))
2366
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args)
2367
0
                                                << A->getValue();
2368
7.23k
    Opts.MSCompatibilityVersion = VT.getMajor() * 10000000 +
2369
7.23k
                                  VT.getMinor().getValueOr(0) * 100000 +
2370
7.23k
                                  VT.getSubminor().getValueOr(0);
2371
7.23k
  }
2372
2373
  // Mimicking gcc's behavior, trigraphs are only enabled if -trigraphs
2374
  // is specified, or -std is set to a conforming mode.
2375
  // Trigraphs are disabled by default in c++1z onwards.
2376
  // For z/OS, trigraphs are enabled by default (without regard to the above).
2377
64.6k
  Opts.Trigraphs =
2378
64.6k
      (!Opts.GNUMode && 
!Opts.MSVCCompat35.9k
&&
!Opts.CPlusPlus1726.3k
) ||
T.isOSzOS()42.3k
;
2379
64.6k
  Opts.Trigraphs =
2380
64.6k
      Args.hasFlag(OPT_ftrigraphs, OPT_fno_trigraphs, Opts.Trigraphs);
2381
2382
64.6k
  Opts.DollarIdents = Args.hasFlag(OPT_fdollars_in_identifiers,
2383
64.6k
                                   OPT_fno_dollars_in_identifiers,
2384
64.6k
                                   Opts.DollarIdents);
2385
2386
  // -ffixed-point
2387
64.6k
  Opts.FixedPoint =
2388
64.6k
      Args.hasFlag(OPT_ffixed_point, OPT_fno_fixed_point, /*Default=*/false) &&
2389
75
      !Opts.CPlusPlus;
2390
64.6k
  Opts.PaddingOnUnsignedFixedPoint =
2391
64.6k
      Args.hasFlag(OPT_fpadding_on_unsigned_fixed_point,
2392
64.6k
                   OPT_fno_padding_on_unsigned_fixed_point,
2393
64.6k
                   /*Default=*/false) &&
2394
21
      Opts.FixedPoint;
2395
2396
64.6k
  Opts.RTTI = Opts.CPlusPlus && 
!Args.hasArg(OPT_fno_rtti)46.5k
;
2397
64.6k
  Opts.RTTIData = Opts.RTTI && 
!Args.hasArg(OPT_fno_rtti_data)46.4k
;
2398
64.6k
  Opts.Blocks = Args.hasArg(OPT_fblocks) || 
(49.0k
Opts.OpenCL49.0k
2399
673
    && Opts.OpenCLVersion == 200);
2400
64.6k
  Opts.Coroutines = Opts.CPlusPlus20 || 
Args.hasArg(OPT_fcoroutines_ts)61.4k
;
2401
2402
64.6k
  Opts.ConvergentFunctions = Opts.OpenCL || 
(64.0k
Opts.CUDA64.0k
&&
Opts.CUDAIsDevice379
) ||
2403
63.7k
                             Opts.SYCLIsDevice ||
2404
63.7k
                             Args.hasArg(OPT_fconvergent_functions);
2405
2406
64.6k
  Opts.DoubleSquareBracketAttributes =
2407
64.6k
      Args.hasFlag(OPT_fdouble_square_bracket_attributes,
2408
64.6k
                   OPT_fno_double_square_bracket_attributes,
2409
64.6k
                   Opts.DoubleSquareBracketAttributes);
2410
2411
64.6k
  Opts.CPlusPlusModules = Opts.CPlusPlus20;
2412
64.6k
  Opts.Modules =
2413
64.6k
      Args.hasArg(OPT_fmodules) || 
Opts.ModulesTS61.2k
||
Opts.CPlusPlusModules61.1k
;
2414
64.6k
  Opts.ModulesDeclUse =
2415
64.6k
      Args.hasArg(OPT_fmodules_decluse) || 
Opts.ModulesStrictDeclUse64.6k
;
2416
  // FIXME: We only need this in C++ modules / Modules TS if we might textually
2417
  // enter a different module (eg, when building a header unit).
2418
64.6k
  Opts.ModulesLocalVisibility =
2419
64.6k
      Args.hasArg(OPT_fmodules_local_submodule_visibility) || 
Opts.ModulesTS64.6k
||
2420
64.4k
      Opts.CPlusPlusModules;
2421
64.6k
  Opts.ModulesSearchAll = Opts.Modules &&
2422
6.73k
    !Args.hasArg(OPT_fno_modules_search_all) &&
2423
6.73k
    Args.hasArg(OPT_fmodules_search_all);
2424
64.6k
  Opts.CharIsSigned = Opts.OpenCL || 
!Args.hasArg(OPT_fno_signed_char)64.0k
;
2425
64.6k
  Opts.WChar = Opts.CPlusPlus && 
!Args.hasArg(OPT_fno_wchar)46.5k
;
2426
64.6k
  Opts.Char8 = Args.hasFlag(OPT_fchar8__t, OPT_fno_char8__t, Opts.CPlusPlus20);
2427
64.6k
  Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || 
Opts.Freestanding61.6k
;
2428
64.6k
  if (!Opts.NoBuiltin)
2429
60.9k
    getAllNoBuiltinFuncValues(Args, Opts.NoBuiltinFuncs);
2430
64.6k
  Opts.AlignedAllocation =
2431
64.6k
      Args.hasFlag(OPT_faligned_allocation, OPT_fno_aligned_allocation,
2432
64.6k
                   Opts.AlignedAllocation);
2433
64.6k
  Opts.AlignedAllocationUnavailable =
2434
64.6k
      Opts.AlignedAllocation && 
Args.hasArg(OPT_aligned_alloc_unavailable)6.74k
;
2435
64.6k
  if (Args.hasArg(OPT_fconcepts_ts))
2436
0
    Diags.Report(diag::warn_fe_concepts_ts_flag);
2437
64.6k
  Opts.MathErrno = !Opts.OpenCL && 
Args.hasArg(OPT_fmath_errno)64.0k
;
2438
64.6k
  Opts.LongDoubleSize = Args.hasArg(OPT_mlong_double_128)
2439
7
                            ? 128
2440
64.6k
                            : Args.hasArg(OPT_mlong_double_64) ? 
648
:
064.6k
;
2441
64.6k
  Opts.EnableAIXExtendedAltivecABI = Args.hasArg(OPT_mabi_EQ_vec_extabi);
2442
64.6k
  Opts.PICLevel = getLastArgIntValue(Args, OPT_pic_level, 0, Diags);
2443
64.6k
  Opts.DumpRecordLayouts = Opts.DumpRecordLayoutsSimple
2444
64.6k
                        || Args.hasArg(OPT_fdump_record_layouts);
2445
64.6k
  if (Opts.FastRelaxedMath)
2446
3
    Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
2447
64.6k
  Opts.XLPragmaPack = Args.hasArg(OPT_fxl_pragma_pack);
2448
64.6k
  llvm::sort(Opts.ModuleFeatures);
2449
64.6k
  Opts.NativeHalfType |= Args.hasArg(OPT_fnative_half_type);
2450
64.6k
  Opts.NativeHalfArgsAndReturns |= Args.hasArg(OPT_fnative_half_arguments_and_returns);
2451
  // Enable HalfArgsAndReturns if present in Args or if NativeHalfArgsAndReturns
2452
  // is enabled.
2453
64.6k
  Opts.HalfArgsAndReturns = Args.hasArg(OPT_fallow_half_arguments_and_returns)
2454
64.6k
                            | Opts.NativeHalfArgsAndReturns;
2455
2456
64.6k
  Opts.ArmSveVectorBits =
2457
64.6k
      getLastArgIntValue(Args, options::OPT_msve_vector_bits_EQ, 0, Diags);
2458
2459
  // __declspec is enabled by default for the PS4 by the driver, and also
2460
  // enabled for Microsoft Extensions or Borland Extensions, here.
2461
  //
2462
  // FIXME: __declspec is also currently enabled for CUDA, but isn't really a
2463
  // CUDA extension. However, it is required for supporting
2464
  // __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has
2465
  // been rewritten in terms of something more generic, remove the Opts.CUDA
2466
  // term here.
2467
64.6k
  Opts.DeclSpecKeyword =
2468
64.6k
      Args.hasFlag(OPT_fdeclspec, OPT_fno_declspec,
2469
64.6k
                   (Opts.MicrosoftExt || 
Opts.Borland54.2k
||
Opts.CUDA54.2k
));
2470
2471
  // -mrtd option
2472
64.6k
  if (Arg *A = Args.getLastArg(OPT_mrtd)) {
2473
5
    if (Opts.getDefaultCallingConv() != LangOptions::DCC_None)
2474
0
      Diags.Report(diag::err_drv_argument_not_allowed_with)
2475
0
          << A->getSpelling() << "-fdefault-calling-conv";
2476
5
    else {
2477
5
      if (T.getArch() != llvm::Triple::x86)
2478
0
        Diags.Report(diag::err_drv_argument_not_allowed_with)
2479
0
            << A->getSpelling() << T.getTriple();
2480
5
      else
2481
5
        Opts.setDefaultCallingConv(LangOptions::DCC_StdCall);
2482
5
    }
2483
5
  }
2484
2485
  // Check if -fopenmp-simd is specified.
2486
64.6k
  bool IsSimdSpecified =
2487
64.6k
      Args.hasFlag(options::OPT_fopenmp_simd, options::OPT_fno_openmp_simd,
2488
64.6k
                   /*Default=*/false);
2489
64.6k
  Opts.OpenMPSimd = !Opts.OpenMP && 
IsSimdSpecified58.1k
;
2490
64.6k
  Opts.OpenMPUseTLS =
2491
64.6k
      Opts.OpenMP && 
!Args.hasArg(options::OPT_fnoopenmp_use_tls)6.58k
;
2492
64.6k
  Opts.OpenMPIsDevice =
2493
64.6k
      Opts.OpenMP && 
Args.hasArg(options::OPT_fopenmp_is_device)6.58k
;
2494
64.6k
  Opts.OpenMPIRBuilder =
2495
64.6k
      Opts.OpenMP && 
Args.hasArg(options::OPT_fopenmp_enable_irbuilder)6.58k
;
2496
64.6k
  bool IsTargetSpecified =
2497
64.6k
      Opts.OpenMPIsDevice || 
Args.hasArg(options::OPT_fopenmp_targets_EQ)63.9k
;
2498
2499
64.6k
  if (Opts.OpenMP || 
Opts.OpenMPSimd58.1k
) {
2500
11.4k
    if (int Version = getLastArgIntValue(
2501
11.4k
            Args, OPT_fopenmp_version_EQ,
2502
11.4k
            (IsSimdSpecified || IsTargetSpecified) ? 50 : Opts.OpenMP, Diags))
2503
11.4k
      Opts.OpenMP = Version;
2504
    // Provide diagnostic when a given target is not expected to be an OpenMP
2505
    // device or host.
2506
11.4k
    if (!Opts.OpenMPIsDevice) {
2507
10.6k
      switch (T.getArch()) {
2508
10.6k
      default:
2509
10.6k
        break;
2510
      // Add unsupported host targets here:
2511
1
      case llvm::Triple::nvptx:
2512
2
      case llvm::Triple::nvptx64:
2513
2
        Diags.Report(diag::err_drv_omp_host_target_not_supported) << T.str();
2514
2
        break;
2515
64.6k
      }
2516
64.6k
    }
2517
11.4k
  }
2518
2519
  // Set the flag to prevent the implementation from emitting device exception
2520
  // handling code for those requiring so.
2521
64.6k
  if ((Opts.OpenMPIsDevice && 
(753
T.isNVPTX()753
||
T.isAMDGCN()514
)) ||
2522
64.4k
      Opts.OpenCLCPlusPlus) {
2523
319
    Opts.Exceptions = 0;
2524
319
    Opts.CXXExceptions = 0;
2525
319
  }
2526
64.6k
  if (Opts.OpenMPIsDevice && 
T.isNVPTX()753
) {
2527
239
    Opts.OpenMPCUDANumSMs =
2528
239
        getLastArgIntValue(Args, options::OPT_fopenmp_cuda_number_of_sm_EQ,
2529
239
                           Opts.OpenMPCUDANumSMs, Diags);
2530
239
    Opts.OpenMPCUDABlocksPerSM =
2531
239
        getLastArgIntValue(Args, options::OPT_fopenmp_cuda_blocks_per_sm_EQ,
2532
239
                           Opts.OpenMPCUDABlocksPerSM, Diags);
2533
239
    Opts.OpenMPCUDAReductionBufNum = getLastArgIntValue(
2534
239
        Args, options::OPT_fopenmp_cuda_teams_reduction_recs_num_EQ,
2535
239
        Opts.OpenMPCUDAReductionBufNum, Diags);
2536
239
  }
2537
2538
  // Get the OpenMP target triples if any.
2539
64.6k
  if (Arg *A = Args.getLastArg(options::OPT_fopenmp_targets_EQ)) {
2540
6.51k
    enum ArchPtrSize { Arch16Bit, Arch32Bit, Arch64Bit };
2541
13.0k
    auto getArchPtrSize = [](const llvm::Triple &T) {
2542
13.0k
      if (T.isArch16Bit())
2543
0
        return Arch16Bit;
2544
13.0k
      if (T.isArch32Bit())
2545
5.87k
        return Arch32Bit;
2546
7.15k
      assert(T.isArch64Bit() && "Expected 64-bit architecture");
2547
7.15k
      return Arch64Bit;
2548
7.15k
    };
2549
2550
13.0k
    for (unsigned i = 0; i < A->getNumValues(); 
++i6.51k
) {
2551
6.51k
      llvm::Triple TT(A->getValue(i));
2552
2553
6.51k
      if (TT.getArch() == llvm::Triple::UnknownArch ||
2554
6.51k
          !(TT.getArch() == llvm::Triple::aarch64 || 
TT.isPPC()6.51k
||
2555
3.18k
            TT.getArch() == llvm::Triple::nvptx ||
2556
3.06k
            TT.getArch() == llvm::Triple::nvptx64 ||
2557
2.83k
            TT.getArch() == llvm::Triple::amdgcn ||
2558
2.82k
            TT.getArch() == llvm::Triple::x86 ||
2559
9
            TT.getArch() == llvm::Triple::x86_64))
2560
3
        Diags.Report(diag::err_drv_invalid_omp_target) << A->getValue(i);
2561
6.51k
      else if (getArchPtrSize(T) != getArchPtrSize(TT))
2562
4
        Diags.Report(diag::err_drv_incompatible_omp_arch)
2563
4
            << A->getValue(i) << T.str();
2564
6.51k
      else
2565
6.51k
        Opts.OMPTargetTriples.push_back(TT);
2566
6.51k
    }
2567
6.51k
  }
2568
2569
  // Get OpenMP host file path if any and report if a non existent file is
2570
  // found
2571
64.6k
  if (Arg *A = Args.getLastArg(options::OPT_fopenmp_host_ir_file_path)) {
2572
1.21k
    Opts.OMPHostIRFile = A->getValue();
2573
1.21k
    if (!llvm::sys::fs::exists(Opts.OMPHostIRFile))
2574
1
      Diags.Report(diag::err_drv_omp_host_ir_file_not_found)
2575
1
          << Opts.OMPHostIRFile;
2576
1.21k
  }
2577
2578
  // Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options
2579
64.6k
  Opts.OpenMPCUDAMode = Opts.OpenMPIsDevice && 
(753
T.isNVPTX()753
||
T.isAMDGCN()514
) &&
2580
242
                        Args.hasArg(options::OPT_fopenmp_cuda_mode);
2581
2582
  // Set CUDA support for parallel execution of target regions for OpenMP target
2583
  // NVPTX/AMDGCN if specified in options.
2584
64.6k
  Opts.OpenMPCUDATargetParallel =
2585
64.6k
      Opts.OpenMPIsDevice && 
(753
T.isNVPTX()753
||
T.isAMDGCN()514
) &&
2586
242
      Args.hasArg(options::OPT_fopenmp_cuda_parallel_target_regions);
2587
2588
  // Set CUDA mode for OpenMP target NVPTX/AMDGCN if specified in options
2589
64.6k
  Opts.OpenMPCUDAForceFullRuntime =
2590
64.6k
      Opts.OpenMPIsDevice && 
(753
T.isNVPTX()753
||
T.isAMDGCN()514
) &&
2591
242
      Args.hasArg(options::OPT_fopenmp_cuda_force_full_runtime);
2592
2593
  // Record whether the __DEPRECATED define was requested.
2594
64.6k
  Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,
2595
64.6k
                                 OPT_fno_deprecated_macro,
2596
64.6k
                                 Opts.Deprecated);
2597
2598
  // FIXME: Eliminate this dependency.
2599
64.6k
  unsigned Opt = getOptimizationLevel(Args, IK, Diags),
2600
64.6k
       OptSize = getOptimizationLevelSize(Args);
2601
64.6k
  Opts.Optimize = Opt != 0;
2602
64.6k
  Opts.OptimizeSize = OptSize != 0;
2603
2604
  // This is the __NO_INLINE__ define, which just depends on things like the
2605
  // optimization level and -fno-inline, not actually whether the backend has
2606
  // inlining enabled.
2607
64.6k
  Opts.NoInlineDefine = !Opts.Optimize;
2608
64.6k
  if (Arg *InlineArg = Args.getLastArg(
2609
21
          options::OPT_finline_functions, options::OPT_finline_hint_functions,
2610
21
          options::OPT_fno_inline_functions, options::OPT_fno_inline))
2611
21
    if (InlineArg->getOption().matches(options::OPT_fno_inline))
2612
10
      Opts.NoInlineDefine = true;
2613
2614
64.6k
  if (Arg *A = Args.getLastArg(OPT_ffp_contract)) {
2615
69
    StringRef Val = A->getValue();
2616
69
    if (Val == "fast")
2617
43
      Opts.setDefaultFPContractMode(LangOptions::FPM_Fast);
2618
26
    else if (Val == "on")
2619
12
      Opts.setDefaultFPContractMode(LangOptions::FPM_On);
2620
14
    else if (Val == "off")
2621
9
      Opts.setDefaultFPContractMode(LangOptions::FPM_Off);
2622
5
    else if (Val == "fast-honor-pragmas")
2623
5
      Opts.setDefaultFPContractMode(LangOptions::FPM_FastHonorPragmas);
2624
0
    else
2625
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
2626
69
  }
2627
2628
64.6k
  LangOptions::FPExceptionModeKind FPEB = LangOptions::FPE_Ignore;
2629
64.6k
  if (Arg *A = Args.getLastArg(OPT_ffp_exception_behavior_EQ)) {
2630
85
    StringRef Val = A->getValue();
2631
85
    if (Val.equals("ignore"))
2632
8
      FPEB = LangOptions::FPE_Ignore;
2633
77
    else if (Val.equals("maytrap"))
2634
22
      FPEB = LangOptions::FPE_MayTrap;
2635
55
    else if (Val.equals("strict"))
2636
55
      FPEB = LangOptions::FPE_Strict;
2637
0
    else
2638
0
      Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
2639
85
  }
2640
64.6k
  Opts.setFPExceptionMode(FPEB);
2641
2642
  // Parse -fsanitize= arguments.
2643
64.6k
  parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
2644
64.6k
                      Diags, Opts.Sanitize);
2645
64.6k
  std::vector<std::string> systemBlacklists =
2646
64.6k
      Args.getAllArgValues(OPT_fsanitize_system_blacklist);
2647
64.6k
  Opts.SanitizerBlacklistFiles.insert(Opts.SanitizerBlacklistFiles.end(),
2648
64.6k
                                      systemBlacklists.begin(),
2649
64.6k
                                      systemBlacklists.end());
2650
2651
64.6k
  if (Arg *A = Args.getLastArg(OPT_fclang_abi_compat_EQ)) {
2652
39
    Opts.setClangABICompat(LangOptions::ClangABI::Latest);
2653
2654
39
    StringRef Ver = A->getValue();
2655
39
    std::pair<StringRef, StringRef> VerParts = Ver.split('.');
2656
39
    unsigned Major, Minor = 0;
2657
2658
    // Check the version number is valid: either 3.x (0 <= x <= 9) or
2659
    // y or y.0 (4 <= y <= current version).
2660
39
    if (!VerParts.first.startswith("0") &&
2661
38
        !VerParts.first.getAsInteger(10, Major) &&
2662
34
        3 <= Major && 
Major <= 33
CLANG_VERSION_MAJOR33
&&
2663
32
        (Major == 3 ? 
VerParts.second.size() == 17
&&
2664
6
                      !VerParts.second.getAsInteger(10, Minor)
2665
25
                    : VerParts.first.size() == Ver.size() ||
2666
28
                      
VerParts.second == "0"14
)) {
2667
      // Got a valid version number.
2668
28
      if (Major == 3 && 
Minor <= 86
)
2669
4
        Opts.setClangABICompat(LangOptions::ClangABI::Ver3_8);
2670
24
      else if (Major <= 4)
2671
9
        Opts.setClangABICompat(LangOptions::ClangABI::Ver4);
2672
15
      else if (Major <= 6)
2673
5
        Opts.setClangABICompat(LangOptions::ClangABI::Ver6);
2674
10
      else if (Major <= 7)
2675
4
        Opts.setClangABICompat(LangOptions::ClangABI::Ver7);
2676
6
      else if (Major <= 9)
2677
3
        Opts.setClangABICompat(LangOptions::ClangABI::Ver9);
2678
3
      else if (Major <= 11)
2679
3
        Opts.setClangABICompat(LangOptions::ClangABI::Ver11);
2680
11
    } else if (Ver != "latest") {
2681
8
      Diags.Report(diag::err_drv_invalid_value)
2682
8
          << A->getAsString(Args) << A->getValue();
2683
8
    }
2684
39
  }
2685
2686
64.6k
  if (Arg *A = Args.getLastArg(OPT_msign_return_address_EQ)) {
2687
22
    StringRef SignScope = A->getValue();
2688
2689
22
    if (SignScope.equals_lower("none"))
2690
7
      Opts.setSignReturnAddressScope(
2691
7
          LangOptions::SignReturnAddressScopeKind::None);
2692
15
    else if (SignScope.equals_lower("all"))
2693
6
      Opts.setSignReturnAddressScope(
2694
6
          LangOptions::SignReturnAddressScopeKind::All);
2695
9
    else if (SignScope.equals_lower("non-leaf"))
2696
9
      Opts.setSignReturnAddressScope(
2697
9
          LangOptions::SignReturnAddressScopeKind::NonLeaf);
2698
0
    else
2699
0
      Diags.Report(diag::err_drv_invalid_value)
2700
0
          << A->getAsString(Args) << SignScope;
2701
2702
22
    if (Arg *A = Args.getLastArg(OPT_msign_return_address_key_EQ)) {
2703
22
      StringRef SignKey = A->getValue();
2704
22
      if (!SignScope.empty() && !SignKey.empty()) {
2705
22
        if (SignKey.equals_lower("a_key"))
2706
17
          Opts.setSignReturnAddressKey(
2707
17
              LangOptions::SignReturnAddressKeyKind::AKey);
2708
5
        else if (SignKey.equals_lower("b_key"))
2709
5
          Opts.setSignReturnAddressKey(
2710
5
              LangOptions::SignReturnAddressKeyKind::BKey);
2711
0
        else
2712
0
          Diags.Report(diag::err_drv_invalid_value)
2713
0
              << A->getAsString(Args) << SignKey;
2714
22
      }
2715
22
    }
2716
22
  }
2717
2718
64.6k
  std::string ThreadModel =
2719
64.6k
      std::string(Args.getLastArgValue(OPT_mthread_model, "posix"));
2720
64.6k
  if (ThreadModel != "posix" && 
ThreadModel != "single"1
)
2721
0
    Diags.Report(diag::err_drv_invalid_value)
2722
0
        << Args.getLastArg(OPT_mthread_model)->getAsString(Args) << ThreadModel;
2723
64.6k
  Opts.setThreadModel(
2724
64.6k
      llvm::StringSwitch<LangOptions::ThreadModelKind>(ThreadModel)
2725
64.6k
          .Case("posix", LangOptions::ThreadModelKind::POSIX)
2726
64.6k
          .Case("single", LangOptions::ThreadModelKind::Single));
2727
64.6k
}
2728
2729
129k
static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) {
2730
129k
  switch (Action) {
2731
0
  case frontend::ASTDeclList:
2732
820
  case frontend::ASTDump:
2733
1.88k
  case frontend::ASTPrint:
2734
1.88k
  case frontend::ASTView:
2735
3.06k
  case frontend::EmitAssembly:
2736
4.20k
  case frontend::EmitBC:
2737
4.20k
  case frontend::EmitHTML:
2738
30.5k
  case frontend::EmitLLVM:
2739
31.0k
  case frontend::EmitLLVMOnly:
2740
31.0k
  case frontend::EmitCodeGenOnly:
2741
37.9k
  case frontend::EmitObj:
2742
38.0k
  case frontend::FixIt:
2743
38.4k
  case frontend::GenerateModule:
2744
38.5k
  case frontend::GenerateModuleInterface:
2745
38.5k
  case frontend::GenerateHeaderModule:
2746
44.7k
  case frontend::GeneratePCH:
2747
44.9k
  case frontend::GenerateInterfaceStubs:
2748
122k
  case frontend::ParseSyntaxOnly:
2749
122k
  case frontend::ModuleFileInfo:
2750
122k
  case frontend::VerifyPCH:
2751
122k
  case frontend::PluginAction:
2752
122k
  case frontend::RewriteObjC:
2753
122k
  case frontend::RewriteTest:
2754
125k
  case frontend::RunAnalysis:
2755
125k
  case frontend::TemplightDump:
2756
125k
  case frontend::MigrateSource:
2757
125k
    return false;
2758
2759
6
  case frontend::DumpCompilerOptions:
2760
6
  case frontend::DumpRawTokens:
2761
12
  case frontend::DumpTokens:
2762
12
  case frontend::InitOnly:
2763
16
  case frontend::PrintPreamble:
2764
4.08k
  case frontend::PrintPreprocessedInput:
2765
4.09k
  case frontend::RewriteMacros:
2766
4.32k
  case frontend::RunPreprocessorOnly:
2767
4.34k
  case frontend::PrintDependencyDirectivesSourceMinimizerOutput:
2768
4.34k
    return true;
2769
0
  }
2770
0
  llvm_unreachable("invalid frontend action");
2771
0
}
2772
2773
static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
2774
                                  DiagnosticsEngine &Diags,
2775
64.8k
                                  frontend::ActionKind Action) {
2776
64.8k
  Opts.PCHWithHdrStop = Args.hasArg(OPT_pch_through_hdrstop_create) ||
2777
64.8k
                        Args.hasArg(OPT_pch_through_hdrstop_use);
2778
2779
64.8k
  for (const auto *A : Args.filtered(OPT_error_on_deserialized_pch_decl))
2780
64
    Opts.DeserializedPCHDeclsToErrorOn.insert(A->getValue());
2781
2782
5
  for (const auto &A : Args.getAllArgValues(OPT_fmacro_prefix_map_EQ)) {
2783
5
    auto Split = StringRef(A).split('=');
2784
5
    Opts.MacroPrefixMap.insert(
2785
5
        {std::string(Split.first), std::string(Split.second)});
2786
5
  }
2787
2788
64.8k
  if (const Arg *A = Args.getLastArg(OPT_preamble_bytes_EQ)) {
2789
1
    StringRef Value(A->getValue());
2790
1
    size_t Comma = Value.find(',');
2791
1
    unsigned Bytes = 0;
2792
1
    unsigned EndOfLine = 0;
2793
2794
1
    if (Comma == StringRef::npos ||
2795
1
        Value.substr(0, Comma).getAsInteger(10, Bytes) ||
2796
1
        Value.substr(Comma + 1).getAsInteger(10, EndOfLine))
2797
0
      Diags.Report(diag::err_drv_preamble_format);
2798
1
    else {
2799
1
      Opts.PrecompiledPreambleBytes.first = Bytes;
2800
1
      Opts.PrecompiledPreambleBytes.second = (EndOfLine != 0);
2801
1
    }
2802
1
  }
2803
2804
  // Add the __CET__ macro if a CFProtection option is set.
2805
64.8k
  if (const Arg *A = Args.getLastArg(OPT_fcf_protection_EQ)) {
2806
15
    StringRef Name = A->getValue();
2807
15
    if (Name == "branch")
2808
9
      Opts.addMacroDef("__CET__=1");
2809
6
    else if (Name == "return")
2810
1
      Opts.addMacroDef("__CET__=2");
2811
5
    else if (Name == "full")
2812
5
      Opts.addMacroDef("__CET__=3");
2813
15
  }
2814
2815
  // Add macros from the command line.
2816
310k
  for (const auto *A : Args.filtered(OPT_D, OPT_U)) {
2817
310k
    if (A->getOption().matches(OPT_D))
2818
310k
      Opts.addMacroDef(A->getValue());
2819
45
    else
2820
45
      Opts.addMacroUndef(A->getValue());
2821
310k
  }
2822
2823
  // Add the ordered list of -includes.
2824
64.8k
  for (const auto *A : Args.filtered(OPT_include))
2825
3.31k
    Opts.Includes.emplace_back(A->getValue());
2826
2827
64.8k
  for (const auto *A : Args.filtered(OPT_chain_include))
2828
51
    Opts.ChainedIncludes.emplace_back(A->getValue());
2829
2830
5
  for (const auto *A : Args.filtered(OPT_remap_file)) {
2831
5
    std::pair<StringRef, StringRef> Split = StringRef(A->getValue()).split(';');
2832
2833
5
    if (Split.second.empty()) {
2834
0
      Diags.Report(diag::err_drv_invalid_remap_file) << A->getAsString(Args);
2835
0
      continue;
2836
0
    }
2837
2838
5
    Opts.addRemappedFile(Split.first, Split.second);
2839
5
  }
2840
2841
  // Always avoid lexing editor placeholders when we're just running the
2842
  // preprocessor as we never want to emit the
2843
  // "editor placeholder in source file" error in PP only mode.
2844
64.8k
  if (isStrictlyPreprocessorAction(Action))
2845
2.17k
    Opts.LexEditorPlaceholders = false;
2846
64.8k
}
2847
2848
static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
2849
                                        ArgList &Args,
2850
64.8k
                                        frontend::ActionKind Action) {
2851
64.8k
  if (isStrictlyPreprocessorAction(Action))
2852
2.17k
    Opts.ShowCPP = !Args.hasArg(OPT_dM);
2853
62.6k
  else
2854
62.6k
    Opts.ShowCPP = 0;
2855
2856
64.8k
  Opts.ShowMacros = Args.hasArg(OPT_dM) || 
Args.hasArg(OPT_dD)63.3k
;
2857
64.8k
}
2858
2859
static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
2860
64.8k
                            DiagnosticsEngine &Diags) {
2861
64.8k
  if (Arg *A = Args.getLastArg(options::OPT_target_sdk_version_EQ)) {
2862
6.18k
    llvm::VersionTuple Version;
2863
6.18k
    if (Version.tryParse(A->getValue()))
2864
0
      Diags.Report(diag::err_drv_invalid_value)
2865
0
          << A->getAsString(Args) << A->getValue();
2866
6.18k
    else
2867
6.18k
      Opts.SDKVersion = Version;
2868
6.18k
  }
2869
64.8k
}
2870
2871
bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
2872
                                        ArrayRef<const char *> CommandLineArgs,
2873
                                        DiagnosticsEngine &Diags,
2874
64.8k
                                        const char *Argv0) {
2875
64.8k
  bool Success = true;
2876
2877
  // Parse the arguments.
2878
64.8k
  const OptTable &Opts = getDriverOptTable();
2879
64.8k
  const unsigned IncludedFlagsBitmask = options::CC1Option;
2880
64.8k
  unsigned MissingArgIndex, MissingArgCount;
2881
64.8k
  InputArgList Args = Opts.ParseArgs(CommandLineArgs, MissingArgIndex,
2882
64.8k
                                     MissingArgCount, IncludedFlagsBitmask);
2883
64.8k
  LangOptions &LangOpts = *Res.getLangOpts();
2884
2885
  // Check for missing argument error.
2886
64.8k
  if (MissingArgCount) {
2887
0
    Diags.Report(diag::err_drv_missing_argument)
2888
0
        << Args.getArgString(MissingArgIndex) << MissingArgCount;
2889
0
    Success = false;
2890
0
  }
2891
2892
  // Issue errors on unknown arguments.
2893
18
  for (const auto *A : Args.filtered(OPT_UNKNOWN)) {
2894
18
    auto ArgString = A->getAsString(Args);
2895
18
    std::string Nearest;
2896
18
    if (Opts.findNearest(ArgString, Nearest, IncludedFlagsBitmask) > 1)
2897
16
      Diags.Report(diag::err_drv_unknown_argument) << ArgString;
2898
2
    else
2899
2
      Diags.Report(diag::err_drv_unknown_argument_with_suggestion)
2900
2
          << ArgString << Nearest;
2901
18
    Success = false;
2902
18
  }
2903
2904
64.8k
  Success &= Res.parseSimpleArgs(Args, Diags);
2905
2906
64.8k
  Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), Args, Diags);
2907
64.8k
  ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), Args);
2908
64.8k
  if (!Res.getDependencyOutputOpts().OutputFile.empty() &&
2909
3.15k
      Res.getDependencyOutputOpts().Targets.empty()) {
2910
0
    Diags.Report(diag::err_fe_dependency_file_requires_MT);
2911
0
    Success = false;
2912
0
  }
2913
64.8k
  Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags,
2914
64.8k
                                 /*DefaultDiagColor=*/false);
2915
  // FIXME: We shouldn't have to pass the DashX option around here
2916
64.8k
  InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), Args, Diags,
2917
64.8k
                                      LangOpts.IsHeaderFile);
2918
64.8k
  ParseTargetArgs(Res.getTargetOpts(), Args, Diags);
2919
64.8k
  llvm::Triple T(Res.getTargetOpts().Triple);
2920
64.8k
  ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), Args,
2921
64.8k
                        Res.getFileSystemOpts().WorkingDir);
2922
64.8k
  if (DashX.getFormat() == InputKind::Precompiled ||
2923
64.8k
      DashX.getLanguage() == Language::LLVM_IR) {
2924
    // ObjCAAutoRefCount and Sanitize LangOpts are used to setup the
2925
    // PassManager in BackendUtil.cpp. They need to be initializd no matter
2926
    // what the input type is.
2927
163
    if (Args.hasArg(OPT_fobjc_arc))
2928
1
      LangOpts.ObjCAutoRefCount = 1;
2929
    // PIClevel and PIELevel are needed during code generation and this should be
2930
    // set regardless of the input type.
2931
163
    LangOpts.PICLevel = getLastArgIntValue(Args, OPT_pic_level, 0, Diags);
2932
163
    LangOpts.PIE = Args.hasArg(OPT_pic_is_pie);
2933
163
    parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),
2934
163
                        Diags, LangOpts.Sanitize);
2935
64.6k
  } else {
2936
    // Other LangOpts are only initialized when the input is not AST or LLVM IR.
2937
    // FIXME: Should we really be calling this for an Language::Asm input?
2938
64.6k
    ParseLangArgs(LangOpts, Args, DashX, T, Res.getPreprocessorOpts().Includes,
2939
64.6k
                  Diags);
2940
64.6k
    if (Res.getFrontendOpts().ProgramAction == frontend::RewriteObjC)
2941
164
      LangOpts.ObjCExceptions = 1;
2942
64.6k
    if (T.isOSDarwin() && 
DashX.isPreprocessed()30.3k
) {
2943
      // Supress the darwin-specific 'stdlibcxx-not-found' diagnostic for
2944
      // preprocessed input as we don't expect it to be used with -std=libc++
2945
      // anyway.
2946
21
      Res.getDiagnosticOpts().Warnings.push_back("no-stdlibcxx-not-found");
2947
21
    }
2948
64.6k
  }
2949
2950
64.8k
  if (LangOpts.CUDA) {
2951
    // During CUDA device-side compilation, the aux triple is the
2952
    // triple used for host compilation.
2953
379
    if (LangOpts.CUDAIsDevice)
2954
218
      Res.getTargetOpts().HostTriple = Res.getFrontendOpts().AuxTriple;
2955
379
  }
2956
2957
  // Set the triple of the host for OpenMP device compile.
2958
64.8k
  if (LangOpts.OpenMPIsDevice)
2959
753
    Res.getTargetOpts().HostTriple = Res.getFrontendOpts().AuxTriple;
2960
2961
64.8k
  Success &= ParseCodeGenArgs(Res.getCodeGenOpts(), Args, DashX, Diags, T,
2962
64.8k
                              Res.getFrontendOpts().OutputFile, LangOpts);
2963
2964
  // FIXME: Override value name discarding when asan or msan is used because the
2965
  // backend passes depend on the name of the alloca in order to print out
2966
  // names.
2967
64.8k
  Res.getCodeGenOpts().DiscardValueNames &=
2968
64.8k
      !LangOpts.Sanitize.has(SanitizerKind::Address) &&
2969
64.7k
      !LangOpts.Sanitize.has(SanitizerKind::KernelAddress) &&
2970
64.7k
      !LangOpts.Sanitize.has(SanitizerKind::Memory) &&
2971
64.7k
      !LangOpts.Sanitize.has(SanitizerKind::KernelMemory);
2972
2973
64.8k
  ParsePreprocessorArgs(Res.getPreprocessorOpts(), Args, Diags,
2974
64.8k
                        Res.getFrontendOpts().ProgramAction);
2975
64.8k
  ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), Args,
2976
64.8k
                              Res.getFrontendOpts().ProgramAction);
2977
2978
  // Turn on -Wspir-compat for SPIR target.
2979
64.8k
  if (T.isSPIR())
2980
200
    Res.getDiagnosticOpts().Warnings.push_back("spir-compat");
2981
2982
  // If sanitizer is enabled, disable OPT_ffine_grained_bitfield_accesses.
2983
64.8k
  if (Res.getCodeGenOpts().FineGrainedBitfieldAccesses &&
2984
4
      !Res.getLangOpts()->Sanitize.empty()) {
2985
1
    Res.getCodeGenOpts().FineGrainedBitfieldAccesses = false;
2986
1
    Diags.Report(diag::warn_drv_fine_grained_bitfield_accesses_ignored);
2987
1
  }
2988
2989
  // Store the command-line for using in the CodeView backend.
2990
64.8k
  Res.getCodeGenOpts().Argv0 = Argv0;
2991
64.8k
  Res.getCodeGenOpts().CommandLineArgs = CommandLineArgs;
2992
2993
64.8k
  FixupInvocation(Res, Diags, Args);
2994
2995
64.8k
  return Success;
2996
64.8k
}
2997
2998
13.1k
std::string CompilerInvocation::getModuleHash() const {
2999
  // Note: For QoI reasons, the things we use as a hash here should all be
3000
  // dumped via the -module-info flag.
3001
13.1k
  using llvm::hash_code;
3002
13.1k
  using llvm::hash_value;
3003
13.1k
  using llvm::hash_combine;
3004
13.1k
  using llvm::hash_combine_range;
3005
3006
  // Start the signature with the compiler version.
3007
  // FIXME: We'd rather use something more cryptographically sound than
3008
  // CityHash, but this will do for now.
3009
13.1k
  hash_code code = hash_value(getClangFullRepositoryVersion());
3010
3011
  // Also include the serialization version, in case LLVM_APPEND_VC_REV is off
3012
  // and getClangFullRepositoryVersion() doesn't include git revision.
3013
13.1k
  code = hash_combine(code, serialization::VERSION_MAJOR,
3014
13.1k
                      serialization::VERSION_MINOR);
3015
3016
  // Extend the signature with the language options
3017
13.1k
#define LANGOPT(Name, Bits, Default, Description) \
3018
2.19M
   code = hash_combine(code, LangOpts->Name);
3019
13.1k
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
3020
276k
  code = hash_combine(code, static_cast<unsigned>(LangOpts->get##Name()));
3021
13.1k
#define BENIGN_LANGOPT(Name, Bits, Default, Description)
3022
13.1k
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description)
3023
13.1k
#include "clang/Basic/LangOptions.def"
3024
3025
13.1k
  for (StringRef Feature : LangOpts->ModuleFeatures)
3026
51
    code = hash_combine(code, Feature);
3027
3028
13.1k
  code = hash_combine(code, LangOpts->ObjCRuntime);
3029
13.1k
  const auto &BCN = LangOpts->CommentOpts.BlockCommandNames;
3030
13.1k
  code = hash_combine(code, hash_combine_range(BCN.begin(), BCN.end()));
3031
3032
  // Extend the signature with the target options.
3033
13.1k
  code = hash_combine(code, TargetOpts->Triple, TargetOpts->CPU,
3034
13.1k
                      TargetOpts->TuneCPU, TargetOpts->ABI);
3035
13.1k
  for (const auto &FeatureAsWritten : TargetOpts->FeaturesAsWritten)
3036
8
    code = hash_combine(code, FeatureAsWritten);
3037
3038
  // Extend the signature with preprocessor options.
3039
13.1k
  const PreprocessorOptions &ppOpts = getPreprocessorOpts();
3040
13.1k
  const HeaderSearchOptions &hsOpts = getHeaderSearchOpts();
3041
13.1k
  code = hash_combine(code, ppOpts.UsePredefines, ppOpts.DetailedRecord);
3042
3043
7.42k
  for (const auto &I : getPreprocessorOpts().Macros) {
3044
    // If we're supposed to ignore this macro for the purposes of modules,
3045
    // don't put it into the hash.
3046
7.42k
    if (!hsOpts.ModulesIgnoreMacros.empty()) {
3047
      // Check whether we're ignoring this macro.
3048
43
      StringRef MacroDef = I.first;
3049
43
      if (hsOpts.ModulesIgnoreMacros.count(
3050
43
              llvm::CachedHashString(MacroDef.split('=').first)))
3051
35
        continue;
3052
7.38k
    }
3053
3054
7.38k
    code = hash_combine(code, I.first, I.second);
3055
7.38k
  }
3056
3057
  // Extend the signature with the sysroot and other header search options.
3058
13.1k
  code = hash_combine(code, hsOpts.Sysroot,
3059
13.1k
                      hsOpts.ModuleFormat,
3060
13.1k
                      hsOpts.UseDebugInfo,
3061
13.1k
                      hsOpts.UseBuiltinIncludes,
3062
13.1k
                      hsOpts.UseStandardSystemIncludes,
3063
13.1k
                      hsOpts.UseStandardCXXIncludes,
3064
13.1k
                      hsOpts.UseLibcxx,
3065
13.1k
                      hsOpts.ModulesValidateDiagnosticOptions);
3066
13.1k
  code = hash_combine(code, hsOpts.ResourceDir);
3067
3068
13.1k
  if (hsOpts.ModulesStrictContextHash) {
3069
87
    hash_code SHPC = hash_combine_range(hsOpts.SystemHeaderPrefixes.begin(),
3070
87
                                        hsOpts.SystemHeaderPrefixes.end());
3071
87
    hash_code UEC = hash_combine_range(hsOpts.UserEntries.begin(),
3072
87
                                       hsOpts.UserEntries.end());
3073
87
    code = hash_combine(code, hsOpts.SystemHeaderPrefixes.size(), SHPC,
3074
87
                        hsOpts.UserEntries.size(), UEC);
3075
3076
87
    const DiagnosticOptions &diagOpts = getDiagnosticOpts();
3077
87
    #define DIAGOPT(Name, Bits, Default) \
3078
2.69k
      code = hash_combine(code, diagOpts.Name);
3079
87
    #define ENUM_DIAGOPT(Name, Type, Bits, Default) \
3080
261
      code = hash_combine(code, diagOpts.get##Name());
3081
87
    #include "clang/Basic/DiagnosticOptions.def"
3082
87
    #undef DIAGOPT
3083
87
    #undef ENUM_DIAGOPT
3084
87
  }
3085
3086
  // Extend the signature with the user build path.
3087
13.1k
  code = hash_combine(code, hsOpts.ModuleUserBuildPath);
3088
3089
  // Extend the signature with the module file extensions.
3090
13.1k
  const FrontendOptions &frontendOpts = getFrontendOpts();
3091
52
  for (const auto &ext : frontendOpts.ModuleFileExtensions) {
3092
52
    code = ext->hashExtension(code);
3093
52
  }
3094
3095
  // When compiling with -gmodules, also hash -fdebug-prefix-map as it
3096
  // affects the debug info in the PCM.
3097
13.1k
  if (getCodeGenOpts().DebugTypeExtRefs)
3098
1.59k
    for (const auto &KeyValue : getCodeGenOpts().DebugPrefixMap)
3099
8
      code = hash_combine(code, KeyValue.first, KeyValue.second);
3100
3101
  // Extend the signature with the enabled sanitizers, if at least one is
3102
  // enabled. Sanitizers which cannot affect AST generation aren't hashed.
3103
13.1k
  SanitizerSet SanHash = LangOpts->Sanitize;
3104
13.1k
  SanHash.clear(getPPTransparentSanitizers());
3105
13.1k
  if (!SanHash.empty())
3106
9
    code = hash_combine(code, SanHash.Mask);
3107
3108
13.1k
  return llvm::APInt(64, code).toString(36, /*Signed=*/false);
3109
13.1k
}
3110
3111
void CompilerInvocation::generateCC1CommandLine(
3112
38
    SmallVectorImpl<const char *> &Args, StringAllocator SA) const {
3113
  // Capture the extracted value as a lambda argument to avoid potential issues
3114
  // with lifetime extension of the reference.
3115
38
#define GENERATE_OPTION_WITH_MARSHALLING(                                      \
3116
38
    ARGS, STRING_ALLOCATOR, KIND, FLAGS, SPELLING, ALWAYS_EMIT, KEYPATH,       \
3117
38
    DEFAULT_VALUE, IMPLIED_CHECK, IMPLIED_VALUE, DENORMALIZER, EXTRACTOR,      \
3118
38
    TABLE_INDEX)                                                               \
3119
24.3k
  if ((FLAGS)&options::CC1Option) {                                            \
3120
21.1k
    [&](const auto &Extracted) {                                               \
3121
21.1k
      if (ALWAYS_EMIT ||                                                       \
3122
21.0k
          (Extracted !=                                                        \
3123
1.13k
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? 
(20
IMPLIED_VALUE0
) \
3124
21.0k
                                                          : (
DEFAULT_VALUE38
)))) \
3125
63
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
63
                     TABLE_INDEX, Extracted);                                  \
3127
21.1k
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_3::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_4::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_5::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_6::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_7::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_8::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_9::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_10::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_11::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_12::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_13::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_14::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_15::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_16::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_17::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_18::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_19::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_20::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_21::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_22::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_23::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_24::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_25::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_26::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_27::operator()<clang::DependencyOutputFormat>(clang::DependencyOutputFormat const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_28::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_29::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_30::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_31::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_32::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_33::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
2
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
2
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_34::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_35::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
150
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? 
(IMPLIED_VALUE)2
\
3124
36
                                                          : (DEFAULT_VALUE)))) \
3125
2
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
2
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_36::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_37::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_38::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_39::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_41::operator()<bool>(bool const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_42::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_44::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_46::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_48::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_49::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_50::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_51::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_52::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_53::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_55::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_57::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_58::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_60::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
1
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
1
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_62::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_63::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_65::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_66::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_67::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_68::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_70::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_71::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_73::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_75::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_77::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_78::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_79::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_80::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_81::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_82::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_84::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_86::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_88::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_89::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
2
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
2
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_90::operator()<bool>(bool const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_91::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_92::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_94::operator()<clang::LangOptions::CoreFoundationABI>(clang::LangOptions::CoreFoundationABI const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_95::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_97::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_98::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_100::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_101::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_102::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_103::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_105::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_107::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_108::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_109::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_110::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_112::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_114::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_115::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_116::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_117::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_118::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_120::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_121::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_122::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
76
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? 
(IMPLIED_VALUE)0
\
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_123::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
150
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? 
(IMPLIED_VALUE)2
\
3124
36
                                                          : (DEFAULT_VALUE)))) \
3125
2
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
2
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_124::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_126::operator()<bool>(bool const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_127::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_129::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_131::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_132::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_133::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_134::operator()<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_135::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_136::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_137::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_138::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_139::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_140::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_141::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_142::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_143::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_144::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_145::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_146::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_147::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_148::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_149::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_150::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_151::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_152::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_153::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_154::operator()<unsigned int>(unsigned int const&) const
Line
Count
Source
3120
38
    [&](const auto &Extracted) {                                               \
3121
38
      if (ALWAYS_EMIT ||                                                       \
3122
38
          (Extracted !=                                                        \
3123
0
           static_cast<decltype(KEYPATH)>((IMPLIED_CHECK) ? (IMPLIED_VALUE)    \
3124
38
                                                          : (DEFAULT_VALUE)))) \
3125
0
        DENORMALIZER(ARGS, SPELLING, STRING_ALLOCATOR, Option::KIND##Class,    \
3126
0
                     TABLE_INDEX, Extracted);                                  \
3127
38
    }(EXTRACTOR(KEYPATH));                                                     \
CompilerInvocation.cpp:auto clang::CompilerInvocation::generateCC1CommandLine(llvm::SmallVectorImpl<char const*>&, llvm::function_ref<char const* (llvm::Twine const&)>) const::$_155::ope