Coverage Report

Created: 2020-09-19 12:23

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Driver/ToolChains/Darwin.h
Line
Count
Source (jump to first uncovered line)
1
//===--- Darwin.h - Darwin ToolChain Implementations ------------*- C++ -*-===//
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
#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H
10
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H
11
12
#include "Cuda.h"
13
#include "ROCm.h"
14
#include "clang/Driver/DarwinSDKInfo.h"
15
#include "clang/Driver/Tool.h"
16
#include "clang/Driver/ToolChain.h"
17
#include "clang/Driver/XRayArgs.h"
18
19
namespace clang {
20
namespace driver {
21
22
namespace toolchains {
23
class MachO;
24
} // end namespace toolchains
25
26
namespace tools {
27
28
namespace darwin {
29
llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str);
30
void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str);
31
32
class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool {
33
  virtual void anchor();
34
35
protected:
36
  void AddMachOArch(const llvm::opt::ArgList &Args,
37
                    llvm::opt::ArgStringList &CmdArgs) const;
38
39
17.1k
  const toolchains::MachO &getMachOToolChain() const {
40
17.1k
    return reinterpret_cast<const toolchains::MachO &>(getToolChain());
41
17.1k
  }
42
43
public:
44
  MachOTool(const char *Name, const char *ShortName, const ToolChain &TC)
45
3.55k
      : Tool(Name, ShortName, TC) {}
46
};
47
48
class LLVM_LIBRARY_VISIBILITY Assembler : public MachOTool {
49
public:
50
  Assembler(const ToolChain &TC)
51
11
      : MachOTool("darwin::Assembler", "assembler", TC) {}
52
53
11
  bool hasIntegratedCPP() const override { return false; }
54
55
  void ConstructJob(Compilation &C, const JobAction &JA,
56
                    const InputInfo &Output, const InputInfoList &Inputs,
57
                    const llvm::opt::ArgList &TCArgs,
58
                    const char *LinkingOutput) const override;
59
};
60
61
class LLVM_LIBRARY_VISIBILITY Linker : public MachOTool {
62
  bool NeedsTempPath(const InputInfoList &Inputs) const;
63
  void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args,
64
                   llvm::opt::ArgStringList &CmdArgs,
65
                   const InputInfoList &Inputs, unsigned Version[5]) const;
66
67
public:
68
3.44k
  Linker(const ToolChain &TC) : MachOTool("darwin::Linker", "linker", TC) {}
69
70
3.43k
  bool hasIntegratedCPP() const override { return false; }
71
0
  bool isLinkJob() const override { return true; }
72
73
  void ConstructJob(Compilation &C, const JobAction &JA,
74
                    const InputInfo &Output, const InputInfoList &Inputs,
75
                    const llvm::opt::ArgList &TCArgs,
76
                    const char *LinkingOutput) const override;
77
};
78
79
class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool {
80
public:
81
12
  Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {}
82
83
10
  bool hasIntegratedCPP() const override { return false; }
84
85
  void ConstructJob(Compilation &C, const JobAction &JA,
86
                    const InputInfo &Output, const InputInfoList &Inputs,
87
                    const llvm::opt::ArgList &TCArgs,
88
                    const char *LinkingOutput) const override;
89
};
90
91
class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool {
92
public:
93
  Dsymutil(const ToolChain &TC)
94
85
      : MachOTool("darwin::Dsymutil", "dsymutil", TC) {}
95
96
85
  bool hasIntegratedCPP() const override { return false; }
97
0
  bool isDsymutilJob() const override { return true; }
98
99
  void ConstructJob(Compilation &C, const JobAction &JA,
100
                    const InputInfo &Output, const InputInfoList &Inputs,
101
                    const llvm::opt::ArgList &TCArgs,
102
                    const char *LinkingOutput) const override;
103
};
104
105
class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool {
106
public:
107
  VerifyDebug(const ToolChain &TC)
108
2
      : MachOTool("darwin::VerifyDebug", "dwarfdump", TC) {}
109
110
2
  bool hasIntegratedCPP() const override { return false; }
111
112
  void ConstructJob(Compilation &C, const JobAction &JA,
113
                    const InputInfo &Output, const InputInfoList &Inputs,
114
                    const llvm::opt::ArgList &TCArgs,
115
                    const char *LinkingOutput) const override;
116
};
117
} // end namespace darwin
118
} // end namespace tools
119
120
namespace toolchains {
121
122
class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
123
protected:
124
  Tool *buildAssembler() const override;
125
  Tool *buildLinker() const override;
126
  Tool *getTool(Action::ActionClass AC) const override;
127
128
private:
129
  mutable std::unique_ptr<tools::darwin::Lipo> Lipo;
130
  mutable std::unique_ptr<tools::darwin::Dsymutil> Dsymutil;
131
  mutable std::unique_ptr<tools::darwin::VerifyDebug> VerifyDebug;
132
133
public:
134
  MachO(const Driver &D, const llvm::Triple &Triple,
135
        const llvm::opt::ArgList &Args);
136
  ~MachO() override;
137
138
  /// @name MachO specific toolchain API
139
  /// {
140
141
  /// Get the "MachO" arch name for a particular compiler invocation. For
142
  /// example, Apple treats different ARM variations as distinct architectures.
143
  StringRef getMachOArchName(const llvm::opt::ArgList &Args) const;
144
145
  /// Add the linker arguments to link the ARC runtime library.
146
  virtual void AddLinkARCArgs(const llvm::opt::ArgList &Args,
147
0
                              llvm::opt::ArgStringList &CmdArgs) const {}
148
149
  /// Add the linker arguments to link the compiler runtime library.
150
  ///
151
  /// FIXME: This API is intended for use with embedded libraries only, and is
152
  /// misleadingly named.
153
  virtual void AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args,
154
                                     llvm::opt::ArgStringList &CmdArgs,
155
                                     bool ForceLinkBuiltinRT = false) const;
156
157
  virtual void addStartObjectFileArgs(const llvm::opt::ArgList &Args,
158
10
                                      llvm::opt::ArgStringList &CmdArgs) const {
159
10
  }
160
161
  virtual void addMinVersionArgs(const llvm::opt::ArgList &Args,
162
0
                                 llvm::opt::ArgStringList &CmdArgs) const {}
163
164
  virtual void addPlatformVersionArgs(const llvm::opt::ArgList &Args,
165
10
                                      llvm::opt::ArgStringList &CmdArgs) const {
166
10
  }
167
168
  /// On some iOS platforms, kernel and kernel modules were built statically. Is
169
  /// this such a target?
170
0
  virtual bool isKernelStatic() const { return false; }
171
172
  /// Is the target either iOS or an iOS simulator?
173
3.43k
  bool isTargetIOSBased() const { return false; }
174
175
  /// Options to control how a runtime library is linked.
176
  enum RuntimeLinkOptions : unsigned {
177
    /// Link the library in even if it can't be found in the VFS.
178
    RLO_AlwaysLink = 1 << 0,
179
180
    /// Use the embedded runtime from the macho_embedded directory.
181
    RLO_IsEmbedded = 1 << 1,
182
183
    /// Emit rpaths for @executable_path as well as the resource directory.
184
    RLO_AddRPath = 1 << 2,
185
186
    /// Link the library in before any others.
187
    RLO_FirstLink = 1 << 3,
188
  };
189
190
  /// Add a runtime library to the list of items to link.
191
  void AddLinkRuntimeLib(const llvm::opt::ArgList &Args,
192
                         llvm::opt::ArgStringList &CmdArgs, StringRef Component,
193
                         RuntimeLinkOptions Opts = RuntimeLinkOptions(),
194
                         bool IsShared = false) const;
195
196
  /// Add any profiling runtime libraries that are needed. This is essentially a
197
  /// MachO specific version of addProfileRT in Tools.cpp.
198
  void addProfileRTLibs(const llvm::opt::ArgList &Args,
199
10
                        llvm::opt::ArgStringList &CmdArgs) const override {
200
    // There aren't any profiling libs for embedded targets currently.
201
10
  }
202
203
  /// }
204
  /// @name ToolChain Implementation
205
  /// {
206
207
  types::ID LookupTypeForExtension(StringRef Ext) const override;
208
209
  bool HasNativeLLVMSupport() const override;
210
211
  llvm::opt::DerivedArgList *
212
  TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
213
                Action::OffloadKind DeviceOffloadKind) const override;
214
215
18.0k
  bool IsBlocksDefault() const override {
216
    // Always allow blocks on Apple; users interested in versioning are
217
    // expected to use /usr/include/Block.h.
218
18.0k
    return true;
219
18.0k
  }
220
102k
  bool IsIntegratedAssemblerDefault() const override {
221
    // Default integrated assembler to on for Apple's MachO targets.
222
102k
    return true;
223
102k
  }
224
225
18.1k
  bool IsMathErrnoDefault() const override { return false; }
226
227
18.0k
  bool IsEncodeExtendedBlockSignatureDefault() const override { return true; }
228
229
18.0k
  bool IsObjCNonFragileABIDefault() const override {
230
    // Non-fragile ABI is default for everything but i386.
231
18.0k
    return getTriple().getArch() != llvm::Triple::x86;
232
18.0k
  }
233
234
0
  bool UseObjCMixedDispatch() const override { return true; }
235
236
  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
237
238
0
  RuntimeLibType GetDefaultRuntimeLibType() const override {
239
0
    return ToolChain::RLT_CompilerRT;
240
0
  }
241
242
  bool isPICDefault() const override;
243
  bool isPIEDefault() const override;
244
  bool isPICDefaultForced() const override;
245
246
  bool SupportsProfiling() const override;
247
248
  bool UseDwarfDebugFlags() const override;
249
250
  llvm::ExceptionHandling
251
56
  GetExceptionModel(const llvm::opt::ArgList &Args) const override {
252
56
    return llvm::ExceptionHandling::None;
253
56
  }
254
255
10
  virtual StringRef getOSLibraryNameSuffix(bool IgnoreSim = false) const {
256
10
    return "";
257
10
  }
258
259
  // Darwin toolchain uses legacy thin LTO API, which is not
260
  // capable of unit splitting.
261
2
  bool canSplitThinLTOUnit() const override { return false; }
262
  /// }
263
};
264
265
/// Darwin - The base Darwin tool chain.
266
class LLVM_LIBRARY_VISIBILITY Darwin : public MachO {
267
public:
268
  /// Whether the information on the target has been initialized.
269
  //
270
  // FIXME: This should be eliminated. What we want to do is make this part of
271
  // the "default target for arguments" selection process, once we get out of
272
  // the argument translation business.
273
  mutable bool TargetInitialized;
274
275
  enum DarwinPlatformKind {
276
    MacOS,
277
    IPhoneOS,
278
    TvOS,
279
    WatchOS,
280
    LastDarwinPlatform = WatchOS
281
  };
282
  enum DarwinEnvironmentKind {
283
    NativeEnvironment,
284
    Simulator,
285
  };
286
287
  mutable DarwinPlatformKind TargetPlatform;
288
  mutable DarwinEnvironmentKind TargetEnvironment;
289
290
  /// The OS version we are targeting.
291
  mutable VersionTuple TargetVersion;
292
293
  /// The information about the darwin SDK that was used.
294
  mutable Optional<DarwinSDKInfo> SDKInfo;
295
296
  CudaInstallationDetector CudaInstallation;
297
  RocmInstallationDetector RocmInstallation;
298
299
private:
300
  void AddDeploymentTarget(llvm::opt::DerivedArgList &Args) const;
301
302
public:
303
  Darwin(const Driver &D, const llvm::Triple &Triple,
304
         const llvm::opt::ArgList &Args);
305
  ~Darwin() override;
306
307
  std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args,
308
                                          types::ID InputType) const override;
309
310
  /// @name Apple Specific Toolchain Implementation
311
  /// {
312
313
  void addMinVersionArgs(const llvm::opt::ArgList &Args,
314
                         llvm::opt::ArgStringList &CmdArgs) const override;
315
316
  void addPlatformVersionArgs(const llvm::opt::ArgList &Args,
317
                              llvm::opt::ArgStringList &CmdArgs) const override;
318
319
  void addStartObjectFileArgs(const llvm::opt::ArgList &Args,
320
                              llvm::opt::ArgStringList &CmdArgs) const override;
321
322
1
  bool isKernelStatic() const override {
323
1
    return (!(isTargetIPhoneOS() && !isIPhoneOSVersionLT(6, 0)) &&
324
0
            !isTargetWatchOS());
325
1
  }
326
327
  void addProfileRTLibs(const llvm::opt::ArgList &Args,
328
                        llvm::opt::ArgStringList &CmdArgs) const override;
329
330
protected:
331
  /// }
332
  /// @name Darwin specific Toolchain functions
333
  /// {
334
335
  // FIXME: Eliminate these ...Target functions and derive separate tool chains
336
  // for these targets and put version in constructor.
337
  void setTarget(DarwinPlatformKind Platform, DarwinEnvironmentKind Environment,
338
20.6k
                 unsigned Major, unsigned Minor, unsigned Micro) const {
339
    // FIXME: For now, allow reinitialization as long as values don't
340
    // change. This will go away when we move away from argument translation.
341
20.6k
    if (TargetInitialized && 
TargetPlatform == Platform64
&&
342
64
        TargetEnvironment == Environment &&
343
64
        TargetVersion == VersionTuple(Major, Minor, Micro))
344
64
      return;
345
20.5k
346
20.5k
    assert(!TargetInitialized && "Target already initialized!");
347
20.5k
    TargetInitialized = true;
348
20.5k
    TargetPlatform = Platform;
349
20.5k
    TargetEnvironment = Environment;
350
20.5k
    TargetVersion = VersionTuple(Major, Minor, Micro);
351
20.5k
    if (Environment == Simulator)
352
87
      const_cast<Darwin *>(this)->setTripleEnvironment(llvm::Triple::Simulator);
353
20.5k
  }
354
355
public:
356
153k
  bool isTargetIPhoneOS() const {
357
153k
    assert(TargetInitialized && "Target not initialized!");
358
153k
    return (TargetPlatform == IPhoneOS || 
TargetPlatform == TvOS150k
) &&
359
3.31k
           TargetEnvironment == NativeEnvironment;
360
153k
  }
361
362
128k
  bool isTargetIOSSimulator() const {
363
128k
    assert(TargetInitialized && "Target not initialized!");
364
128k
    return (TargetPlatform == IPhoneOS || 
TargetPlatform == TvOS127k
) &&
365
1.04k
           TargetEnvironment == Simulator;
366
128k
  }
367
368
129k
  bool isTargetIOSBased() const {
369
129k
    assert(TargetInitialized && "Target not initialized!");
370
129k
    return isTargetIPhoneOS() || 
isTargetIOSSimulator()127k
;
371
129k
  }
372
373
78
  bool isTargetTvOS() const {
374
78
    assert(TargetInitialized && "Target not initialized!");
375
78
    return TargetPlatform == TvOS && 
TargetEnvironment == NativeEnvironment11
;
376
78
  }
377
378
413
  bool isTargetTvOSSimulator() const {
379
413
    assert(TargetInitialized && "Target not initialized!");
380
413
    return TargetPlatform == TvOS && 
TargetEnvironment == Simulator26
;
381
413
  }
382
383
21.6k
  bool isTargetTvOSBased() const {
384
21.6k
    assert(TargetInitialized && "Target not initialized!");
385
21.6k
    return TargetPlatform == TvOS;
386
21.6k
  }
387
388
90
  bool isTargetWatchOS() const {
389
90
    assert(TargetInitialized && "Target not initialized!");
390
90
    return TargetPlatform == WatchOS && 
TargetEnvironment == NativeEnvironment12
;
391
90
  }
392
393
80
  bool isTargetWatchOSSimulator() const {
394
80
    assert(TargetInitialized && "Target not initialized!");
395
80
    return TargetPlatform == WatchOS && 
TargetEnvironment == Simulator3
;
396
80
  }
397
398
116k
  bool isTargetWatchOSBased() const {
399
116k
    assert(TargetInitialized && "Target not initialized!");
400
116k
    return TargetPlatform == WatchOS;
401
116k
  }
402
403
222k
  bool isTargetMacOS() const {
404
222k
    assert(TargetInitialized && "Target not initialized!");
405
222k
    return TargetPlatform == MacOS;
406
222k
  }
407
408
5
  bool isTargetMacOSBased() const {
409
5
    assert(TargetInitialized && "Target not initialized!");
410
    // FIXME (Alex L): Add remaining MacCatalyst suppport.
411
5
    return TargetPlatform == MacOS;
412
5
  }
413
414
5
  bool isTargetAppleSiliconMac() const {
415
5
    assert(TargetInitialized && "Target not initialized!");
416
5
    return isTargetMacOSBased() && getArch() == llvm::Triple::aarch64;
417
5
  }
418
419
21.7k
  bool isTargetInitialized() const { return TargetInitialized; }
420
421
25.1k
  VersionTuple getTargetVersion() const {
422
25.1k
    assert(TargetInitialized && "Target not initialized!");
423
25.1k
    return TargetVersion;
424
25.1k
  }
425
426
  bool isIPhoneOSVersionLT(unsigned V0, unsigned V1 = 0,
427
1.28k
                           unsigned V2 = 0) const {
428
1.28k
    assert(isTargetIOSBased() && "Unexpected call for non iOS target!");
429
1.28k
    return TargetVersion < VersionTuple(V0, V1, V2);
430
1.28k
  }
431
432
  /// Returns true if the minimum supported macOS version for the slice that's
433
  /// being built is less than the specified version. If there's no minimum
434
  /// supported macOS version, the deployment target version is compared to the
435
  /// specifed version instead.
436
93.0k
  bool isMacosxVersionLT(unsigned V0, unsigned V1 = 0, unsigned V2 = 0) const {
437
93.0k
    assert(isTargetMacOS() && getTriple().isMacOSX() &&
438
93.0k
           "Unexpected call for non OS X target!");
439
    // The effective triple might not be initialized yet, so construct a
440
    // pseudo-effective triple to get the minimum supported OS version.
441
93.0k
    VersionTuple MinVers =
442
93.0k
        llvm::Triple(getTriple().getArchName(), "apple", "macos")
443
93.0k
            .getMinimumSupportedOSVersion();
444
93.0k
    return (!MinVers.empty() && 
MinVers > TargetVersion85
445
80
                ? MinVers
446
92.9k
                : TargetVersion) < VersionTuple(V0, V1, V2);
447
93.0k
  }
448
449
protected:
450
  /// Return true if c++17 aligned allocation/deallocation functions are not
451
  /// implemented in the c++ standard library of the deployment target we are
452
  /// targeting.
453
  bool isAlignedAllocationUnavailable() const;
454
455
  void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
456
                             llvm::opt::ArgStringList &CC1Args,
457
                             Action::OffloadKind DeviceOffloadKind) const override;
458
459
  StringRef getPlatformFamily() const;
460
  StringRef getOSLibraryNameSuffix(bool IgnoreSim = false) const override;
461
462
public:
463
  static StringRef getSDKName(StringRef isysroot);
464
465
  /// }
466
  /// @name ToolChain Implementation
467
  /// {
468
469
  // Darwin tools support multiple architecture (e.g., i386 and x86_64) and
470
  // most development is done against SDKs, so compiling for a different
471
  // architecture should not get any special treatment.
472
3.42k
  bool isCrossCompiling() const override { return false; }
473
474
  llvm::opt::DerivedArgList *
475
  TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef BoundArch,
476
                Action::OffloadKind DeviceOffloadKind) const override;
477
478
  CXXStdlibType GetDefaultCXXStdlibType() const override;
479
  ObjCRuntime getDefaultObjCRuntime(bool isNonFragile) const override;
480
  bool hasBlocksRuntime() const override;
481
482
  void AddCudaIncludeArgs(const llvm::opt::ArgList &DriverArgs,
483
                          llvm::opt::ArgStringList &CC1Args) const override;
484
  void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs,
485
                         llvm::opt::ArgStringList &CC1Args) const override;
486
487
26
  bool UseObjCMixedDispatch() const override {
488
    // This is only used with the non-fragile ABI and non-legacy dispatch.
489
26
490
    // Mixed dispatch is used everywhere except OS X before 10.6.
491
26
    return !(isTargetMacOS() && isMacosxVersionLT(10, 6));
492
26
  }
493
494
18.0k
  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
495
    // Stack protectors default to on for user code on 10.5,
496
    // and for everything in 10.6 and beyond
497
18.0k
    if (isTargetIOSBased() || 
isTargetWatchOSBased()17.8k
)
498
233
      return 1;
499
17.8k
    else if (isTargetMacOS() && !isMacosxVersionLT(10, 6))
500
17.7k
      return 1;
501
56
    else if (isTargetMacOS() && 
!isMacosxVersionLT(10, 5)55
&&
!KernelOrKext42
)
502
39
      return 1;
503
17
504
17
    return 0;
505
17
  }
506
507
  void CheckObjCARC() const override;
508
509
  llvm::ExceptionHandling GetExceptionModel(
510
      const llvm::opt::ArgList &Args) const override;
511
512
  bool SupportsEmbeddedBitcode() const override;
513
514
  SanitizerMask getSupportedSanitizers() const override;
515
516
  void printVerboseInfo(raw_ostream &OS) const override;
517
};
518
519
/// DarwinClang - The Darwin toolchain used by Clang.
520
class LLVM_LIBRARY_VISIBILITY DarwinClang : public Darwin {
521
public:
522
  DarwinClang(const Driver &D, const llvm::Triple &Triple,
523
              const llvm::opt::ArgList &Args);
524
525
  /// @name Apple ToolChain Implementation
526
  /// {
527
528
  RuntimeLibType GetRuntimeLibType(const llvm::opt::ArgList &Args) const override;
529
530
  void AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args,
531
                             llvm::opt::ArgStringList &CmdArgs,
532
                             bool ForceLinkBuiltinRT = false) const override;
533
534
  void AddClangCXXStdlibIncludeArgs(
535
      const llvm::opt::ArgList &DriverArgs,
536
      llvm::opt::ArgStringList &CC1Args) const override;
537
538
  void AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
539
                                 llvm::opt::ArgStringList &CC1Args) const override;
540
541
  void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
542
                           llvm::opt::ArgStringList &CmdArgs) const override;
543
544
  void AddCCKextLibArgs(const llvm::opt::ArgList &Args,
545
                        llvm::opt::ArgStringList &CmdArgs) const override;
546
547
  void addClangWarningOptions(llvm::opt::ArgStringList &CC1Args) const override;
548
549
  void AddLinkARCArgs(const llvm::opt::ArgList &Args,
550
                      llvm::opt::ArgStringList &CmdArgs) const override;
551
552
  unsigned GetDefaultDwarfVersion() const override;
553
  // Until dtrace (via CTF) and LLDB can deal with distributed debug info,
554
  // Darwin defaults to standalone/full debug info.
555
62
  bool GetDefaultStandaloneDebug() const override { return true; }
556
18.0k
  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
557
18.0k
    return llvm::DebuggerKind::LLDB;
558
18.0k
  }
559
560
  /// }
561
562
private:
563
  void AddLinkSanitizerLibArgs(const llvm::opt::ArgList &Args,
564
                               llvm::opt::ArgStringList &CmdArgs,
565
                               StringRef Sanitizer,
566
                               bool shared = true) const;
567
568
  bool AddGnuCPlusPlusIncludePaths(const llvm::opt::ArgList &DriverArgs,
569
                                   llvm::opt::ArgStringList &CC1Args,
570
                                   llvm::SmallString<128> Base,
571
                                   llvm::StringRef Version,
572
                                   llvm::StringRef ArchDir,
573
                                   llvm::StringRef BitDir) const;
574
575
  llvm::StringRef GetHeaderSysroot(const llvm::opt::ArgList &DriverArgs) const;
576
};
577
578
} // end namespace toolchains
579
} // end namespace driver
580
} // end namespace clang
581
582
#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DARWIN_H