Coverage Report

Created: 2021-01-19 06:58

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/lib/Basic/Targets/OSTargets.h
Line
Count
Source (jump to first uncovered line)
1
//===--- OSTargets.h - Declare OS target feature support --------*- 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
// This file declares OS specific TargetInfo types.
10
//===----------------------------------------------------------------------===//
11
12
#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_OSTARGETS_H
13
#define LLVM_CLANG_LIB_BASIC_TARGETS_OSTARGETS_H
14
15
#include "Targets.h"
16
#include "llvm/MC/MCSectionMachO.h"
17
18
namespace clang {
19
namespace targets {
20
21
template <typename TgtInfo>
22
class LLVM_LIBRARY_VISIBILITY OSTargetInfo : public TgtInfo {
23
protected:
24
  virtual void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
25
                            MacroBuilder &Builder) const = 0;
26
27
public:
28
  OSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
29
72.4k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::PPC32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
131
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::PPC64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
352
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::X86_32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
1.48k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::X86_64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
67.2k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::HexagonTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
3
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::AArch64leTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
2.15k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::AArch64beTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
9
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::ARMleTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
599
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::ARMbeTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
11
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::MipsTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
186
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::NaClMips32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
3
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::PNaClTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
15
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RISCV32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
24
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RISCV64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
23
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::SparcV8TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
10
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::SparcV8elTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
1
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::SparcV9TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
19
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::SystemZTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
101
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::WebAssembly32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
62
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::WebAssembly64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
32
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RenderScript32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
1
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RenderScript64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
1
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::VETargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
3
      : TgtInfo(Triple, Opts) {}
30
31
  void getTargetDefines(const LangOptions &Opts,
32
64.7k
                        MacroBuilder &Builder) const override {
33
64.7k
    TgtInfo::getTargetDefines(Opts, Builder);
34
64.7k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
64.7k
  }
clang::targets::OSTargetInfo<clang::targets::PPC32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
131
                        MacroBuilder &Builder) const override {
33
131
    TgtInfo::getTargetDefines(Opts, Builder);
34
131
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
131
  }
clang::targets::OSTargetInfo<clang::targets::PPC64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
330
                        MacroBuilder &Builder) const override {
33
330
    TgtInfo::getTargetDefines(Opts, Builder);
34
330
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
330
  }
clang::targets::OSTargetInfo<clang::targets::X86_32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
1.46k
                        MacroBuilder &Builder) const override {
33
1.46k
    TgtInfo::getTargetDefines(Opts, Builder);
34
1.46k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
1.46k
  }
clang::targets::OSTargetInfo<clang::targets::X86_64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
59.5k
                        MacroBuilder &Builder) const override {
33
59.5k
    TgtInfo::getTargetDefines(Opts, Builder);
34
59.5k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
59.5k
  }
clang::targets::OSTargetInfo<clang::targets::HexagonTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
3
                        MacroBuilder &Builder) const override {
33
3
    TgtInfo::getTargetDefines(Opts, Builder);
34
3
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
3
  }
clang::targets::OSTargetInfo<clang::targets::AArch64leTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
2.15k
                        MacroBuilder &Builder) const override {
33
2.15k
    TgtInfo::getTargetDefines(Opts, Builder);
34
2.15k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
2.15k
  }
clang::targets::OSTargetInfo<clang::targets::AArch64beTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
9
                        MacroBuilder &Builder) const override {
33
9
    TgtInfo::getTargetDefines(Opts, Builder);
34
9
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
9
  }
clang::targets::OSTargetInfo<clang::targets::ARMleTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
588
                        MacroBuilder &Builder) const override {
33
588
    TgtInfo::getTargetDefines(Opts, Builder);
34
588
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
588
  }
clang::targets::OSTargetInfo<clang::targets::ARMbeTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
11
                        MacroBuilder &Builder) const override {
33
11
    TgtInfo::getTargetDefines(Opts, Builder);
34
11
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
11
  }
clang::targets::OSTargetInfo<clang::targets::MipsTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
176
                        MacroBuilder &Builder) const override {
33
176
    TgtInfo::getTargetDefines(Opts, Builder);
34
176
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
176
  }
clang::targets::OSTargetInfo<clang::targets::NaClMips32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
3
                        MacroBuilder &Builder) const override {
33
3
    TgtInfo::getTargetDefines(Opts, Builder);
34
3
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
3
  }
clang::targets::OSTargetInfo<clang::targets::PNaClTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
15
                        MacroBuilder &Builder) const override {
33
15
    TgtInfo::getTargetDefines(Opts, Builder);
34
15
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
15
  }
clang::targets::OSTargetInfo<clang::targets::RISCV32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
24
                        MacroBuilder &Builder) const override {
33
24
    TgtInfo::getTargetDefines(Opts, Builder);
34
24
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
24
  }
clang::targets::OSTargetInfo<clang::targets::RISCV64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
23
                        MacroBuilder &Builder) const override {
33
23
    TgtInfo::getTargetDefines(Opts, Builder);
34
23
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
23
  }
clang::targets::OSTargetInfo<clang::targets::SparcV8TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
10
                        MacroBuilder &Builder) const override {
33
10
    TgtInfo::getTargetDefines(Opts, Builder);
34
10
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
10
  }
clang::targets::OSTargetInfo<clang::targets::SparcV8elTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
1
                        MacroBuilder &Builder) const override {
33
1
    TgtInfo::getTargetDefines(Opts, Builder);
34
1
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
1
  }
clang::targets::OSTargetInfo<clang::targets::SparcV9TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
11
                        MacroBuilder &Builder) const override {
33
11
    TgtInfo::getTargetDefines(Opts, Builder);
34
11
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
11
  }
clang::targets::OSTargetInfo<clang::targets::SystemZTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
101
                        MacroBuilder &Builder) const override {
33
101
    TgtInfo::getTargetDefines(Opts, Builder);
34
101
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
101
  }
clang::targets::OSTargetInfo<clang::targets::WebAssembly32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
61
                        MacroBuilder &Builder) const override {
33
61
    TgtInfo::getTargetDefines(Opts, Builder);
34
61
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
61
  }
clang::targets::OSTargetInfo<clang::targets::WebAssembly64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
31
                        MacroBuilder &Builder) const override {
33
31
    TgtInfo::getTargetDefines(Opts, Builder);
34
31
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
31
  }
clang::targets::OSTargetInfo<clang::targets::RenderScript32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
1
                        MacroBuilder &Builder) const override {
33
1
    TgtInfo::getTargetDefines(Opts, Builder);
34
1
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
1
  }
clang::targets::OSTargetInfo<clang::targets::RenderScript64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
1
                        MacroBuilder &Builder) const override {
33
1
    TgtInfo::getTargetDefines(Opts, Builder);
34
1
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
1
  }
clang::targets::OSTargetInfo<clang::targets::VETargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
3
                        MacroBuilder &Builder) const override {
33
3
    TgtInfo::getTargetDefines(Opts, Builder);
34
3
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
3
  }
36
};
37
38
// CloudABI Target
39
template <typename Target>
40
class LLVM_LIBRARY_VISIBILITY CloudABITargetInfo : public OSTargetInfo<Target> {
41
protected:
42
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
43
10
                    MacroBuilder &Builder) const override {
44
10
    Builder.defineMacro("__CloudABI__");
45
10
    Builder.defineMacro("__ELF__");
46
47
    // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
48
10
    Builder.defineMacro("__STDC_ISO_10646__", "201206L");
49
10
    Builder.defineMacro("__STDC_UTF_16__");
50
10
    Builder.defineMacro("__STDC_UTF_32__");
51
10
  }
clang::targets::CloudABITargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
43
2
                    MacroBuilder &Builder) const override {
44
2
    Builder.defineMacro("__CloudABI__");
45
2
    Builder.defineMacro("__ELF__");
46
47
    // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
48
2
    Builder.defineMacro("__STDC_ISO_10646__", "201206L");
49
2
    Builder.defineMacro("__STDC_UTF_16__");
50
2
    Builder.defineMacro("__STDC_UTF_32__");
51
2
  }
clang::targets::CloudABITargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
43
3
                    MacroBuilder &Builder) const override {
44
3
    Builder.defineMacro("__CloudABI__");
45
3
    Builder.defineMacro("__ELF__");
46
47
    // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
48
3
    Builder.defineMacro("__STDC_ISO_10646__", "201206L");
49
3
    Builder.defineMacro("__STDC_UTF_16__");
50
3
    Builder.defineMacro("__STDC_UTF_32__");
51
3
  }
Unexecuted instantiation: clang::targets::CloudABITargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::CloudABITargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
43
5
                    MacroBuilder &Builder) const override {
44
5
    Builder.defineMacro("__CloudABI__");
45
5
    Builder.defineMacro("__ELF__");
46
47
    // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
48
5
    Builder.defineMacro("__STDC_ISO_10646__", "201206L");
49
5
    Builder.defineMacro("__STDC_UTF_16__");
50
5
    Builder.defineMacro("__STDC_UTF_32__");
51
5
  }
52
53
public:
54
  CloudABITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
55
10
      : OSTargetInfo<Target>(Triple, Opts) {}
clang::targets::CloudABITargetInfo<clang::targets::AArch64leTargetInfo>::CloudABITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
55
2
      : OSTargetInfo<Target>(Triple, Opts) {}
clang::targets::CloudABITargetInfo<clang::targets::ARMleTargetInfo>::CloudABITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
55
3
      : OSTargetInfo<Target>(Triple, Opts) {}
Unexecuted instantiation: clang::targets::CloudABITargetInfo<clang::targets::X86_32TargetInfo>::CloudABITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::CloudABITargetInfo<clang::targets::X86_64TargetInfo>::CloudABITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
55
5
      : OSTargetInfo<Target>(Triple, Opts) {}
56
};
57
58
// Ananas target
59
template <typename Target>
60
class LLVM_LIBRARY_VISIBILITY AnanasTargetInfo : public OSTargetInfo<Target> {
61
protected:
62
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
63
0
                    MacroBuilder &Builder) const override {
64
    // Ananas defines
65
0
    Builder.defineMacro("__Ananas__");
66
0
    Builder.defineMacro("__ELF__");
67
0
  }
Unexecuted instantiation: clang::targets::AnanasTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::AnanasTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
68
69
public:
70
  AnanasTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
71
0
      : OSTargetInfo<Target>(Triple, Opts) {}
Unexecuted instantiation: clang::targets::AnanasTargetInfo<clang::targets::X86_32TargetInfo>::AnanasTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::AnanasTargetInfo<clang::targets::X86_64TargetInfo>::AnanasTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
72
};
73
74
void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
75
                      const llvm::Triple &Triple, StringRef &PlatformName,
76
                      VersionTuple &PlatformMinVersion);
77
78
template <typename Target>
79
class LLVM_LIBRARY_VISIBILITY DarwinTargetInfo : public OSTargetInfo<Target> {
80
protected:
81
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
82
49.3k
                    MacroBuilder &Builder) const override {
83
49.3k
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
49.3k
                     this->PlatformMinVersion);
85
49.3k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
6
                    MacroBuilder &Builder) const override {
83
6
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
6
                     this->PlatformMinVersion);
85
6
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
1
                    MacroBuilder &Builder) const override {
83
1
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
1
                     this->PlatformMinVersion);
85
1
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
373
                    MacroBuilder &Builder) const override {
83
373
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
373
                     this->PlatformMinVersion);
85
373
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
48.9k
                    MacroBuilder &Builder) const override {
83
48.9k
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
48.9k
                     this->PlatformMinVersion);
85
48.9k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
86
87
public:
88
  DarwinTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
89
57.2k
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
57.2k
    this->TLSSupported = false;
93
94
57.2k
    if (Triple.isMacOSX())
95
56.8k
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
381
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
300
      if (Triple.isArch64Bit())
100
190
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
110
      else if (Triple.isArch32Bit()) {
102
110
        if (!Triple.isSimulatorEnvironment())
103
105
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
5
        else
105
5
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
110
      }
107
81
    } else if (Triple.isWatchOS()) {
108
56
      if (!Triple.isSimulatorEnvironment())
109
45
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
11
      else
111
11
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
56
    }
113
114
57.2k
    this->MCountName = "\01mcount";
115
57.2k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
6
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
6
    this->TLSSupported = false;
93
94
6
    if (Triple.isMacOSX())
95
6
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
0
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
0
      if (Triple.isArch64Bit())
100
0
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
0
      else if (Triple.isArch32Bit()) {
102
0
        if (!Triple.isSimulatorEnvironment())
103
0
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
0
      }
107
0
    } else if (Triple.isWatchOS()) {
108
0
      if (!Triple.isSimulatorEnvironment())
109
0
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
0
      else
111
0
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
0
    }
113
114
6
    this->MCountName = "\01mcount";
115
6
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
1
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
1
    this->TLSSupported = false;
93
94
1
    if (Triple.isMacOSX())
95
1
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
0
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
0
      if (Triple.isArch64Bit())
100
0
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
0
      else if (Triple.isArch32Bit()) {
102
0
        if (!Triple.isSimulatorEnvironment())
103
0
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
0
      }
107
0
    } else if (Triple.isWatchOS()) {
108
0
      if (!Triple.isSimulatorEnvironment())
109
0
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
0
      else
111
0
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
0
    }
113
114
1
    this->MCountName = "\01mcount";
115
1
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
379
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
379
    this->TLSSupported = false;
93
94
379
    if (Triple.isMacOSX())
95
350
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
29
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
14
      if (Triple.isArch64Bit())
100
0
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
14
      else if (Triple.isArch32Bit()) {
102
14
        if (!Triple.isSimulatorEnvironment())
103
9
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
5
        else
105
5
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
14
      }
107
15
    } else if (Triple.isWatchOS()) {
108
15
      if (!Triple.isSimulatorEnvironment())
109
8
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
7
      else
111
7
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
15
    }
113
114
379
    this->MCountName = "\01mcount";
115
379
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
56.4k
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
56.4k
    this->TLSSupported = false;
93
94
56.4k
    if (Triple.isMacOSX())
95
56.4k
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
87
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
71
      if (Triple.isArch64Bit())
100
71
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
0
      else if (Triple.isArch32Bit()) {
102
0
        if (!Triple.isSimulatorEnvironment())
103
0
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
0
      }
107
16
    } else if (Triple.isWatchOS()) {
108
6
      if (!Triple.isSimulatorEnvironment())
109
2
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
4
      else
111
4
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
6
    }
113
114
56.4k
    this->MCountName = "\01mcount";
115
56.4k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
159
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
159
    this->TLSSupported = false;
93
94
159
    if (Triple.isMacOSX())
95
19
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
140
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
132
      if (Triple.isArch64Bit())
100
119
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
13
      else if (Triple.isArch32Bit()) {
102
13
        if (!Triple.isSimulatorEnvironment())
103
13
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
13
      }
107
8
    } else if (Triple.isWatchOS()) {
108
8
      if (!Triple.isSimulatorEnvironment())
109
8
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
0
      else
111
0
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
8
    }
113
114
159
    this->MCountName = "\01mcount";
115
159
  }
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
205
      : OSTargetInfo<Target>(Triple, Opts) {
90
    // By default, no TLS, and we list permitted architecture/OS
91
    // combinations.
92
205
    this->TLSSupported = false;
93
94
205
    if (Triple.isMacOSX())
95
80
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
125
    else if (Triple.isiOS()) {
97
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
      // 32-bit simulator from 10 onwards.
99
83
      if (Triple.isArch64Bit())
100
0
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
83
      else if (Triple.isArch32Bit()) {
102
83
        if (!Triple.isSimulatorEnvironment())
103
83
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
83
      }
107
42
    } else if (Triple.isWatchOS()) {
108
27
      if (!Triple.isSimulatorEnvironment())
109
27
        this->TLSSupported = !Triple.isOSVersionLT(2);
110
0
      else
111
0
        this->TLSSupported = !Triple.isOSVersionLT(3);
112
27
    }
113
114
205
    this->MCountName = "\01mcount";
115
205
  }
116
117
2.33k
  std::string isValidSectionSpecifier(StringRef SR) const override {
118
    // Let MCSectionMachO validate this.
119
2.33k
    StringRef Segment, Section;
120
2.33k
    unsigned TAA, StubSize;
121
2.33k
    bool HasTAA;
122
2.33k
    return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
123
2.33k
                                                       TAA, HasTAA, StubSize);
124
2.33k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
Line
Count
Source
117
4
  std::string isValidSectionSpecifier(StringRef SR) const override {
118
    // Let MCSectionMachO validate this.
119
4
    StringRef Segment, Section;
120
4
    unsigned TAA, StubSize;
121
4
    bool HasTAA;
122
4
    return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
123
4
                                                       TAA, HasTAA, StubSize);
124
4
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
Line
Count
Source
117
2.32k
  std::string isValidSectionSpecifier(StringRef SR) const override {
118
    // Let MCSectionMachO validate this.
119
2.32k
    StringRef Segment, Section;
120
2.32k
    unsigned TAA, StubSize;
121
2.32k
    bool HasTAA;
122
2.32k
    return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
123
2.32k
                                                       TAA, HasTAA, StubSize);
124
2.32k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::isValidSectionSpecifier(llvm::StringRef) const
125
126
1.61k
  const char *getStaticInitSectionSpecifier() const override {
127
    // FIXME: We should return 0 when building kexts.
128
1.61k
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
1.61k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::getStaticInitSectionSpecifier() const
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
126
23
  const char *getStaticInitSectionSpecifier() const override {
127
    // FIXME: We should return 0 when building kexts.
128
23
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
23
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
126
1.57k
  const char *getStaticInitSectionSpecifier() const override {
127
    // FIXME: We should return 0 when building kexts.
128
1.57k
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
1.57k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getStaticInitSectionSpecifier() const
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
126
18
  const char *getStaticInitSectionSpecifier() const override {
127
    // FIXME: We should return 0 when building kexts.
128
18
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
18
  }
130
131
  /// Darwin does not support protected visibility.  Darwin's "default"
132
  /// is very similar to ELF's "protected";  Darwin requires a "weak"
133
  /// attribute on declarations that can be dynamically replaced.
134
3
  bool hasProtectedVisibility() const override { return false; }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::hasProtectedVisibility() const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::hasProtectedVisibility() const
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::hasProtectedVisibility() const
Line
Count
Source
134
1
  bool hasProtectedVisibility() const override { return false; }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::hasProtectedVisibility() const
Line
Count
Source
134
2
  bool hasProtectedVisibility() const override { return false; }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::hasProtectedVisibility() const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::hasProtectedVisibility() const
135
136
5.10k
  unsigned getExnObjectAlignment() const override {
137
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
    // exception objects because of a bug in __cxa_exception that was
139
    // eventually fixed in r319123.
140
5.10k
    llvm::VersionTuple MinVersion;
141
5.10k
    const llvm::Triple &T = this->getTriple();
142
143
    // Compute the earliest OS versions that have the fix to libc++abi.
144
5.10k
    switch (T.getOS()) {
145
108
    case llvm::Triple::Darwin:
146
5.04k
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
5.04k
      MinVersion = llvm::VersionTuple(10U, 14U);
148
5.04k
      break;
149
20
    case llvm::Triple::IOS:
150
40
    case llvm::Triple::TvOS: // Earliest supporting version is 12.0.0.
151
40
      MinVersion = llvm::VersionTuple(12U);
152
40
      break;
153
20
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
20
      MinVersion = llvm::VersionTuple(5U);
155
20
      break;
156
4
    default:
157
      // Conservatively return 8 bytes if OS is unknown.
158
4
      return 64;
159
5.10k
    }
160
161
5.10k
    unsigned Major, Minor, Micro;
162
5.10k
    T.getOSVersion(Major, Minor, Micro);
163
5.10k
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
164
46
      return 64;
165
5.05k
    return OSTargetInfo<Target>::getExnObjectAlignment();
166
5.05k
  }
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getExnObjectAlignment() const
Unexecuted instantiation: clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::getExnObjectAlignment() const
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::getExnObjectAlignment() const
Line
Count
Source
136
12
  unsigned getExnObjectAlignment() const override {
137
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
    // exception objects because of a bug in __cxa_exception that was
139
    // eventually fixed in r319123.
140
12
    llvm::VersionTuple MinVersion;
141
12
    const llvm::Triple &T = this->getTriple();
142
143
    // Compute the earliest OS versions that have the fix to libc++abi.
144
12
    switch (T.getOS()) {
145
0
    case llvm::Triple::Darwin:
146
0
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
0
      MinVersion = llvm::VersionTuple(10U, 14U);
148
0
      break;
149
0
    case llvm::Triple::IOS:
150
0
    case llvm::Triple::TvOS: // Earliest supporting version is 12.0.0.
151
0
      MinVersion = llvm::VersionTuple(12U);
152
0
      break;
153
12
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
12
      MinVersion = llvm::VersionTuple(5U);
155
12
      break;
156
0
    default:
157
      // Conservatively return 8 bytes if OS is unknown.
158
0
      return 64;
159
12
    }
160
161
12
    unsigned Major, Minor, Micro;
162
12
    T.getOSVersion(Major, Minor, Micro);
163
12
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
164
0
      return 64;
165
12
    return OSTargetInfo<Target>::getExnObjectAlignment();
166
12
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getExnObjectAlignment() const
Line
Count
Source
136
5.06k
  unsigned getExnObjectAlignment() const override {
137
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
    // exception objects because of a bug in __cxa_exception that was
139
    // eventually fixed in r319123.
140
5.06k
    llvm::VersionTuple MinVersion;
141
5.06k
    const llvm::Triple &T = this->getTriple();
142
143
    // Compute the earliest OS versions that have the fix to libc++abi.
144
5.06k
    switch (T.getOS()) {
145
107
    case llvm::Triple::Darwin:
146
5.04k
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
5.04k
      MinVersion = llvm::VersionTuple(10U, 14U);
148
5.04k
      break;
149
12
    case llvm::Triple::IOS:
150
24
    case llvm::Triple::TvOS: // Earliest supporting version is 12.0.0.
151
24
      MinVersion = llvm::VersionTuple(12U);
152
24
      break;
153
0
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
0
      MinVersion = llvm::VersionTuple(5U);
155
0
      break;
156
0
    default:
157
      // Conservatively return 8 bytes if OS is unknown.
158
0
      return 64;
159
5.06k
    }
160
161
5.06k
    unsigned Major, Minor, Micro;
162
5.06k
    T.getOSVersion(Major, Minor, Micro);
163
5.06k
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
164
33
      return 64;
165
5.03k
    return OSTargetInfo<Target>::getExnObjectAlignment();
166
5.03k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getExnObjectAlignment() const
Line
Count
Source
136
24
  unsigned getExnObjectAlignment() const override {
137
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
    // exception objects because of a bug in __cxa_exception that was
139
    // eventually fixed in r319123.
140
24
    llvm::VersionTuple MinVersion;
141
24
    const llvm::Triple &T = this->getTriple();
142
143
    // Compute the earliest OS versions that have the fix to libc++abi.
144
24
    switch (T.getOS()) {
145
0
    case llvm::Triple::Darwin:
146
0
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
0
      MinVersion = llvm::VersionTuple(10U, 14U);
148
0
      break;
149
8
    case llvm::Triple::IOS:
150
16
    case llvm::Triple::TvOS: // Earliest supporting version is 12.0.0.
151
16
      MinVersion = llvm::VersionTuple(12U);
152
16
      break;
153
8
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
8
      MinVersion = llvm::VersionTuple(5U);
155
8
      break;
156
0
    default:
157
      // Conservatively return 8 bytes if OS is unknown.
158
0
      return 64;
159
24
    }
160
161
24
    unsigned Major, Minor, Micro;
162
24
    T.getOSVersion(Major, Minor, Micro);
163
24
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
164
12
      return 64;
165
12
    return OSTargetInfo<Target>::getExnObjectAlignment();
166
12
  }
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::getExnObjectAlignment() const
Line
Count
Source
136
5
  unsigned getExnObjectAlignment() const override {
137
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
    // exception objects because of a bug in __cxa_exception that was
139
    // eventually fixed in r319123.
140
5
    llvm::VersionTuple MinVersion;
141
5
    const llvm::Triple &T = this->getTriple();
142
143
    // Compute the earliest OS versions that have the fix to libc++abi.
144
5
    switch (T.getOS()) {
145
1
    case llvm::Triple::Darwin:
146
1
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
1
      MinVersion = llvm::VersionTuple(10U, 14U);
148
1
      break;
149
0
    case llvm::Triple::IOS:
150
0
    case llvm::Triple::TvOS: // Earliest supporting version is 12.0.0.
151
0
      MinVersion = llvm::VersionTuple(12U);
152
0
      break;
153
0
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
0
      MinVersion = llvm::VersionTuple(5U);
155
0
      break;
156
4
    default:
157
      // Conservatively return 8 bytes if OS is unknown.
158
4
      return 64;
159
1
    }
160
161
1
    unsigned Major, Minor, Micro;
162
1
    T.getOSVersion(Major, Minor, Micro);
163
1
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
164
1
      return 64;
165
0
    return OSTargetInfo<Target>::getExnObjectAlignment();
166
0
  }
167
168
  TargetInfo::IntType getLeastIntTypeByWidth(unsigned BitWidth,
169
795k
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
795k
    return BitWidth == 64
172
198k
               ? (IsSigned ? 
TargetInfo::SignedLongLong99.4k
173
99.4k
                           : TargetInfo::UnsignedLongLong)
174
596k
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
795k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
96
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
96
    return BitWidth == 64
172
24
               ? (IsSigned ? 
TargetInfo::SignedLongLong12
173
12
                           : TargetInfo::UnsignedLongLong)
174
72
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
96
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
16
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
16
    return BitWidth == 64
172
4
               ? (IsSigned ? 
TargetInfo::SignedLongLong2
173
2
                           : TargetInfo::UnsignedLongLong)
174
12
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
16
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
5.96k
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
5.96k
    return BitWidth == 64
172
1.49k
               ? (IsSigned ? 
TargetInfo::SignedLongLong746
173
746
                           : TargetInfo::UnsignedLongLong)
174
4.47k
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
5.96k
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
783k
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
783k
    return BitWidth == 64
172
195k
               ? (IsSigned ? 
TargetInfo::SignedLongLong97.9k
173
97.9k
                           : TargetInfo::UnsignedLongLong)
174
587k
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
783k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
2.54k
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
2.54k
    return BitWidth == 64
172
636
               ? (IsSigned ? 
TargetInfo::SignedLongLong318
173
318
                           : TargetInfo::UnsignedLongLong)
174
1.90k
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
2.54k
  }
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
169
3.10k
                                             bool IsSigned) const final {
170
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
171
3.10k
    return BitWidth == 64
172
776
               ? (IsSigned ? 
TargetInfo::SignedLongLong388
173
388
                           : TargetInfo::UnsignedLongLong)
174
2.32k
               : TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
175
3.10k
  }
176
};
177
178
// DragonFlyBSD Target
179
template <typename Target>
180
class LLVM_LIBRARY_VISIBILITY DragonFlyBSDTargetInfo
181
    : public OSTargetInfo<Target> {
182
protected:
183
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
184
1
                    MacroBuilder &Builder) const override {
185
    // DragonFly defines; list based off of gcc output
186
1
    Builder.defineMacro("__DragonFly__");
187
1
    Builder.defineMacro("__DragonFly_cc_version", "100001");
188
1
    Builder.defineMacro("__ELF__");
189
1
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
190
1
    Builder.defineMacro("__tune_i386__");
191
1
    DefineStd(Builder, "unix", Opts);
192
1
  }
clang::targets::DragonFlyBSDTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
184
1
                    MacroBuilder &Builder) const override {
185
    // DragonFly defines; list based off of gcc output
186
1
    Builder.defineMacro("__DragonFly__");
187
1
    Builder.defineMacro("__DragonFly_cc_version", "100001");
188
1
    Builder.defineMacro("__ELF__");
189
1
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
190
1
    Builder.defineMacro("__tune_i386__");
191
1
    DefineStd(Builder, "unix", Opts);
192
1
  }
Unexecuted instantiation: clang::targets::DragonFlyBSDTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
193
194
public:
195
  DragonFlyBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
196
1
      : OSTargetInfo<Target>(Triple, Opts) {
197
1
    switch (Triple.getArch()) {
198
0
    default:
199
1
    case llvm::Triple::x86:
200
1
    case llvm::Triple::x86_64:
201
1
      this->MCountName = ".mcount";
202
1
      break;
203
1
    }
204
1
  }
clang::targets::DragonFlyBSDTargetInfo<clang::targets::X86_32TargetInfo>::DragonFlyBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
196
1
      : OSTargetInfo<Target>(Triple, Opts) {
197
1
    switch (Triple.getArch()) {
198
0
    default:
199
1
    case llvm::Triple::x86:
200
1
    case llvm::Triple::x86_64:
201
1
      this->MCountName = ".mcount";
202
1
      break;
203
1
    }
204
1
  }
Unexecuted instantiation: clang::targets::DragonFlyBSDTargetInfo<clang::targets::X86_64TargetInfo>::DragonFlyBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
205
};
206
207
#ifndef FREEBSD_CC_VERSION
208
65
#define FREEBSD_CC_VERSION 0U
209
#endif
210
211
// FreeBSD Target
212
template <typename Target>
213
class LLVM_LIBRARY_VISIBILITY FreeBSDTargetInfo : public OSTargetInfo<Target> {
214
protected:
215
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
216
65
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
65
    unsigned Release = Triple.getOSMajorVersion();
220
65
    if (Release == 0U)
221
44
      Release = 8U;
222
65
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
65
    if (CCVersion == 0U)
224
65
      CCVersion = Release * 100000U + 1U;
225
226
65
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
65
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
65
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
65
    DefineStd(Builder, "unix", Opts);
230
65
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
65
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
65
  }
clang::targets::FreeBSDTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
2
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
2
    unsigned Release = Triple.getOSMajorVersion();
220
2
    if (Release == 0U)
221
2
      Release = 8U;
222
2
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
2
    if (CCVersion == 0U)
224
2
      CCVersion = Release * 100000U + 1U;
225
226
2
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
2
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
2
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
2
    DefineStd(Builder, "unix", Opts);
230
2
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
2
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
2
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::AArch64beTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::FreeBSDTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
6
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
6
    unsigned Release = Triple.getOSMajorVersion();
220
6
    if (Release == 0U)
221
5
      Release = 8U;
222
6
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
6
    if (CCVersion == 0U)
224
6
      CCVersion = Release * 100000U + 1U;
225
226
6
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
6
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
6
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
6
    DefineStd(Builder, "unix", Opts);
230
6
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
6
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
6
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::FreeBSDTargetInfo<clang::targets::MipsTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
4
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
4
    unsigned Release = Triple.getOSMajorVersion();
220
4
    if (Release == 0U)
221
4
      Release = 8U;
222
4
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
4
    if (CCVersion == 0U)
224
4
      CCVersion = Release * 100000U + 1U;
225
226
4
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
4
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
4
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
4
    DefineStd(Builder, "unix", Opts);
230
4
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
4
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
4
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
4
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
4
    unsigned Release = Triple.getOSMajorVersion();
220
4
    if (Release == 0U)
221
4
      Release = 8U;
222
4
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
4
    if (CCVersion == 0U)
224
4
      CCVersion = Release * 100000U + 1U;
225
226
4
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
4
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
4
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
4
    DefineStd(Builder, "unix", Opts);
230
4
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
4
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
4
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
8
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
8
    unsigned Release = Triple.getOSMajorVersion();
220
8
    if (Release == 0U)
221
4
      Release = 8U;
222
8
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
8
    if (CCVersion == 0U)
224
8
      CCVersion = Release * 100000U + 1U;
225
226
8
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
8
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
8
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
8
    DefineStd(Builder, "unix", Opts);
230
8
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
8
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
8
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::RISCV32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::RISCV64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::FreeBSDTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
3
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
3
    unsigned Release = Triple.getOSMajorVersion();
220
3
    if (Release == 0U)
221
3
      Release = 8U;
222
3
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
3
    if (CCVersion == 0U)
224
3
      CCVersion = Release * 100000U + 1U;
225
226
3
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
3
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
3
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
3
    DefineStd(Builder, "unix", Opts);
230
3
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
3
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
3
  }
clang::targets::FreeBSDTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
216
38
                    MacroBuilder &Builder) const override {
217
    // FreeBSD defines; list based off of gcc output
218
219
38
    unsigned Release = Triple.getOSMajorVersion();
220
38
    if (Release == 0U)
221
22
      Release = 8U;
222
38
    unsigned CCVersion = FREEBSD_CC_VERSION;
223
38
    if (CCVersion == 0U)
224
38
      CCVersion = Release * 100000U + 1U;
225
226
38
    Builder.defineMacro("__FreeBSD__", Twine(Release));
227
38
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
228
38
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
229
38
    DefineStd(Builder, "unix", Opts);
230
38
    Builder.defineMacro("__ELF__");
231
232
    // On FreeBSD, wchar_t contains the number of the code point as
233
    // used by the character set of the locale. These character sets are
234
    // not necessarily a superset of ASCII.
235
    //
236
    // FIXME: This is wrong; the macro refers to the numerical values
237
    // of wchar_t *literals*, which are not locale-dependent. However,
238
    // FreeBSD systems apparently depend on us getting this wrong, and
239
    // setting this to 1 is conforming even if all the basic source
240
    // character literals have the same encoding as char and wchar_t.
241
38
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
242
38
  }
243
244
public:
245
  FreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
246
65
      : OSTargetInfo<Target>(Triple, Opts) {
247
65
    switch (Triple.getArch()) {
248
4
    default:
249
7
    case llvm::Triple::x86:
250
45
    case llvm::Triple::x86_64:
251
45
      this->MCountName = ".mcount";
252
45
      break;
253
2
    case llvm::Triple::mips:
254
2
    case llvm::Triple::mipsel:
255
5
    case llvm::Triple::ppc:
256
6
    case llvm::Triple::ppcle:
257
11
    case llvm::Triple::ppc64:
258
14
    case llvm::Triple::ppc64le:
259
14
      this->MCountName = "_mcount";
260
14
      break;
261
6
    case llvm::Triple::arm:
262
6
      this->MCountName = "__mcount";
263
6
      break;
264
65
    }
265
65
  }
clang::targets::FreeBSDTargetInfo<clang::targets::AArch64leTargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
2
      : OSTargetInfo<Target>(Triple, Opts) {
247
2
    switch (Triple.getArch()) {
248
2
    default:
249
2
    case llvm::Triple::x86:
250
2
    case llvm::Triple::x86_64:
251
2
      this->MCountName = ".mcount";
252
2
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
0
    case llvm::Triple::ppc:
256
0
    case llvm::Triple::ppcle:
257
0
    case llvm::Triple::ppc64:
258
0
    case llvm::Triple::ppc64le:
259
0
      this->MCountName = "_mcount";
260
0
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
2
    }
265
2
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::AArch64beTargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::FreeBSDTargetInfo<clang::targets::ARMleTargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
6
      : OSTargetInfo<Target>(Triple, Opts) {
247
6
    switch (Triple.getArch()) {
248
0
    default:
249
0
    case llvm::Triple::x86:
250
0
    case llvm::Triple::x86_64:
251
0
      this->MCountName = ".mcount";
252
0
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
0
    case llvm::Triple::ppc:
256
0
    case llvm::Triple::ppcle:
257
0
    case llvm::Triple::ppc64:
258
0
    case llvm::Triple::ppc64le:
259
0
      this->MCountName = "_mcount";
260
0
      break;
261
6
    case llvm::Triple::arm:
262
6
      this->MCountName = "__mcount";
263
6
      break;
264
6
    }
265
6
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::ARMbeTargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::FreeBSDTargetInfo<clang::targets::MipsTargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
4
      : OSTargetInfo<Target>(Triple, Opts) {
247
4
    switch (Triple.getArch()) {
248
2
    default:
249
2
    case llvm::Triple::x86:
250
2
    case llvm::Triple::x86_64:
251
2
      this->MCountName = ".mcount";
252
2
      break;
253
2
    case llvm::Triple::mips:
254
2
    case llvm::Triple::mipsel:
255
2
    case llvm::Triple::ppc:
256
2
    case llvm::Triple::ppcle:
257
2
    case llvm::Triple::ppc64:
258
2
    case llvm::Triple::ppc64le:
259
2
      this->MCountName = "_mcount";
260
2
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
4
    }
265
4
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC32TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
4
      : OSTargetInfo<Target>(Triple, Opts) {
247
4
    switch (Triple.getArch()) {
248
0
    default:
249
0
    case llvm::Triple::x86:
250
0
    case llvm::Triple::x86_64:
251
0
      this->MCountName = ".mcount";
252
0
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
3
    case llvm::Triple::ppc:
256
4
    case llvm::Triple::ppcle:
257
4
    case llvm::Triple::ppc64:
258
4
    case llvm::Triple::ppc64le:
259
4
      this->MCountName = "_mcount";
260
4
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
4
    }
265
4
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC64TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
8
      : OSTargetInfo<Target>(Triple, Opts) {
247
8
    switch (Triple.getArch()) {
248
0
    default:
249
0
    case llvm::Triple::x86:
250
0
    case llvm::Triple::x86_64:
251
0
      this->MCountName = ".mcount";
252
0
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
0
    case llvm::Triple::ppc:
256
0
    case llvm::Triple::ppcle:
257
5
    case llvm::Triple::ppc64:
258
8
    case llvm::Triple::ppc64le:
259
8
      this->MCountName = "_mcount";
260
8
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
8
    }
265
8
  }
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::RISCV32TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::RISCV64TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::FreeBSDTargetInfo<clang::targets::SparcV9TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::FreeBSDTargetInfo<clang::targets::X86_32TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
3
      : OSTargetInfo<Target>(Triple, Opts) {
247
3
    switch (Triple.getArch()) {
248
0
    default:
249
3
    case llvm::Triple::x86:
250
3
    case llvm::Triple::x86_64:
251
3
      this->MCountName = ".mcount";
252
3
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
0
    case llvm::Triple::ppc:
256
0
    case llvm::Triple::ppcle:
257
0
    case llvm::Triple::ppc64:
258
0
    case llvm::Triple::ppc64le:
259
0
      this->MCountName = "_mcount";
260
0
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
3
    }
265
3
  }
clang::targets::FreeBSDTargetInfo<clang::targets::X86_64TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
246
38
      : OSTargetInfo<Target>(Triple, Opts) {
247
38
    switch (Triple.getArch()) {
248
0
    default:
249
0
    case llvm::Triple::x86:
250
38
    case llvm::Triple::x86_64:
251
38
      this->MCountName = ".mcount";
252
38
      break;
253
0
    case llvm::Triple::mips:
254
0
    case llvm::Triple::mipsel:
255
0
    case llvm::Triple::ppc:
256
0
    case llvm::Triple::ppcle:
257
0
    case llvm::Triple::ppc64:
258
0
    case llvm::Triple::ppc64le:
259
0
      this->MCountName = "_mcount";
260
0
      break;
261
0
    case llvm::Triple::arm:
262
0
      this->MCountName = "__mcount";
263
0
      break;
264
38
    }
265
38
  }
266
};
267
268
// GNU/kFreeBSD Target
269
template <typename Target>
270
class LLVM_LIBRARY_VISIBILITY KFreeBSDTargetInfo : public OSTargetInfo<Target> {
271
protected:
272
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
273
2
                    MacroBuilder &Builder) const override {
274
    // GNU/kFreeBSD defines; list based off of gcc output
275
276
2
    DefineStd(Builder, "unix", Opts);
277
2
    Builder.defineMacro("__FreeBSD_kernel__");
278
2
    Builder.defineMacro("__GLIBC__");
279
2
    Builder.defineMacro("__ELF__");
280
2
    if (Opts.POSIXThreads)
281
0
      Builder.defineMacro("_REENTRANT");
282
2
    if (Opts.CPlusPlus)
283
0
      Builder.defineMacro("_GNU_SOURCE");
284
2
  }
clang::targets::KFreeBSDTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
273
1
                    MacroBuilder &Builder) const override {
274
    // GNU/kFreeBSD defines; list based off of gcc output
275
276
1
    DefineStd(Builder, "unix", Opts);
277
1
    Builder.defineMacro("__FreeBSD_kernel__");
278
1
    Builder.defineMacro("__GLIBC__");
279
1
    Builder.defineMacro("__ELF__");
280
1
    if (Opts.POSIXThreads)
281
0
      Builder.defineMacro("_REENTRANT");
282
1
    if (Opts.CPlusPlus)
283
0
      Builder.defineMacro("_GNU_SOURCE");
284
1
  }
clang::targets::KFreeBSDTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
273
1
                    MacroBuilder &Builder) const override {
274
    // GNU/kFreeBSD defines; list based off of gcc output
275
276
1
    DefineStd(Builder, "unix", Opts);
277
1
    Builder.defineMacro("__FreeBSD_kernel__");
278
1
    Builder.defineMacro("__GLIBC__");
279
1
    Builder.defineMacro("__ELF__");
280
1
    if (Opts.POSIXThreads)
281
0
      Builder.defineMacro("_REENTRANT");
282
1
    if (Opts.CPlusPlus)
283
0
      Builder.defineMacro("_GNU_SOURCE");
284
1
  }
285
286
public:
287
  KFreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
288
2
      : OSTargetInfo<Target>(Triple, Opts) {}
clang::targets::KFreeBSDTargetInfo<clang::targets::X86_32TargetInfo>::KFreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
288
1
      : OSTargetInfo<Target>(Triple, Opts) {}
clang::targets::KFreeBSDTargetInfo<clang::targets::X86_64TargetInfo>::KFreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
288
1
      : OSTargetInfo<Target>(Triple, Opts) {}
289
};
290
291
// Haiku Target
292
template <typename Target>
293
class LLVM_LIBRARY_VISIBILITY HaikuTargetInfo : public OSTargetInfo<Target> {
294
protected:
295
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
296
4
                    MacroBuilder &Builder) const override {
297
    // Haiku defines; list based off of gcc output
298
4
    Builder.defineMacro("__HAIKU__");
299
4
    Builder.defineMacro("__ELF__");
300
4
    DefineStd(Builder, "unix", Opts);
301
4
    if (this->HasFloat128) 
302
4
      Builder.defineMacro("__FLOAT128__");
303
4
  }
clang::targets::HaikuTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
296
3
                    MacroBuilder &Builder) const override {
297
    // Haiku defines; list based off of gcc output
298
3
    Builder.defineMacro("__HAIKU__");
299
3
    Builder.defineMacro("__ELF__");
300
3
    DefineStd(Builder, "unix", Opts);
301
3
    if (this->HasFloat128) 
302
3
      Builder.defineMacro("__FLOAT128__");
303
3
  }
clang::targets::HaikuTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
296
1
                    MacroBuilder &Builder) const override {
297
    // Haiku defines; list based off of gcc output
298
1
    Builder.defineMacro("__HAIKU__");
299
1
    Builder.defineMacro("__ELF__");
300
1
    DefineStd(Builder, "unix", Opts);
301
1
    if (this->HasFloat128) 
302
1
      Builder.defineMacro("__FLOAT128__");
303
1
  }
304
305
public:
306
  HaikuTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
307
4
      : OSTargetInfo<Target>(Triple, Opts) {
308
4
    this->SizeType = TargetInfo::UnsignedLong;
309
4
    this->IntPtrType = TargetInfo::SignedLong;
310
4
    this->PtrDiffType = TargetInfo::SignedLong;
311
4
    this->ProcessIDType = TargetInfo::SignedLong;
312
4
    this->TLSSupported = false;
313
4
    switch (Triple.getArch()) {
314
0
    default:
315
0
      break;
316
3
    case llvm::Triple::x86:
317
4
    case llvm::Triple::x86_64:
318
4
      this->HasFloat128 = true;
319
4
      break;
320
4
    }
321
4
  }
clang::targets::HaikuTargetInfo<clang::targets::X86_32TargetInfo>::HaikuTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
307
3
      : OSTargetInfo<Target>(Triple, Opts) {
308
3
    this->SizeType = TargetInfo::UnsignedLong;
309
3
    this->IntPtrType = TargetInfo::SignedLong;
310
3
    this->PtrDiffType = TargetInfo::SignedLong;
311
3
    this->ProcessIDType = TargetInfo::SignedLong;
312
3
    this->TLSSupported = false;
313
3
    switch (Triple.getArch()) {
314
0
    default:
315
0
      break;
316
3
    case llvm::Triple::x86:
317
3
    case llvm::Triple::x86_64:
318
3
      this->HasFloat128 = true;
319
3
      break;
320
3
    }
321
3
  }
clang::targets::HaikuTargetInfo<clang::targets::X86_64TargetInfo>::HaikuTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
307
1
      : OSTargetInfo<Target>(Triple, Opts) {
308
1
    this->SizeType = TargetInfo::UnsignedLong;
309
1
    this->IntPtrType = TargetInfo::SignedLong;
310
1
    this->PtrDiffType = TargetInfo::SignedLong;
311
1
    this->ProcessIDType = TargetInfo::SignedLong;
312
1
    this->TLSSupported = false;
313
1
    switch (Triple.getArch()) {
314
0
    default:
315
0
      break;
316
0
    case llvm::Triple::x86:
317
1
    case llvm::Triple::x86_64:
318
1
      this->HasFloat128 = true;
319
1
      break;
320
1
    }
321
1
  }
322
};
323
324
// Hurd target
325
template <typename Target>
326
class LLVM_LIBRARY_VISIBILITY HurdTargetInfo : public OSTargetInfo<Target> {
327
protected:
328
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
329
0
                    MacroBuilder &Builder) const override {
330
    // Hurd defines; list based off of gcc output.
331
0
    DefineStd(Builder, "unix", Opts);
332
0
    Builder.defineMacro("__GNU__");
333
0
    Builder.defineMacro("__gnu_hurd__");
334
0
    Builder.defineMacro("__MACH__");
335
0
    Builder.defineMacro("__GLIBC__");
336
0
    Builder.defineMacro("__ELF__");
337
0
    if (Opts.POSIXThreads)
338
0
      Builder.defineMacro("_REENTRANT");
339
0
    if (Opts.CPlusPlus)
340
0
      Builder.defineMacro("_GNU_SOURCE");
341
0
  }
342
public:
343
  HurdTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
344
0
      : OSTargetInfo<Target>(Triple, Opts) {}
345
};
346
347
// Minix Target
348
template <typename Target>
349
class LLVM_LIBRARY_VISIBILITY MinixTargetInfo : public OSTargetInfo<Target> {
350
protected:
351
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
352
0
                    MacroBuilder &Builder) const override {
353
    // Minix defines
354
355
0
    Builder.defineMacro("__minix", "3");
356
0
    Builder.defineMacro("_EM_WSIZE", "4");
357
0
    Builder.defineMacro("_EM_PSIZE", "4");
358
0
    Builder.defineMacro("_EM_SSIZE", "2");
359
0
    Builder.defineMacro("_EM_LSIZE", "4");
360
0
    Builder.defineMacro("_EM_FSIZE", "4");
361
0
    Builder.defineMacro("_EM_DSIZE", "8");
362
0
    Builder.defineMacro("__ELF__");
363
0
    DefineStd(Builder, "unix", Opts);
364
0
  }
365
366
public:
367
  MinixTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
368
0
      : OSTargetInfo<Target>(Triple, Opts) {}
369
};
370
371
// Linux target
372
template <typename Target>
373
class LLVM_LIBRARY_VISIBILITY LinuxTargetInfo : public OSTargetInfo<Target> {
374
protected:
375
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
376
6.10k
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
6.10k
    DefineStd(Builder, "unix", Opts);
379
6.10k
    DefineStd(Builder, "linux", Opts);
380
6.10k
    Builder.defineMacro("__ELF__");
381
6.10k
    if (Triple.isAndroid()) {
382
20
      Builder.defineMacro("__ANDROID__", "1");
383
20
      unsigned Maj, Min, Rev;
384
20
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
20
      this->PlatformName = "android";
386
20
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
20
      if (Maj) {
388
2
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
2
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
2
      }
393
6.08k
    } else {
394
6.08k
        Builder.defineMacro("__gnu_linux__");
395
6.08k
    }
396
6.10k
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
6.10k
    if (Opts.CPlusPlus)
399
2.46k
      Builder.defineMacro("_GNU_SOURCE");
400
6.10k
    if (this->HasFloat128)
401
3.32k
      Builder.defineMacro("__FLOAT128__");
402
6.10k
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
424
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
424
    DefineStd(Builder, "unix", Opts);
379
424
    DefineStd(Builder, "linux", Opts);
380
424
    Builder.defineMacro("__ELF__");
381
424
    if (Triple.isAndroid()) {
382
3
      Builder.defineMacro("__ANDROID__", "1");
383
3
      unsigned Maj, Min, Rev;
384
3
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
3
      this->PlatformName = "android";
386
3
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
3
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
421
    } else {
394
421
        Builder.defineMacro("__gnu_linux__");
395
421
    }
396
424
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
424
    if (Opts.CPlusPlus)
399
153
      Builder.defineMacro("_GNU_SOURCE");
400
424
    if (this->HasFloat128)
401
424
      Builder.defineMacro("__FLOAT128__");
402
424
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
2.86k
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
2.86k
    DefineStd(Builder, "unix", Opts);
379
2.86k
    DefineStd(Builder, "linux", Opts);
380
2.86k
    Builder.defineMacro("__ELF__");
381
2.86k
    if (Triple.isAndroid()) {
382
4
      Builder.defineMacro("__ANDROID__", "1");
383
4
      unsigned Maj, Min, Rev;
384
4
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
4
      this->PlatformName = "android";
386
4
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
4
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
2.86k
    } else {
394
2.86k
        Builder.defineMacro("__gnu_linux__");
395
2.86k
    }
396
2.86k
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
2.86k
    if (Opts.CPlusPlus)
399
2.00k
      Builder.defineMacro("_GNU_SOURCE");
400
2.86k
    if (this->HasFloat128)
401
2.86k
      Builder.defineMacro("__FLOAT128__");
402
2.86k
  }
clang::targets::LinuxTargetInfo<clang::targets::HexagonTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
3
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
3
    DefineStd(Builder, "unix", Opts);
379
3
    DefineStd(Builder, "linux", Opts);
380
3
    Builder.defineMacro("__ELF__");
381
3
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
3
    } else {
394
3
        Builder.defineMacro("__gnu_linux__");
395
3
    }
396
3
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
3
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
3
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
3
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
1.91k
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
1.91k
    DefineStd(Builder, "unix", Opts);
379
1.91k
    DefineStd(Builder, "linux", Opts);
380
1.91k
    Builder.defineMacro("__ELF__");
381
1.91k
    if (Triple.isAndroid()) {
382
1
      Builder.defineMacro("__ANDROID__", "1");
383
1
      unsigned Maj, Min, Rev;
384
1
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
1
      this->PlatformName = "android";
386
1
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
1
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
1.91k
    } else {
394
1.91k
        Builder.defineMacro("__gnu_linux__");
395
1.91k
    }
396
1.91k
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
1.91k
    if (Opts.CPlusPlus)
399
79
      Builder.defineMacro("_GNU_SOURCE");
400
1.91k
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
1.91k
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64beTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
9
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
9
    DefineStd(Builder, "unix", Opts);
379
9
    DefineStd(Builder, "linux", Opts);
380
9
    Builder.defineMacro("__ELF__");
381
9
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
9
    } else {
394
9
        Builder.defineMacro("__gnu_linux__");
395
9
    }
396
9
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
9
    if (Opts.CPlusPlus)
399
1
      Builder.defineMacro("_GNU_SOURCE");
400
9
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
9
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
273
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
273
    DefineStd(Builder, "unix", Opts);
379
273
    DefineStd(Builder, "linux", Opts);
380
273
    Builder.defineMacro("__ELF__");
381
273
    if (Triple.isAndroid()) {
382
11
      Builder.defineMacro("__ANDROID__", "1");
383
11
      unsigned Maj, Min, Rev;
384
11
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
11
      this->PlatformName = "android";
386
11
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
11
      if (Maj) {
388
2
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
2
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
2
      }
393
262
    } else {
394
262
        Builder.defineMacro("__gnu_linux__");
395
262
    }
396
273
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
273
    if (Opts.CPlusPlus)
399
31
      Builder.defineMacro("_GNU_SOURCE");
400
273
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
273
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
11
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
11
    DefineStd(Builder, "unix", Opts);
379
11
    DefineStd(Builder, "linux", Opts);
380
11
    Builder.defineMacro("__ELF__");
381
11
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
11
    } else {
394
11
        Builder.defineMacro("__gnu_linux__");
395
11
    }
396
11
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
11
    if (Opts.CPlusPlus)
399
4
      Builder.defineMacro("_GNU_SOURCE");
400
11
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
11
  }
clang::targets::LinuxTargetInfo<clang::targets::MipsTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
166
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
166
    DefineStd(Builder, "unix", Opts);
379
166
    DefineStd(Builder, "linux", Opts);
380
166
    Builder.defineMacro("__ELF__");
381
166
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
166
    } else {
394
166
        Builder.defineMacro("__gnu_linux__");
395
166
    }
396
166
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
166
    if (Opts.CPlusPlus)
399
39
      Builder.defineMacro("_GNU_SOURCE");
400
166
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
166
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
34
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
34
    DefineStd(Builder, "unix", Opts);
379
34
    DefineStd(Builder, "linux", Opts);
380
34
    Builder.defineMacro("__ELF__");
381
34
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
34
    } else {
394
34
        Builder.defineMacro("__gnu_linux__");
395
34
    }
396
34
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
34
    if (Opts.CPlusPlus)
399
8
      Builder.defineMacro("_GNU_SOURCE");
400
34
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
34
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
258
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
258
    DefineStd(Builder, "unix", Opts);
379
258
    DefineStd(Builder, "linux", Opts);
380
258
    Builder.defineMacro("__ELF__");
381
258
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
258
    } else {
394
258
        Builder.defineMacro("__gnu_linux__");
395
258
    }
396
258
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
258
    if (Opts.CPlusPlus)
399
132
      Builder.defineMacro("_GNU_SOURCE");
400
258
    if (this->HasFloat128)
401
29
      Builder.defineMacro("__FLOAT128__");
402
258
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
24
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
24
    DefineStd(Builder, "unix", Opts);
379
24
    DefineStd(Builder, "linux", Opts);
380
24
    Builder.defineMacro("__ELF__");
381
24
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
24
    } else {
394
24
        Builder.defineMacro("__gnu_linux__");
395
24
    }
396
24
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
24
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
24
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
24
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
22
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
22
    DefineStd(Builder, "unix", Opts);
379
22
    DefineStd(Builder, "linux", Opts);
380
22
    Builder.defineMacro("__ELF__");
381
22
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
22
    } else {
394
22
        Builder.defineMacro("__gnu_linux__");
395
22
    }
396
22
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
22
    if (Opts.CPlusPlus)
399
1
      Builder.defineMacro("_GNU_SOURCE");
400
22
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
22
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
2
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
2
    DefineStd(Builder, "unix", Opts);
379
2
    DefineStd(Builder, "linux", Opts);
380
2
    Builder.defineMacro("__ELF__");
381
2
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
2
    } else {
394
2
        Builder.defineMacro("__gnu_linux__");
395
2
    }
396
2
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
2
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
2
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
2
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV8elTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
1
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
1
    DefineStd(Builder, "unix", Opts);
379
1
    DefineStd(Builder, "linux", Opts);
380
1
    Builder.defineMacro("__ELF__");
381
1
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
1
    } else {
394
1
        Builder.defineMacro("__gnu_linux__");
395
1
    }
396
1
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
1
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
1
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
1
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
7
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
7
    DefineStd(Builder, "unix", Opts);
379
7
    DefineStd(Builder, "linux", Opts);
380
7
    Builder.defineMacro("__ELF__");
381
7
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
7
    } else {
394
7
        Builder.defineMacro("__gnu_linux__");
395
7
    }
396
7
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
7
    if (Opts.CPlusPlus)
399
5
      Builder.defineMacro("_GNU_SOURCE");
400
7
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
7
  }
clang::targets::LinuxTargetInfo<clang::targets::SystemZTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
87
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
87
    DefineStd(Builder, "unix", Opts);
379
87
    DefineStd(Builder, "linux", Opts);
380
87
    Builder.defineMacro("__ELF__");
381
87
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
87
    } else {
394
87
        Builder.defineMacro("__gnu_linux__");
395
87
    }
396
87
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
87
    if (Opts.CPlusPlus)
399
6
      Builder.defineMacro("_GNU_SOURCE");
400
87
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
87
  }
clang::targets::LinuxTargetInfo<clang::targets::RenderScript32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
1
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
1
    DefineStd(Builder, "unix", Opts);
379
1
    DefineStd(Builder, "linux", Opts);
380
1
    Builder.defineMacro("__ELF__");
381
1
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
1
    } else {
394
1
        Builder.defineMacro("__gnu_linux__");
395
1
    }
396
1
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
1
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
1
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
1
  }
clang::targets::LinuxTargetInfo<clang::targets::RenderScript64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
1
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
1
    DefineStd(Builder, "unix", Opts);
379
1
    DefineStd(Builder, "linux", Opts);
380
1
    Builder.defineMacro("__ELF__");
381
1
    if (Triple.isAndroid()) {
382
1
      Builder.defineMacro("__ANDROID__", "1");
383
1
      unsigned Maj, Min, Rev;
384
1
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
1
      this->PlatformName = "android";
386
1
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
1
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
0
    } else {
394
0
        Builder.defineMacro("__gnu_linux__");
395
0
    }
396
1
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
1
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
1
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
1
  }
clang::targets::LinuxTargetInfo<clang::targets::VETargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
376
3
                    MacroBuilder &Builder) const override {
377
    // Linux defines; list based off of gcc output
378
3
    DefineStd(Builder, "unix", Opts);
379
3
    DefineStd(Builder, "linux", Opts);
380
3
    Builder.defineMacro("__ELF__");
381
3
    if (Triple.isAndroid()) {
382
0
      Builder.defineMacro("__ANDROID__", "1");
383
0
      unsigned Maj, Min, Rev;
384
0
      Triple.getEnvironmentVersion(Maj, Min, Rev);
385
0
      this->PlatformName = "android";
386
0
      this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
387
0
      if (Maj) {
388
0
        Builder.defineMacro("__ANDROID_MIN_SDK_VERSION__", Twine(Maj));
389
        // This historical but ambiguous name for the minSdkVersion macro. Keep
390
        // defined for compatibility.
391
0
        Builder.defineMacro("__ANDROID_API__", "__ANDROID_MIN_SDK_VERSION__");
392
0
      }
393
3
    } else {
394
3
        Builder.defineMacro("__gnu_linux__");
395
3
    }
396
3
    if (Opts.POSIXThreads)
397
0
      Builder.defineMacro("_REENTRANT");
398
3
    if (Opts.CPlusPlus)
399
0
      Builder.defineMacro("_GNU_SOURCE");
400
3
    if (this->HasFloat128)
401
0
      Builder.defineMacro("__FLOAT128__");
402
3
  }
403
404
public:
405
  LinuxTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
406
6.28k
      : OSTargetInfo<Target>(Triple, Opts) {
407
6.28k
    this->WIntType = TargetInfo::UnsignedInt;
408
409
6.28k
    switch (Triple.getArch()) {
410
2.35k
    default:
411
2.35k
      break;
412
37
    case llvm::Triple::mips:
413
71
    case llvm::Triple::mipsel:
414
132
    case llvm::Triple::mips64:
415
176
    case llvm::Triple::mips64el:
416
207
    case llvm::Triple::ppc:
417
210
    case llvm::Triple::ppcle:
418
301
    case llvm::Triple::ppc64:
419
490
    case llvm::Triple::ppc64le:
420
490
      this->MCountName = "_mcount";
421
490
      break;
422
436
    case llvm::Triple::x86:
423
3.43k
    case llvm::Triple::x86_64:
424
3.43k
      this->HasFloat128 = true;
425
3.43k
      break;
426
6.28k
    }
427
6.28k
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
3
      : OSTargetInfo<Target>(Triple, Opts) {
407
3
    this->WIntType = TargetInfo::UnsignedInt;
408
409
3
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
3
    case llvm::Triple::x86:
423
3
    case llvm::Triple::x86_64:
424
3
      this->HasFloat128 = true;
425
3
      break;
426
3
    }
427
3
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
5
      : OSTargetInfo<Target>(Triple, Opts) {
407
5
    this->WIntType = TargetInfo::UnsignedInt;
408
409
5
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
5
    case llvm::Triple::x86_64:
424
5
      this->HasFloat128 = true;
425
5
      break;
426
5
    }
427
5
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
433
      : OSTargetInfo<Target>(Triple, Opts) {
407
433
    this->WIntType = TargetInfo::UnsignedInt;
408
409
433
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
433
    case llvm::Triple::x86:
423
433
    case llvm::Triple::x86_64:
424
433
      this->HasFloat128 = true;
425
433
      break;
426
433
    }
427
433
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
2.99k
      : OSTargetInfo<Target>(Triple, Opts) {
407
2.99k
    this->WIntType = TargetInfo::UnsignedInt;
408
409
2.99k
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
2.99k
    case llvm::Triple::x86_64:
424
2.99k
      this->HasFloat128 = true;
425
2.99k
      break;
426
2.99k
    }
427
2.99k
  }
clang::targets::LinuxTargetInfo<clang::targets::HexagonTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
3
      : OSTargetInfo<Target>(Triple, Opts) {
407
3
    this->WIntType = TargetInfo::UnsignedInt;
408
409
3
    switch (Triple.getArch()) {
410
3
    default:
411
3
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
3
    }
427
3
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
1.91k
      : OSTargetInfo<Target>(Triple, Opts) {
407
1.91k
    this->WIntType = TargetInfo::UnsignedInt;
408
409
1.91k
    switch (Triple.getArch()) {
410
1.91k
    default:
411
1.91k
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
1.91k
    }
427
1.91k
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64beTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
9
      : OSTargetInfo<Target>(Triple, Opts) {
407
9
    this->WIntType = TargetInfo::UnsignedInt;
408
409
9
    switch (Triple.getArch()) {
410
9
    default:
411
9
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
9
    }
427
9
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMleTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
273
      : OSTargetInfo<Target>(Triple, Opts) {
407
273
    this->WIntType = TargetInfo::UnsignedInt;
408
409
273
    switch (Triple.getArch()) {
410
273
    default:
411
273
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
273
    }
427
273
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMbeTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
11
      : OSTargetInfo<Target>(Triple, Opts) {
407
11
    this->WIntType = TargetInfo::UnsignedInt;
408
409
11
    switch (Triple.getArch()) {
410
11
    default:
411
11
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
11
    }
427
11
  }
clang::targets::LinuxTargetInfo<clang::targets::MipsTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
176
      : OSTargetInfo<Target>(Triple, Opts) {
407
176
    this->WIntType = TargetInfo::UnsignedInt;
408
409
176
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
37
    case llvm::Triple::mips:
413
71
    case llvm::Triple::mipsel:
414
132
    case llvm::Triple::mips64:
415
176
    case llvm::Triple::mips64el:
416
176
    case llvm::Triple::ppc:
417
176
    case llvm::Triple::ppcle:
418
176
    case llvm::Triple::ppc64:
419
176
    case llvm::Triple::ppc64le:
420
176
      this->MCountName = "_mcount";
421
176
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
176
    }
427
176
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
34
      : OSTargetInfo<Target>(Triple, Opts) {
407
34
    this->WIntType = TargetInfo::UnsignedInt;
408
409
34
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
31
    case llvm::Triple::ppc:
417
34
    case llvm::Triple::ppcle:
418
34
    case llvm::Triple::ppc64:
419
34
    case llvm::Triple::ppc64le:
420
34
      this->MCountName = "_mcount";
421
34
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
34
    }
427
34
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
280
      : OSTargetInfo<Target>(Triple, Opts) {
407
280
    this->WIntType = TargetInfo::UnsignedInt;
408
409
280
    switch (Triple.getArch()) {
410
0
    default:
411
0
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
91
    case llvm::Triple::ppc64:
419
280
    case llvm::Triple::ppc64le:
420
280
      this->MCountName = "_mcount";
421
280
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
280
    }
427
280
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
24
      : OSTargetInfo<Target>(Triple, Opts) {
407
24
    this->WIntType = TargetInfo::UnsignedInt;
408
409
24
    switch (Triple.getArch()) {
410
24
    default:
411
24
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
24
    }
427
24
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
22
      : OSTargetInfo<Target>(Triple, Opts) {
407
22
    this->WIntType = TargetInfo::UnsignedInt;
408
409
22
    switch (Triple.getArch()) {
410
22
    default:
411
22
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
22
    }
427
22
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV8TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
2
      : OSTargetInfo<Target>(Triple, Opts) {
407
2
    this->WIntType = TargetInfo::UnsignedInt;
408
409
2
    switch (Triple.getArch()) {
410
2
    default:
411
2
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
2
    }
427
2
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV8elTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
1
      : OSTargetInfo<Target>(Triple, Opts) {
407
1
    this->WIntType = TargetInfo::UnsignedInt;
408
409
1
    switch (Triple.getArch()) {
410
1
    default:
411
1
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
1
    }
427
1
  }
clang::targets::LinuxTargetInfo<clang::targets::SparcV9TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
7
      : OSTargetInfo<Target>(Triple, Opts) {
407
7
    this->WIntType = TargetInfo::UnsignedInt;
408
409
7
    switch (Triple.getArch()) {
410
7
    default:
411
7
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
7
    }
427
7
  }
clang::targets::LinuxTargetInfo<clang::targets::SystemZTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
87
      : OSTargetInfo<Target>(Triple, Opts) {
407
87
    this->WIntType = TargetInfo::UnsignedInt;
408
409
87
    switch (Triple.getArch()) {
410
87
    default:
411
87
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
87
    }
427
87
  }
clang::targets::LinuxTargetInfo<clang::targets::RenderScript32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
1
      : OSTargetInfo<Target>(Triple, Opts) {
407
1
    this->WIntType = TargetInfo::UnsignedInt;
408
409
1
    switch (Triple.getArch()) {
410
1
    default:
411
1
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
1
    }
427
1
  }
clang::targets::LinuxTargetInfo<clang::targets::RenderScript64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
1
      : OSTargetInfo<Target>(Triple, Opts) {
407
1
    this->WIntType = TargetInfo::UnsignedInt;
408
409
1
    switch (Triple.getArch()) {
410
1
    default:
411
1
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
1
    }
427
1
  }
clang::targets::LinuxTargetInfo<clang::targets::VETargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
406
3
      : OSTargetInfo<Target>(Triple, Opts) {
407
3
    this->WIntType = TargetInfo::UnsignedInt;
408
409
3
    switch (Triple.getArch()) {
410
3
    default:
411
3
      break;
412
0
    case llvm::Triple::mips:
413
0
    case llvm::Triple::mipsel:
414
0
    case llvm::Triple::mips64:
415
0
    case llvm::Triple::mips64el:
416
0
    case llvm::Triple::ppc:
417
0
    case llvm::Triple::ppcle:
418
0
    case llvm::Triple::ppc64:
419
0
    case llvm::Triple::ppc64le:
420
0
      this->MCountName = "_mcount";
421
0
      break;
422
0
    case llvm::Triple::x86:
423
0
    case llvm::Triple::x86_64:
424
0
      this->HasFloat128 = true;
425
0
      break;
426
3
    }
427
3
  }
428
429
869
  const char *getStaticInitSectionSpecifier() const override {
430
869
    return ".text.startup";
431
869
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
429
81
  const char *getStaticInitSectionSpecifier() const override {
430
81
    return ".text.startup";
431
81
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
429
658
  const char *getStaticInitSectionSpecifier() const override {
430
658
    return ".text.startup";
431
658
  }
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::HexagonTargetInfo>::getStaticInitSectionSpecifier() const
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
429
26
  const char *getStaticInitSectionSpecifier() const override {
430
26
    return ".text.startup";
431
26
  }
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::AArch64beTargetInfo>::getStaticInitSectionSpecifier() const
clang::targets::LinuxTargetInfo<clang::targets::ARMleTargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
429
4
  const char *getStaticInitSectionSpecifier() const override {
430
4
    return ".text.startup";
431
4
  }
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::ARMbeTargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::MipsTargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::PPC32TargetInfo>::getStaticInitSectionSpecifier() const
clang::targets::LinuxTargetInfo<clang::targets::PPC64TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
429
100
  const char *getStaticInitSectionSpecifier() const override {
430
100
    return ".text.startup";
431
100
  }
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::RISCV32TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::RISCV64TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::SparcV8TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::SparcV8elTargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::SparcV9TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::SystemZTargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::RenderScript32TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::RenderScript64TargetInfo>::getStaticInitSectionSpecifier() const
Unexecuted instantiation: clang::targets::LinuxTargetInfo<clang::targets::VETargetInfo>::getStaticInitSectionSpecifier() const
432
};
433
434
// NetBSD Target
435
template <typename Target>
436
class LLVM_LIBRARY_VISIBILITY NetBSDTargetInfo : public OSTargetInfo<Target> {
437
protected:
438
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
439
38
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
38
    Builder.defineMacro("__NetBSD__");
442
38
    Builder.defineMacro("__unix__");
443
38
    Builder.defineMacro("__ELF__");
444
38
    if (Opts.POSIXThreads)
445
1
      Builder.defineMacro("_REENTRANT");
446
38
  }
clang::targets::NetBSDTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
7
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
7
    Builder.defineMacro("__NetBSD__");
442
7
    Builder.defineMacro("__unix__");
443
7
    Builder.defineMacro("__ELF__");
444
7
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
7
  }
clang::targets::NetBSDTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
5
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
5
    Builder.defineMacro("__NetBSD__");
442
5
    Builder.defineMacro("__unix__");
443
5
    Builder.defineMacro("__ELF__");
444
5
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
5
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::AArch64beTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::NetBSDTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
7
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
7
    Builder.defineMacro("__NetBSD__");
442
7
    Builder.defineMacro("__unix__");
443
7
    Builder.defineMacro("__ELF__");
444
7
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
7
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::NetBSDTargetInfo<clang::targets::MipsTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
3
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
3
    Builder.defineMacro("__NetBSD__");
442
3
    Builder.defineMacro("__unix__");
443
3
    Builder.defineMacro("__ELF__");
444
3
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
3
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
3
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
3
    Builder.defineMacro("__NetBSD__");
442
3
    Builder.defineMacro("__unix__");
443
3
    Builder.defineMacro("__ELF__");
444
3
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
3
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
4
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
4
    Builder.defineMacro("__NetBSD__");
442
4
    Builder.defineMacro("__unix__");
443
4
    Builder.defineMacro("__ELF__");
444
4
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
4
  }
clang::targets::NetBSDTargetInfo<clang::targets::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
2
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
2
    Builder.defineMacro("__NetBSD__");
442
2
    Builder.defineMacro("__unix__");
443
2
    Builder.defineMacro("__ELF__");
444
2
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
2
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::SparcV8elTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::NetBSDTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
1
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
1
    Builder.defineMacro("__NetBSD__");
442
1
    Builder.defineMacro("__unix__");
443
1
    Builder.defineMacro("__ELF__");
444
1
    if (Opts.POSIXThreads)
445
0
      Builder.defineMacro("_REENTRANT");
446
1
  }
clang::targets::NetBSDTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
439
6
                    MacroBuilder &Builder) const override {
440
    // NetBSD defines; list based off of gcc output
441
6
    Builder.defineMacro("__NetBSD__");
442
6
    Builder.defineMacro("__unix__");
443
6
    Builder.defineMacro("__ELF__");
444
6
    if (Opts.POSIXThreads)
445
1
      Builder.defineMacro("_REENTRANT");
446
6
  }
447
448
public:
449
  NetBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
450
52
      : OSTargetInfo<Target>(Triple, Opts) {
451
52
    this->MCountName = "__mcount";
452
52
  }
clang::targets::NetBSDTargetInfo<clang::targets::X86_32TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
7
      : OSTargetInfo<Target>(Triple, Opts) {
451
7
    this->MCountName = "__mcount";
452
7
  }
clang::targets::NetBSDTargetInfo<clang::targets::AArch64leTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
8
      : OSTargetInfo<Target>(Triple, Opts) {
451
8
    this->MCountName = "__mcount";
452
8
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::AArch64beTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::NetBSDTargetInfo<clang::targets::ARMleTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
7
      : OSTargetInfo<Target>(Triple, Opts) {
451
7
    this->MCountName = "__mcount";
452
7
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::ARMbeTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::NetBSDTargetInfo<clang::targets::MipsTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
3
      : OSTargetInfo<Target>(Triple, Opts) {
451
3
    this->MCountName = "__mcount";
452
3
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC32TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
3
      : OSTargetInfo<Target>(Triple, Opts) {
451
3
    this->MCountName = "__mcount";
452
3
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC64TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
4
      : OSTargetInfo<Target>(Triple, Opts) {
451
4
    this->MCountName = "__mcount";
452
4
  }
clang::targets::NetBSDTargetInfo<clang::targets::SparcV8TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
2
      : OSTargetInfo<Target>(Triple, Opts) {
451
2
    this->MCountName = "__mcount";
452
2
  }
Unexecuted instantiation: clang::targets::NetBSDTargetInfo<clang::targets::SparcV8elTargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::NetBSDTargetInfo<clang::targets::SparcV9TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
9
      : OSTargetInfo<Target>(Triple, Opts) {
451
9
    this->MCountName = "__mcount";
452
9
  }
clang::targets::NetBSDTargetInfo<clang::targets::X86_64TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
450
9
      : OSTargetInfo<Target>(Triple, Opts) {
451
9
    this->MCountName = "__mcount";
452
9
  }
453
};
454
455
// OpenBSD Target
456
template <typename Target>
457
class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : public OSTargetInfo<Target> {
458
protected:
459
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
460
31
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
31
    Builder.defineMacro("__OpenBSD__");
464
31
    DefineStd(Builder, "unix", Opts);
465
31
    Builder.defineMacro("__ELF__");
466
31
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
31
    if (this->HasFloat128)
469
7
      Builder.defineMacro("__FLOAT128__");
470
31
  }
clang::targets::OpenBSDTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
4
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
4
    Builder.defineMacro("__OpenBSD__");
464
4
    DefineStd(Builder, "unix", Opts);
465
4
    Builder.defineMacro("__ELF__");
466
4
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
4
    if (this->HasFloat128)
469
4
      Builder.defineMacro("__FLOAT128__");
470
4
  }
clang::targets::OpenBSDTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
3
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
3
    Builder.defineMacro("__OpenBSD__");
464
3
    DefineStd(Builder, "unix", Opts);
465
3
    Builder.defineMacro("__ELF__");
466
3
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
3
    if (this->HasFloat128)
469
3
      Builder.defineMacro("__FLOAT128__");
470
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
4
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
4
    Builder.defineMacro("__OpenBSD__");
464
4
    DefineStd(Builder, "unix", Opts);
465
4
    Builder.defineMacro("__ELF__");
466
4
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
4
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
4
  }
clang::targets::OpenBSDTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
5
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
5
    Builder.defineMacro("__OpenBSD__");
464
5
    DefineStd(Builder, "unix", Opts);
465
5
    Builder.defineMacro("__ELF__");
466
5
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
5
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
5
  }
Unexecuted instantiation: clang::targets::OpenBSDTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::OpenBSDTargetInfo<clang::targets::MipsTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
3
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
3
    Builder.defineMacro("__OpenBSD__");
464
3
    DefineStd(Builder, "unix", Opts);
465
3
    Builder.defineMacro("__ELF__");
466
3
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
3
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
6
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
6
    Builder.defineMacro("__OpenBSD__");
464
6
    DefineStd(Builder, "unix", Opts);
465
6
    Builder.defineMacro("__ELF__");
466
6
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
6
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
6
  }
clang::targets::OpenBSDTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
3
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
3
    Builder.defineMacro("__OpenBSD__");
464
3
    DefineStd(Builder, "unix", Opts);
465
3
    Builder.defineMacro("__ELF__");
466
3
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
3
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::RISCV64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
1
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
1
    Builder.defineMacro("__OpenBSD__");
464
1
    DefineStd(Builder, "unix", Opts);
465
1
    Builder.defineMacro("__ELF__");
466
1
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
1
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
1
  }
clang::targets::OpenBSDTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
460
2
                    MacroBuilder &Builder) const override {
461
    // OpenBSD defines; list based off of gcc output
462
463
2
    Builder.defineMacro("__OpenBSD__");
464
2
    DefineStd(Builder, "unix", Opts);
465
2
    Builder.defineMacro("__ELF__");
466
2
    if (Opts.POSIXThreads)
467
0
      Builder.defineMacro("_REENTRANT");
468
2
    if (this->HasFloat128)
469
0
      Builder.defineMacro("__FLOAT128__");
470
2
  }
471
472
public:
473
  OpenBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
474
31
      : OSTargetInfo<Target>(Triple, Opts) {
475
31
    this->WCharType = this->WIntType = this->SignedInt;
476
31
    this->IntMaxType = TargetInfo::SignedLongLong;
477
31
    this->Int64Type = TargetInfo::SignedLongLong;
478
31
    switch (Triple.getArch()) {
479
4
    case llvm::Triple::x86:
480
7
    case llvm::Triple::x86_64:
481
7
      this->HasFloat128 = true;
482
7
      LLVM_FALLTHROUGH;
483
17
    default:
484
17
      this->MCountName = "__mcount";
485
17
      break;
486
2
    case llvm::Triple::mips64:
487
3
    case llvm::Triple::mips64el:
488
9
    case llvm::Triple::ppc:
489
11
    case llvm::Triple::ppc64:
490
12
    case llvm::Triple::ppc64le:
491
14
    case llvm::Triple::sparcv9:
492
14
      this->MCountName = "_mcount";
493
14
      break;
494
31
    }
495
31
  }
clang::targets::OpenBSDTargetInfo<clang::targets::X86_32TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
4
      : OSTargetInfo<Target>(Triple, Opts) {
475
4
    this->WCharType = this->WIntType = this->SignedInt;
476
4
    this->IntMaxType = TargetInfo::SignedLongLong;
477
4
    this->Int64Type = TargetInfo::SignedLongLong;
478
4
    switch (Triple.getArch()) {
479
4
    case llvm::Triple::x86:
480
4
    case llvm::Triple::x86_64:
481
4
      this->HasFloat128 = true;
482
4
      LLVM_FALLTHROUGH;
483
4
    default:
484
4
      this->MCountName = "__mcount";
485
4
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
0
    case llvm::Triple::sparcv9:
492
0
      this->MCountName = "_mcount";
493
0
      break;
494
4
    }
495
4
  }
clang::targets::OpenBSDTargetInfo<clang::targets::X86_64TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
3
      : OSTargetInfo<Target>(Triple, Opts) {
475
3
    this->WCharType = this->WIntType = this->SignedInt;
476
3
    this->IntMaxType = TargetInfo::SignedLongLong;
477
3
    this->Int64Type = TargetInfo::SignedLongLong;
478
3
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
3
    case llvm::Triple::x86_64:
481
3
      this->HasFloat128 = true;
482
3
      LLVM_FALLTHROUGH;
483
3
    default:
484
3
      this->MCountName = "__mcount";
485
3
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
0
    case llvm::Triple::sparcv9:
492
0
      this->MCountName = "_mcount";
493
0
      break;
494
3
    }
495
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::AArch64leTargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
4
      : OSTargetInfo<Target>(Triple, Opts) {
475
4
    this->WCharType = this->WIntType = this->SignedInt;
476
4
    this->IntMaxType = TargetInfo::SignedLongLong;
477
4
    this->Int64Type = TargetInfo::SignedLongLong;
478
4
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
4
    default:
484
4
      this->MCountName = "__mcount";
485
4
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
0
    case llvm::Triple::sparcv9:
492
0
      this->MCountName = "_mcount";
493
0
      break;
494
4
    }
495
4
  }
clang::targets::OpenBSDTargetInfo<clang::targets::ARMleTargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
5
      : OSTargetInfo<Target>(Triple, Opts) {
475
5
    this->WCharType = this->WIntType = this->SignedInt;
476
5
    this->IntMaxType = TargetInfo::SignedLongLong;
477
5
    this->Int64Type = TargetInfo::SignedLongLong;
478
5
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
5
    default:
484
5
      this->MCountName = "__mcount";
485
5
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
0
    case llvm::Triple::sparcv9:
492
0
      this->MCountName = "_mcount";
493
0
      break;
494
5
    }
495
5
  }
Unexecuted instantiation: clang::targets::OpenBSDTargetInfo<clang::targets::ARMbeTargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::OpenBSDTargetInfo<clang::targets::MipsTargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
3
      : OSTargetInfo<Target>(Triple, Opts) {
475
3
    this->WCharType = this->WIntType = this->SignedInt;
476
3
    this->IntMaxType = TargetInfo::SignedLongLong;
477
3
    this->Int64Type = TargetInfo::SignedLongLong;
478
3
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
0
    default:
484
0
      this->MCountName = "__mcount";
485
0
      break;
486
2
    case llvm::Triple::mips64:
487
3
    case llvm::Triple::mips64el:
488
3
    case llvm::Triple::ppc:
489
3
    case llvm::Triple::ppc64:
490
3
    case llvm::Triple::ppc64le:
491
3
    case llvm::Triple::sparcv9:
492
3
      this->MCountName = "_mcount";
493
3
      break;
494
3
    }
495
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::PPC32TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
6
      : OSTargetInfo<Target>(Triple, Opts) {
475
6
    this->WCharType = this->WIntType = this->SignedInt;
476
6
    this->IntMaxType = TargetInfo::SignedLongLong;
477
6
    this->Int64Type = TargetInfo::SignedLongLong;
478
6
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
0
    default:
484
0
      this->MCountName = "__mcount";
485
0
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
6
    case llvm::Triple::ppc:
489
6
    case llvm::Triple::ppc64:
490
6
    case llvm::Triple::ppc64le:
491
6
    case llvm::Triple::sparcv9:
492
6
      this->MCountName = "_mcount";
493
6
      break;
494
6
    }
495
6
  }
clang::targets::OpenBSDTargetInfo<clang::targets::PPC64TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
3
      : OSTargetInfo<Target>(Triple, Opts) {
475
3
    this->WCharType = this->WIntType = this->SignedInt;
476
3
    this->IntMaxType = TargetInfo::SignedLongLong;
477
3
    this->Int64Type = TargetInfo::SignedLongLong;
478
3
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
0
    default:
484
0
      this->MCountName = "__mcount";
485
0
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
2
    case llvm::Triple::ppc64:
490
3
    case llvm::Triple::ppc64le:
491
3
    case llvm::Triple::sparcv9:
492
3
      this->MCountName = "_mcount";
493
3
      break;
494
3
    }
495
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::RISCV64TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
1
      : OSTargetInfo<Target>(Triple, Opts) {
475
1
    this->WCharType = this->WIntType = this->SignedInt;
476
1
    this->IntMaxType = TargetInfo::SignedLongLong;
477
1
    this->Int64Type = TargetInfo::SignedLongLong;
478
1
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
1
    default:
484
1
      this->MCountName = "__mcount";
485
1
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
0
    case llvm::Triple::sparcv9:
492
0
      this->MCountName = "_mcount";
493
0
      break;
494
1
    }
495
1
  }
clang::targets::OpenBSDTargetInfo<clang::targets::SparcV9TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
474
2
      : OSTargetInfo<Target>(Triple, Opts) {
475
2
    this->WCharType = this->WIntType = this->SignedInt;
476
2
    this->IntMaxType = TargetInfo::SignedLongLong;
477
2
    this->Int64Type = TargetInfo::SignedLongLong;
478
2
    switch (Triple.getArch()) {
479
0
    case llvm::Triple::x86:
480
0
    case llvm::Triple::x86_64:
481
0
      this->HasFloat128 = true;
482
0
      LLVM_FALLTHROUGH;
483
0
    default:
484
0
      this->MCountName = "__mcount";
485
0
      break;
486
0
    case llvm::Triple::mips64:
487
0
    case llvm::Triple::mips64el:
488
0
    case llvm::Triple::ppc:
489
0
    case llvm::Triple::ppc64:
490
0
    case llvm::Triple::ppc64le:
491
2
    case llvm::Triple::sparcv9:
492
2
      this->MCountName = "_mcount";
493
2
      break;
494
2
    }
495
2
  }
496
};
497
498
// PSP Target
499
template <typename Target>
500
class LLVM_LIBRARY_VISIBILITY PSPTargetInfo : public OSTargetInfo<Target> {
501
protected:
502
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
503
                    MacroBuilder &Builder) const override {
504
    // PSP defines; list based on the output of the pspdev gcc toolchain.
505
    Builder.defineMacro("PSP");
506
    Builder.defineMacro("_PSP");
507
    Builder.defineMacro("__psp__");
508
    Builder.defineMacro("__ELF__");
509
  }
510
511
public:
512
  PSPTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {}
513
};
514
515
// PS3 PPU Target
516
template <typename Target>
517
class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo<Target> {
518
protected:
519
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
520
1
                    MacroBuilder &Builder) const override {
521
    // PS3 PPU defines.
522
1
    Builder.defineMacro("__PPC__");
523
1
    Builder.defineMacro("__PPU__");
524
1
    Builder.defineMacro("__CELLOS_LV2__");
525
1
    Builder.defineMacro("__ELF__");
526
1
    Builder.defineMacro("__LP32__");
527
1
    Builder.defineMacro("_ARCH_PPC64");
528
1
    Builder.defineMacro("__powerpc64__");
529
1
  }
530
531
public:
532
  PS3PPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
533
1
      : OSTargetInfo<Target>(Triple, Opts) {
534
1
    this->LongWidth = this->LongAlign = 32;
535
1
    this->PointerWidth = this->PointerAlign = 32;
536
1
    this->IntMaxType = TargetInfo::SignedLongLong;
537
1
    this->Int64Type = TargetInfo::SignedLongLong;
538
1
    this->SizeType = TargetInfo::UnsignedInt;
539
1
    this->resetDataLayout("E-m:e-p:32:32-i64:64-n32:64");
540
1
  }
541
};
542
543
template <typename Target>
544
class LLVM_LIBRARY_VISIBILITY PS4OSTargetInfo : public OSTargetInfo<Target> {
545
protected:
546
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
547
33
                    MacroBuilder &Builder) const override {
548
33
    Builder.defineMacro("__FreeBSD__", "9");
549
33
    Builder.defineMacro("__FreeBSD_cc_version", "900001");
550
33
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
551
33
    DefineStd(Builder, "unix", Opts);
552
33
    Builder.defineMacro("__ELF__");
553
33
    Builder.defineMacro("__SCE__");
554
33
    Builder.defineMacro("__ORBIS__");
555
33
  }
556
557
public:
558
  PS4OSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
559
35
      : OSTargetInfo<Target>(Triple, Opts) {
560
35
    this->WCharType = TargetInfo::UnsignedShort;
561
562
    // On PS4, TLS variable cannot be aligned to more than 32 bytes (256 bits).
563
35
    this->MaxTLSAlign = 256;
564
565
    // On PS4, do not honor explicit bit field alignment,
566
    // as in "__attribute__((aligned(2))) int b : 1;".
567
35
    this->UseExplicitBitFieldAlignment = false;
568
569
35
    switch (Triple.getArch()) {
570
0
    default:
571
35
    case llvm::Triple::x86_64:
572
35
      this->MCountName = ".mcount";
573
35
      this->NewAlign = 256;
574
35
      break;
575
35
    }
576
35
  }
577
  TargetInfo::CallingConvCheckResult
578
15
  checkCallingConvention(CallingConv CC) const override {
579
13
    return (CC == CC_C) ? 
TargetInfo::CCCR_OK2
: TargetInfo::CCCR_Error;
580
15
  }
581
};
582
583
// RTEMS Target
584
template <typename Target>
585
class LLVM_LIBRARY_VISIBILITY RTEMSTargetInfo : public OSTargetInfo<Target> {
586
protected:
587
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
588
4
                    MacroBuilder &Builder) const override {
589
    // RTEMS defines; list based off of gcc output
590
591
4
    Builder.defineMacro("__rtems__");
592
4
    Builder.defineMacro("__ELF__");
593
4
    if (Opts.CPlusPlus)
594
1
      Builder.defineMacro("_GNU_SOURCE");
595
4
  }
clang::targets::RTEMSTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
588
2
                    MacroBuilder &Builder) const override {
589
    // RTEMS defines; list based off of gcc output
590
591
2
    Builder.defineMacro("__rtems__");
592
2
    Builder.defineMacro("__ELF__");
593
2
    if (Opts.CPlusPlus)
594
0
      Builder.defineMacro("_GNU_SOURCE");
595
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::MipsTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::RTEMSTargetInfo<clang::targets::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
588
2
                    MacroBuilder &Builder) const override {
589
    // RTEMS defines; list based off of gcc output
590
591
2
    Builder.defineMacro("__rtems__");
592
2
    Builder.defineMacro("__ELF__");
593
2
    if (Opts.CPlusPlus)
594
1
      Builder.defineMacro("_GNU_SOURCE");
595
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::SparcV8elTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
596
597
public:
598
  RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
599
4
      : OSTargetInfo<Target>(Triple, Opts) {
600
4
    switch (Triple.getArch()) {
601
2
    default:
602
2
    case llvm::Triple::x86:
603
      // this->MCountName = ".mcount";
604
2
      break;
605
0
    case llvm::Triple::mips:
606
0
    case llvm::Triple::mipsel:
607
0
    case llvm::Triple::ppc:
608
0
    case llvm::Triple::ppc64:
609
0
    case llvm::Triple::ppc64le:
610
      // this->MCountName = "_mcount";
611
0
      break;
612
2
    case llvm::Triple::arm:
613
      // this->MCountName = "__mcount";
614
2
      break;
615
4
    }
616
4
  }
clang::targets::RTEMSTargetInfo<clang::targets::ARMleTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
599
2
      : OSTargetInfo<Target>(Triple, Opts) {
600
2
    switch (Triple.getArch()) {
601
0
    default:
602
0
    case llvm::Triple::x86:
603
      // this->MCountName = ".mcount";
604
0
      break;
605
0
    case llvm::Triple::mips:
606
0
    case llvm::Triple::mipsel:
607
0
    case llvm::Triple::ppc:
608
0
    case llvm::Triple::ppc64:
609
0
    case llvm::Triple::ppc64le:
610
      // this->MCountName = "_mcount";
611
0
      break;
612
2
    case llvm::Triple::arm:
613
      // this->MCountName = "__mcount";
614
2
      break;
615
2
    }
616
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::ARMbeTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::MipsTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::PPC32TargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::RTEMSTargetInfo<clang::targets::SparcV8TargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
599
2
      : OSTargetInfo<Target>(Triple, Opts) {
600
2
    switch (Triple.getArch()) {
601
2
    default:
602
2
    case llvm::Triple::x86:
603
      // this->MCountName = ".mcount";
604
2
      break;
605
0
    case llvm::Triple::mips:
606
0
    case llvm::Triple::mipsel:
607
0
    case llvm::Triple::ppc:
608
0
    case llvm::Triple::ppc64:
609
0
    case llvm::Triple::ppc64le:
610
      // this->MCountName = "_mcount";
611
0
      break;
612
0
    case llvm::Triple::arm:
613
      // this->MCountName = "__mcount";
614
0
      break;
615
2
    }
616
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::SparcV8elTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
617
};
618
619
// Solaris target
620
template <typename Target>
621
class LLVM_LIBRARY_VISIBILITY SolarisTargetInfo : public OSTargetInfo<Target> {
622
protected:
623
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
624
13
                    MacroBuilder &Builder) const override {
625
13
    DefineStd(Builder, "sun", Opts);
626
13
    DefineStd(Builder, "unix", Opts);
627
13
    Builder.defineMacro("__ELF__");
628
13
    Builder.defineMacro("__svr4__");
629
13
    Builder.defineMacro("__SVR4");
630
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
631
    // newer, but to 500 for everything else.  feature_test.h has a check to
632
    // ensure that you are not using C99 with an old version of X/Open or C89
633
    // with a new version.
634
13
    if (Opts.C99)
635
10
      Builder.defineMacro("_XOPEN_SOURCE", "600");
636
3
    else
637
3
      Builder.defineMacro("_XOPEN_SOURCE", "500");
638
13
    if (Opts.CPlusPlus) {
639
3
      Builder.defineMacro("__C99FEATURES__");
640
3
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
641
3
    }
642
    // GCC restricts the next two to C++.
643
13
    Builder.defineMacro("_LARGEFILE_SOURCE");
644
13
    Builder.defineMacro("_LARGEFILE64_SOURCE");
645
13
    Builder.defineMacro("__EXTENSIONS__");
646
13
    if (Opts.POSIXThreads)
647
0
      Builder.defineMacro("_REENTRANT");
648
13
    if (this->HasFloat128)
649
8
      Builder.defineMacro("__FLOAT128__");
650
13
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
624
4
                    MacroBuilder &Builder) const override {
625
4
    DefineStd(Builder, "sun", Opts);
626
4
    DefineStd(Builder, "unix", Opts);
627
4
    Builder.defineMacro("__ELF__");
628
4
    Builder.defineMacro("__svr4__");
629
4
    Builder.defineMacro("__SVR4");
630
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
631
    // newer, but to 500 for everything else.  feature_test.h has a check to
632
    // ensure that you are not using C99 with an old version of X/Open or C89
633
    // with a new version.
634
4
    if (Opts.C99)
635
4
      Builder.defineMacro("_XOPEN_SOURCE", "600");
636
0
    else
637
0
      Builder.defineMacro("_XOPEN_SOURCE", "500");
638
4
    if (Opts.CPlusPlus) {
639
0
      Builder.defineMacro("__C99FEATURES__");
640
0
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
641
0
    }
642
    // GCC restricts the next two to C++.
643
4
    Builder.defineMacro("_LARGEFILE_SOURCE");
644
4
    Builder.defineMacro("_LARGEFILE64_SOURCE");
645
4
    Builder.defineMacro("__EXTENSIONS__");
646
4
    if (Opts.POSIXThreads)
647
0
      Builder.defineMacro("_REENTRANT");
648
4
    if (this->HasFloat128)
649
0
      Builder.defineMacro("__FLOAT128__");
650
4
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
624
1
                    MacroBuilder &Builder) const override {
625
1
    DefineStd(Builder, "sun", Opts);
626
1
    DefineStd(Builder, "unix", Opts);
627
1
    Builder.defineMacro("__ELF__");
628
1
    Builder.defineMacro("__svr4__");
629
1
    Builder.defineMacro("__SVR4");
630
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
631
    // newer, but to 500 for everything else.  feature_test.h has a check to
632
    // ensure that you are not using C99 with an old version of X/Open or C89
633
    // with a new version.
634
1
    if (Opts.C99)
635
1
      Builder.defineMacro("_XOPEN_SOURCE", "600");
636
0
    else
637
0
      Builder.defineMacro("_XOPEN_SOURCE", "500");
638
1
    if (Opts.CPlusPlus) {
639
0
      Builder.defineMacro("__C99FEATURES__");
640
0
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
641
0
    }
642
    // GCC restricts the next two to C++.
643
1
    Builder.defineMacro("_LARGEFILE_SOURCE");
644
1
    Builder.defineMacro("_LARGEFILE64_SOURCE");
645
1
    Builder.defineMacro("__EXTENSIONS__");
646
1
    if (Opts.POSIXThreads)
647
0
      Builder.defineMacro("_REENTRANT");
648
1
    if (this->HasFloat128)
649
0
      Builder.defineMacro("__FLOAT128__");
650
1
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
624
6
                    MacroBuilder &Builder) const override {
625
6
    DefineStd(Builder, "sun", Opts);
626
6
    DefineStd(Builder, "unix", Opts);
627
6
    Builder.defineMacro("__ELF__");
628
6
    Builder.defineMacro("__svr4__");
629
6
    Builder.defineMacro("__SVR4");
630
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
631
    // newer, but to 500 for everything else.  feature_test.h has a check to
632
    // ensure that you are not using C99 with an old version of X/Open or C89
633
    // with a new version.
634
6
    if (Opts.C99)
635
4
      Builder.defineMacro("_XOPEN_SOURCE", "600");
636
2
    else
637
2
      Builder.defineMacro("_XOPEN_SOURCE", "500");
638
6
    if (Opts.CPlusPlus) {
639
2
      Builder.defineMacro("__C99FEATURES__");
640
2
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
641
2
    }
642
    // GCC restricts the next two to C++.
643
6
    Builder.defineMacro("_LARGEFILE_SOURCE");
644
6
    Builder.defineMacro("_LARGEFILE64_SOURCE");
645
6
    Builder.defineMacro("__EXTENSIONS__");
646
6
    if (Opts.POSIXThreads)
647
0
      Builder.defineMacro("_REENTRANT");
648
6
    if (this->HasFloat128)
649
6
      Builder.defineMacro("__FLOAT128__");
650
6
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
624
2
                    MacroBuilder &Builder) const override {
625
2
    DefineStd(Builder, "sun", Opts);
626
2
    DefineStd(Builder, "unix", Opts);
627
2
    Builder.defineMacro("__ELF__");
628
2
    Builder.defineMacro("__svr4__");
629
2
    Builder.defineMacro("__SVR4");
630
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
631
    // newer, but to 500 for everything else.  feature_test.h has a check to
632
    // ensure that you are not using C99 with an old version of X/Open or C89
633
    // with a new version.
634
2
    if (Opts.C99)
635
1
      Builder.defineMacro("_XOPEN_SOURCE", "600");
636
1
    else
637
1
      Builder.defineMacro("_XOPEN_SOURCE", "500");
638
2
    if (Opts.CPlusPlus) {
639
1
      Builder.defineMacro("__C99FEATURES__");
640
1
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
641
1
    }
642
    // GCC restricts the next two to C++.
643
2
    Builder.defineMacro("_LARGEFILE_SOURCE");
644
2
    Builder.defineMacro("_LARGEFILE64_SOURCE");
645
2
    Builder.defineMacro("__EXTENSIONS__");
646
2
    if (Opts.POSIXThreads)
647
0
      Builder.defineMacro("_REENTRANT");
648
2
    if (this->HasFloat128)
649
2
      Builder.defineMacro("__FLOAT128__");
650
2
  }
651
652
public:
653
  SolarisTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
654
13
      : OSTargetInfo<Target>(Triple, Opts) {
655
13
    if (this->PointerWidth == 64) {
656
3
      this->WCharType = this->WIntType = this->SignedInt;
657
10
    } else {
658
10
      this->WCharType = this->WIntType = this->SignedLong;
659
10
    }
660
13
    switch (Triple.getArch()) {
661
5
    default:
662
5
      break;
663
6
    case llvm::Triple::x86:
664
8
    case llvm::Triple::x86_64:
665
8
      this->HasFloat128 = true;
666
8
      break;
667
13
    }
668
13
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV8TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
654
4
      : OSTargetInfo<Target>(Triple, Opts) {
655
4
    if (this->PointerWidth == 64) {
656
0
      this->WCharType = this->WIntType = this->SignedInt;
657
4
    } else {
658
4
      this->WCharType = this->WIntType = this->SignedLong;
659
4
    }
660
4
    switch (Triple.getArch()) {
661
4
    default:
662
4
      break;
663
0
    case llvm::Triple::x86:
664
0
    case llvm::Triple::x86_64:
665
0
      this->HasFloat128 = true;
666
0
      break;
667
4
    }
668
4
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV9TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
654
1
      : OSTargetInfo<Target>(Triple, Opts) {
655
1
    if (this->PointerWidth == 64) {
656
1
      this->WCharType = this->WIntType = this->SignedInt;
657
0
    } else {
658
0
      this->WCharType = this->WIntType = this->SignedLong;
659
0
    }
660
1
    switch (Triple.getArch()) {
661
1
    default:
662
1
      break;
663
0
    case llvm::Triple::x86:
664
0
    case llvm::Triple::x86_64:
665
0
      this->HasFloat128 = true;
666
0
      break;
667
1
    }
668
1
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_32TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
654
6
      : OSTargetInfo<Target>(Triple, Opts) {
655
6
    if (this->PointerWidth == 64) {
656
0
      this->WCharType = this->WIntType = this->SignedInt;
657
6
    } else {
658
6
      this->WCharType = this->WIntType = this->SignedLong;
659
6
    }
660
6
    switch (Triple.getArch()) {
661
0
    default:
662
0
      break;
663
6
    case llvm::Triple::x86:
664
6
    case llvm::Triple::x86_64:
665
6
      this->HasFloat128 = true;
666
6
      break;
667
6
    }
668
6
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_64TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
654
2
      : OSTargetInfo<Target>(Triple, Opts) {
655
2
    if (this->PointerWidth == 64) {
656
2
      this->WCharType = this->WIntType = this->SignedInt;
657
0
    } else {
658
0
      this->WCharType = this->WIntType = this->SignedLong;
659
0
    }
660
2
    switch (Triple.getArch()) {
661
0
    default:
662
0
      break;
663
0
    case llvm::Triple::x86:
664
2
    case llvm::Triple::x86_64:
665
2
      this->HasFloat128 = true;
666
2
      break;
667
2
    }
668
2
  }
669
};
670
671
// AIX Target
672
template <typename Target>
673
class AIXTargetInfo : public OSTargetInfo<Target> {
674
protected:
675
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
676
133
                    MacroBuilder &Builder) const override {
677
133
    DefineStd(Builder, "unix", Opts);
678
133
    Builder.defineMacro("_IBMR2");
679
133
    Builder.defineMacro("_POWER");
680
681
133
    Builder.defineMacro("_AIX");
682
683
133
    if (Opts.EnableAIXExtendedAltivecABI)
684
6
      Builder.defineMacro("__EXTABI__");
685
686
133
    unsigned Major, Minor, Micro;
687
133
    Triple.getOSVersion(Major, Minor, Micro);
688
689
    // Define AIX OS-Version Macros.
690
    // Includes logic for legacy versions of AIX; no specific intent to support.
691
133
    std::pair<int, int> OsVersion = {Major, Minor};
692
133
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")17
;
693
133
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")16
;
694
133
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")15
;
695
133
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")14
;
696
133
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")13
;
697
133
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")12
;
698
133
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")11
;
699
133
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")10
;
700
133
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")9
;
701
133
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")1
;
702
703
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
704
133
    Builder.defineMacro("_LONG_LONG");
705
706
133
    if (Opts.POSIXThreads) {
707
1
      Builder.defineMacro("_THREAD_SAFE");
708
1
    }
709
710
133
    if (this->PointerWidth == 64) {
711
55
      Builder.defineMacro("__64BIT__");
712
55
    }
713
714
    // Define _WCHAR_T when it is a fundamental type
715
    // (i.e., for C++ without -fno-wchar).
716
133
    if (Opts.CPlusPlus && 
Opts.WChar52
) {
717
51
      Builder.defineMacro("_WCHAR_T");
718
51
    }
719
133
  }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
676
78
                    MacroBuilder &Builder) const override {
677
78
    DefineStd(Builder, "unix", Opts);
678
78
    Builder.defineMacro("_IBMR2");
679
78
    Builder.defineMacro("_POWER");
680
681
78
    Builder.defineMacro("_AIX");
682
683
78
    if (Opts.EnableAIXExtendedAltivecABI)
684
3
      Builder.defineMacro("__EXTABI__");
685
686
78
    unsigned Major, Minor, Micro;
687
78
    Triple.getOSVersion(Major, Minor, Micro);
688
689
    // Define AIX OS-Version Macros.
690
    // Includes logic for legacy versions of AIX; no specific intent to support.
691
78
    std::pair<int, int> OsVersion = {Major, Minor};
692
78
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")16
;
693
78
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")15
;
694
78
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")14
;
695
78
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")13
;
696
78
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")12
;
697
78
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")11
;
698
78
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")10
;
699
78
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")9
;
700
78
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")8
;
701
78
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")1
;
702
703
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
704
78
    Builder.defineMacro("_LONG_LONG");
705
706
78
    if (Opts.POSIXThreads) {
707
1
      Builder.defineMacro("_THREAD_SAFE");
708
1
    }
709
710
78
    if (this->PointerWidth == 64) {
711
0
      Builder.defineMacro("__64BIT__");
712
0
    }
713
714
    // Define _WCHAR_T when it is a fundamental type
715
    // (i.e., for C++ without -fno-wchar).
716
78
    if (Opts.CPlusPlus && 
Opts.WChar31
) {
717
30
      Builder.defineMacro("_WCHAR_T");
718
30
    }
719
78
  }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
676
55
                    MacroBuilder &Builder) const override {
677
55
    DefineStd(Builder, "unix", Opts);
678
55
    Builder.defineMacro("_IBMR2");
679
55
    Builder.defineMacro("_POWER");
680
681
55
    Builder.defineMacro("_AIX");
682
683
55
    if (Opts.EnableAIXExtendedAltivecABI)
684
3
      Builder.defineMacro("__EXTABI__");
685
686
55
    unsigned Major, Minor, Micro;
687
55
    Triple.getOSVersion(Major, Minor, Micro);
688
689
    // Define AIX OS-Version Macros.
690
    // Includes logic for legacy versions of AIX; no specific intent to support.
691
55
    std::pair<int, int> OsVersion = {Major, Minor};
692
55
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")1
;
693
55
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")1
;
694
55
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")1
;
695
55
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")1
;
696
55
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")1
;
697
55
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")1
;
698
55
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")1
;
699
55
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")1
;
700
55
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")1
;
701
55
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")0
;
702
703
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
704
55
    Builder.defineMacro("_LONG_LONG");
705
706
55
    if (Opts.POSIXThreads) {
707
0
      Builder.defineMacro("_THREAD_SAFE");
708
0
    }
709
710
55
    if (this->PointerWidth == 64) {
711
55
      Builder.defineMacro("__64BIT__");
712
55
    }
713
714
    // Define _WCHAR_T when it is a fundamental type
715
    // (i.e., for C++ without -fno-wchar).
716
55
    if (Opts.CPlusPlus && 
Opts.WChar21
) {
717
21
      Builder.defineMacro("_WCHAR_T");
718
21
    }
719
55
  }
720
721
public:
722
  AIXTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
723
133
      : OSTargetInfo<Target>(Triple, Opts) {
724
133
    this->TheCXXABI.set(TargetCXXABI::XL);
725
726
133
    if (this->PointerWidth == 64) {
727
55
      this->WCharType = this->UnsignedInt;
728
78
    } else {
729
78
      this->WCharType = this->UnsignedShort;
730
78
    }
731
133
    this->UseZeroLengthBitfieldAlignment = true;
732
133
  }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::AIXTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
723
78
      : OSTargetInfo<Target>(Triple, Opts) {
724
78
    this->TheCXXABI.set(TargetCXXABI::XL);
725
726
78
    if (this->PointerWidth == 64) {
727
0
      this->WCharType = this->UnsignedInt;
728
78
    } else {
729
78
      this->WCharType = this->UnsignedShort;
730
78
    }
731
78
    this->UseZeroLengthBitfieldAlignment = true;
732
78
  }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::AIXTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
723
55
      : OSTargetInfo<Target>(Triple, Opts) {
724
55
    this->TheCXXABI.set(TargetCXXABI::XL);
725
726
55
    if (this->PointerWidth == 64) {
727
55
      this->WCharType = this->UnsignedInt;
728
0
    } else {
729
0
      this->WCharType = this->UnsignedShort;
730
0
    }
731
55
    this->UseZeroLengthBitfieldAlignment = true;
732
55
  }
733
734
  // AIX sets FLT_EVAL_METHOD to be 1.
735
133
  unsigned getFloatEvalMethod() const override { return 1; }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::getFloatEvalMethod() const
Line
Count
Source
735
78
  unsigned getFloatEvalMethod() const override { return 1; }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::getFloatEvalMethod() const
Line
Count
Source
735
55
  unsigned getFloatEvalMethod() const override { return 1; }
736
380
  bool hasInt128Type() const override { return false; }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::hasInt128Type() const
Line
Count
Source
736
217
  bool hasInt128Type() const override { return false; }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::hasInt128Type() const
Line
Count
Source
736
163
  bool hasInt128Type() const override { return false; }
737
738
1.16k
  bool defaultsToAIXPowerAlignment() const override { return true; }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::defaultsToAIXPowerAlignment() const
Line
Count
Source
738
600
  bool defaultsToAIXPowerAlignment() const override { return true; }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::defaultsToAIXPowerAlignment() const
Line
Count
Source
738
568
  bool defaultsToAIXPowerAlignment() const override { return true; }
739
};
740
741
// z/OS target
742
template <typename Target>
743
class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public OSTargetInfo<Target> {
744
protected:
745
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
746
14
                    MacroBuilder &Builder) const override {
747
    // FIXME: _LONG_LONG should not be defined under -std=c89.
748
14
    Builder.defineMacro("_LONG_LONG");
749
14
    Builder.defineMacro("_OPEN_DEFAULT");
750
    // _UNIX03_WITHDRAWN is required to build libcxx.
751
14
    Builder.defineMacro("_UNIX03_WITHDRAWN");
752
14
    Builder.defineMacro("__370__");
753
14
    Builder.defineMacro("__BFP__");
754
    // FIXME: __BOOL__ should not be defined under -std=c89.
755
14
    Builder.defineMacro("__BOOL__");
756
14
    Builder.defineMacro("__LONGNAME__");
757
14
    Builder.defineMacro("__MVS__");
758
14
    Builder.defineMacro("__THW_370__");
759
14
    Builder.defineMacro("__THW_BIG_ENDIAN__");
760
14
    Builder.defineMacro("__TOS_390__");
761
14
    Builder.defineMacro("__TOS_MVS__");
762
14
    Builder.defineMacro("__XPLINK__");
763
764
14
    if (this->PointerWidth == 64)
765
14
      Builder.defineMacro("__64BIT__");
766
767
14
    if (Opts.CPlusPlus) {
768
9
      Builder.defineMacro("__DLL__");
769
      // _XOPEN_SOURCE=600 is required to build libcxx.
770
9
      Builder.defineMacro("_XOPEN_SOURCE", "600");
771
9
    }
772
773
14
    if (Opts.GNUMode) {
774
8
      Builder.defineMacro("_MI_BUILTIN");
775
8
      Builder.defineMacro("_EXT");
776
8
    }
777
778
14
    if (Opts.CPlusPlus && 
Opts.WChar9
) {
779
      // Macro __wchar_t is defined so that the wchar_t data
780
      // type is not declared as a typedef in system headers.
781
9
      Builder.defineMacro("__wchar_t");
782
9
    }
783
784
14
    this->PlatformName = llvm::Triple::getOSTypeName(Triple.getOS());
785
14
  }
786
787
public:
788
  ZOSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
789
14
      : OSTargetInfo<Target>(Triple, Opts) {
790
14
    this->WCharType = TargetInfo::UnsignedInt;
791
14
    this->UseBitFieldTypeAlignment = false;
792
14
    this->UseZeroLengthBitfieldAlignment = true;
793
14
    this->ZeroLengthBitfieldBoundary = 32;
794
14
    this->MinGlobalAlign = 0;
795
14
    this->DefaultAlignForAttributeAligned = 128;
796
14
  }
797
};
798
799
void addWindowsDefines(const llvm::Triple &Triple, const LangOptions &Opts,
800
                       MacroBuilder &Builder);
801
802
// Windows target
803
template <typename Target>
804
class LLVM_LIBRARY_VISIBILITY WindowsTargetInfo : public OSTargetInfo<Target> {
805
protected:
806
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
807
8.40k
                    MacroBuilder &Builder) const override {
808
8.40k
    addWindowsDefines(Triple, Opts, Builder);
809
8.40k
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
807
636
                    MacroBuilder &Builder) const override {
808
636
    addWindowsDefines(Triple, Opts, Builder);
809
636
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
807
7.62k
                    MacroBuilder &Builder) const override {
808
7.62k
    addWindowsDefines(Triple, Opts, Builder);
809
7.62k
  }
clang::targets::WindowsTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
807
45
                    MacroBuilder &Builder) const override {
808
45
    addWindowsDefines(Triple, Opts, Builder);
809
45
  }
clang::targets::WindowsTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
807
96
                    MacroBuilder &Builder) const override {
808
96
    addWindowsDefines(Triple, Opts, Builder);
809
96
  }
810
811
public:
812
  WindowsTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
813
8.40k
      : OSTargetInfo<Target>(Triple, Opts) {
814
8.40k
    this->WCharType = TargetInfo::UnsignedShort;
815
8.40k
    this->WIntType = TargetInfo::UnsignedShort;
816
8.40k
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_32TargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
813
641
      : OSTargetInfo<Target>(Triple, Opts) {
814
641
    this->WCharType = TargetInfo::UnsignedShort;
815
641
    this->WIntType = TargetInfo::UnsignedShort;
816
641
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_64TargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
813
7.62k
      : OSTargetInfo<Target>(Triple, Opts) {
814
7.62k
    this->WCharType = TargetInfo::UnsignedShort;
815
7.62k
    this->WIntType = TargetInfo::UnsignedShort;
816
7.62k
  }
clang::targets::WindowsTargetInfo<clang::targets::AArch64leTargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
813
45
      : OSTargetInfo<Target>(Triple, Opts) {
814
45
    this->WCharType = TargetInfo::UnsignedShort;
815
45
    this->WIntType = TargetInfo::UnsignedShort;
816
45
  }
clang::targets::WindowsTargetInfo<clang::targets::ARMleTargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
813
96
      : OSTargetInfo<Target>(Triple, Opts) {
814
96
    this->WCharType = TargetInfo::UnsignedShort;
815
96
    this->WIntType = TargetInfo::UnsignedShort;
816
96
  }
817
};
818
819
template <typename Target>
820
class LLVM_LIBRARY_VISIBILITY NaClTargetInfo : public OSTargetInfo<Target> {
821
protected:
822
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
823
30
                    MacroBuilder &Builder) const override {
824
30
    if (Opts.POSIXThreads)
825
3
      Builder.defineMacro("_REENTRANT");
826
30
    if (Opts.CPlusPlus)
827
13
      Builder.defineMacro("_GNU_SOURCE");
828
829
30
    DefineStd(Builder, "unix", Opts);
830
30
    Builder.defineMacro("__ELF__");
831
30
    Builder.defineMacro("__native_client__");
832
30
  }
clang::targets::NaClTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
823
2
                    MacroBuilder &Builder) const override {
824
2
    if (Opts.POSIXThreads)
825
0
      Builder.defineMacro("_REENTRANT");
826
2
    if (Opts.CPlusPlus)
827
0
      Builder.defineMacro("_GNU_SOURCE");
828
829
2
    DefineStd(Builder, "unix", Opts);
830
2
    Builder.defineMacro("__ELF__");
831
2
    Builder.defineMacro("__native_client__");
832
2
  }
Unexecuted instantiation: clang::targets::NaClTargetInfo<clang::targets::ARMbeTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::NaClTargetInfo<clang::targets::NaClMips32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
823
3
                    MacroBuilder &Builder) const override {
824
3
    if (Opts.POSIXThreads)
825
1
      Builder.defineMacro("_REENTRANT");
826
3
    if (Opts.CPlusPlus)
827
2
      Builder.defineMacro("_GNU_SOURCE");
828
829
3
    DefineStd(Builder, "unix", Opts);
830
3
    Builder.defineMacro("__ELF__");
831
3
    Builder.defineMacro("__native_client__");
832
3
  }
clang::targets::NaClTargetInfo<clang::targets::PNaClTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
823
15
                    MacroBuilder &Builder) const override {
824
15
    if (Opts.POSIXThreads)
825
1
      Builder.defineMacro("_REENTRANT");
826
15
    if (Opts.CPlusPlus)
827
6
      Builder.defineMacro("_GNU_SOURCE");
828
829
15
    DefineStd(Builder, "unix", Opts);
830
15
    Builder.defineMacro("__ELF__");
831
15
    Builder.defineMacro("__native_client__");
832
15
  }
clang::targets::NaClTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
823
2
                    MacroBuilder &Builder) const override {
824
2
    if (Opts.POSIXThreads)
825
0
      Builder.defineMacro("_REENTRANT");
826
2
    if (Opts.CPlusPlus)
827
0
      Builder.defineMacro("_GNU_SOURCE");
828
829
2
    DefineStd(Builder, "unix", Opts);
830
2
    Builder.defineMacro("__ELF__");
831
2
    Builder.defineMacro("__native_client__");
832
2
  }
clang::targets::NaClTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
823
8
                    MacroBuilder &Builder) const override {
824
8
    if (Opts.POSIXThreads)
825
1
      Builder.defineMacro("_REENTRANT");
826
8
    if (Opts.CPlusPlus)
827
5
      Builder.defineMacro("_GNU_SOURCE");
828
829
8
    DefineStd(Builder, "unix", Opts);
830
8
    Builder.defineMacro("__ELF__");
831
8
    Builder.defineMacro("__native_client__");
832
8
  }
833
834
public:
835
  NaClTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
836
30
      : OSTargetInfo<Target>(Triple, Opts) {
837
30
    this->LongAlign = 32;
838
30
    this->LongWidth = 32;
839
30
    this->PointerAlign = 32;
840
30
    this->PointerWidth = 32;
841
30
    this->IntMaxType = TargetInfo::SignedLongLong;
842
30
    this->Int64Type = TargetInfo::SignedLongLong;
843
30
    this->DoubleAlign = 64;
844
30
    this->LongDoubleWidth = 64;
845
30
    this->LongDoubleAlign = 64;
846
30
    this->LongLongWidth = 64;
847
30
    this->LongLongAlign = 64;
848
30
    this->SizeType = TargetInfo::UnsignedInt;
849
30
    this->PtrDiffType = TargetInfo::SignedInt;
850
30
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
30
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
30
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
28
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
2
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
2
                            "i64:64-n8:16:32-S128");
858
26
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
8
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
8
                            "i64:64-n8:16:32:64-S128");
861
18
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
15
    } else {
864
15
      assert(Triple.getArch() == llvm::Triple::le32);
865
15
      this->resetDataLayout("e-p:32:32-i64:64");
866
15
    }
867
30
  }
clang::targets::NaClTargetInfo<clang::targets::ARMleTargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
836
2
      : OSTargetInfo<Target>(Triple, Opts) {
837
2
    this->LongAlign = 32;
838
2
    this->LongWidth = 32;
839
2
    this->PointerAlign = 32;
840
2
    this->PointerWidth = 32;
841
2
    this->IntMaxType = TargetInfo::SignedLongLong;
842
2
    this->Int64Type = TargetInfo::SignedLongLong;
843
2
    this->DoubleAlign = 64;
844
2
    this->LongDoubleWidth = 64;
845
2
    this->LongDoubleAlign = 64;
846
2
    this->LongLongWidth = 64;
847
2
    this->LongLongAlign = 64;
848
2
    this->SizeType = TargetInfo::UnsignedInt;
849
2
    this->PtrDiffType = TargetInfo::SignedInt;
850
2
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
2
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
2
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
0
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
0
                            "i64:64-n8:16:32-S128");
858
0
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
0
                            "i64:64-n8:16:32:64-S128");
861
0
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
0
    } else {
864
0
      assert(Triple.getArch() == llvm::Triple::le32);
865
0
      this->resetDataLayout("e-p:32:32-i64:64");
866
0
    }
867
2
  }
Unexecuted instantiation: clang::targets::NaClTargetInfo<clang::targets::ARMbeTargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::NaClTargetInfo<clang::targets::NaClMips32TargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
836
3
      : OSTargetInfo<Target>(Triple, Opts) {
837
3
    this->LongAlign = 32;
838
3
    this->LongWidth = 32;
839
3
    this->PointerAlign = 32;
840
3
    this->PointerWidth = 32;
841
3
    this->IntMaxType = TargetInfo::SignedLongLong;
842
3
    this->Int64Type = TargetInfo::SignedLongLong;
843
3
    this->DoubleAlign = 64;
844
3
    this->LongDoubleWidth = 64;
845
3
    this->LongDoubleAlign = 64;
846
3
    this->LongLongWidth = 64;
847
3
    this->LongLongAlign = 64;
848
3
    this->SizeType = TargetInfo::UnsignedInt;
849
3
    this->PtrDiffType = TargetInfo::SignedInt;
850
3
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
3
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
3
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
3
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
0
                            "i64:64-n8:16:32-S128");
858
3
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
0
                            "i64:64-n8:16:32:64-S128");
861
3
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
0
    } else {
864
0
      assert(Triple.getArch() == llvm::Triple::le32);
865
0
      this->resetDataLayout("e-p:32:32-i64:64");
866
0
    }
867
3
  }
clang::targets::NaClTargetInfo<clang::targets::PNaClTargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
836
15
      : OSTargetInfo<Target>(Triple, Opts) {
837
15
    this->LongAlign = 32;
838
15
    this->LongWidth = 32;
839
15
    this->PointerAlign = 32;
840
15
    this->PointerWidth = 32;
841
15
    this->IntMaxType = TargetInfo::SignedLongLong;
842
15
    this->Int64Type = TargetInfo::SignedLongLong;
843
15
    this->DoubleAlign = 64;
844
15
    this->LongDoubleWidth = 64;
845
15
    this->LongDoubleAlign = 64;
846
15
    this->LongLongWidth = 64;
847
15
    this->LongLongAlign = 64;
848
15
    this->SizeType = TargetInfo::UnsignedInt;
849
15
    this->PtrDiffType = TargetInfo::SignedInt;
850
15
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
15
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
15
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
15
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
0
                            "i64:64-n8:16:32-S128");
858
15
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
0
                            "i64:64-n8:16:32:64-S128");
861
15
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
15
    } else {
864
15
      assert(Triple.getArch() == llvm::Triple::le32);
865
15
      this->resetDataLayout("e-p:32:32-i64:64");
866
15
    }
867
15
  }
clang::targets::NaClTargetInfo<clang::targets::X86_32TargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
836
2
      : OSTargetInfo<Target>(Triple, Opts) {
837
2
    this->LongAlign = 32;
838
2
    this->LongWidth = 32;
839
2
    this->PointerAlign = 32;
840
2
    this->PointerWidth = 32;
841
2
    this->IntMaxType = TargetInfo::SignedLongLong;
842
2
    this->Int64Type = TargetInfo::SignedLongLong;
843
2
    this->DoubleAlign = 64;
844
2
    this->LongDoubleWidth = 64;
845
2
    this->LongDoubleAlign = 64;
846
2
    this->LongLongWidth = 64;
847
2
    this->LongLongAlign = 64;
848
2
    this->SizeType = TargetInfo::UnsignedInt;
849
2
    this->PtrDiffType = TargetInfo::SignedInt;
850
2
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
2
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
2
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
2
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
2
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
2
                            "i64:64-n8:16:32-S128");
858
0
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
0
                            "i64:64-n8:16:32:64-S128");
861
0
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
0
    } else {
864
0
      assert(Triple.getArch() == llvm::Triple::le32);
865
0
      this->resetDataLayout("e-p:32:32-i64:64");
866
0
    }
867
2
  }
clang::targets::NaClTargetInfo<clang::targets::X86_64TargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
836
8
      : OSTargetInfo<Target>(Triple, Opts) {
837
8
    this->LongAlign = 32;
838
8
    this->LongWidth = 32;
839
8
    this->PointerAlign = 32;
840
8
    this->PointerWidth = 32;
841
8
    this->IntMaxType = TargetInfo::SignedLongLong;
842
8
    this->Int64Type = TargetInfo::SignedLongLong;
843
8
    this->DoubleAlign = 64;
844
8
    this->LongDoubleWidth = 64;
845
8
    this->LongDoubleAlign = 64;
846
8
    this->LongLongWidth = 64;
847
8
    this->LongLongAlign = 64;
848
8
    this->SizeType = TargetInfo::UnsignedInt;
849
8
    this->PtrDiffType = TargetInfo::SignedInt;
850
8
    this->IntPtrType = TargetInfo::SignedInt;
851
    // RegParmMax is inherited from the underlying architecture.
852
8
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
853
8
    if (Triple.getArch() == llvm::Triple::arm) {
854
      // Handled in ARM's setABI().
855
8
    } else if (Triple.getArch() == llvm::Triple::x86) {
856
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
857
0
                            "i64:64-n8:16:32-S128");
858
8
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
859
8
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
860
8
                            "i64:64-n8:16:32:64-S128");
861
0
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
862
      // Handled on mips' setDataLayout.
863
0
    } else {
864
0
      assert(Triple.getArch() == llvm::Triple::le32);
865
0
      this->resetDataLayout("e-p:32:32-i64:64");
866
0
    }
867
8
  }
868
};
869
870
// Fuchsia Target
871
template <typename Target>
872
class LLVM_LIBRARY_VISIBILITY FuchsiaTargetInfo : public OSTargetInfo<Target> {
873
protected:
874
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
875
27
                    MacroBuilder &Builder) const override {
876
27
    Builder.defineMacro("__Fuchsia__");
877
27
    Builder.defineMacro("__ELF__");
878
27
    if (Opts.POSIXThreads)
879
0
      Builder.defineMacro("_REENTRANT");
880
    // Required by the libc++ locale support.
881
27
    if (Opts.CPlusPlus)
882
27
      Builder.defineMacro("_GNU_SOURCE");
883
27
  }
clang::targets::FuchsiaTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
875
26
                    MacroBuilder &Builder) const override {
876
26
    Builder.defineMacro("__Fuchsia__");
877
26
    Builder.defineMacro("__ELF__");
878
26
    if (Opts.POSIXThreads)
879
0
      Builder.defineMacro("_REENTRANT");
880
    // Required by the libc++ locale support.
881
26
    if (Opts.CPlusPlus)
882
26
      Builder.defineMacro("_GNU_SOURCE");
883
26
  }
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::AArch64beTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::RISCV64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
clang::targets::FuchsiaTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
875
1
                    MacroBuilder &Builder) const override {
876
1
    Builder.defineMacro("__Fuchsia__");
877
1
    Builder.defineMacro("__ELF__");
878
1
    if (Opts.POSIXThreads)
879
0
      Builder.defineMacro("_REENTRANT");
880
    // Required by the libc++ locale support.
881
1
    if (Opts.CPlusPlus)
882
1
      Builder.defineMacro("_GNU_SOURCE");
883
1
  }
884
885
public:
886
  FuchsiaTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
887
27
      : OSTargetInfo<Target>(Triple, Opts) {
888
27
    this->MCountName = "__mcount";
889
27
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
890
27
  }
clang::targets::FuchsiaTargetInfo<clang::targets::AArch64leTargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
887
26
      : OSTargetInfo<Target>(Triple, Opts) {
888
26
    this->MCountName = "__mcount";
889
26
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
890
26
  }
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::AArch64beTargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::RISCV64TargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Unexecuted instantiation: clang::targets::FuchsiaTargetInfo<clang::targets::X86_32TargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::FuchsiaTargetInfo<clang::targets::X86_64TargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
887
1
      : OSTargetInfo<Target>(Triple, Opts) {
888
1
    this->MCountName = "__mcount";
889
1
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
890
1
  }
891
};
892
893
// WebAssembly target
894
template <typename Target>
895
class LLVM_LIBRARY_VISIBILITY WebAssemblyOSTargetInfo
896
    : public OSTargetInfo<Target> {
897
protected:
898
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
899
92
                    MacroBuilder &Builder) const override {
900
    // A common platform macro.
901
92
    if (Opts.POSIXThreads)
902
4
      Builder.defineMacro("_REENTRANT");
903
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
904
92
    if (Opts.CPlusPlus)
905
24
      Builder.defineMacro("_GNU_SOURCE");
906
    // Indicate that we have __float128.
907
92
    Builder.defineMacro("__FLOAT128__");
908
92
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
899
61
                    MacroBuilder &Builder) const override {
900
    // A common platform macro.
901
61
    if (Opts.POSIXThreads)
902
2
      Builder.defineMacro("_REENTRANT");
903
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
904
61
    if (Opts.CPlusPlus)
905
17
      Builder.defineMacro("_GNU_SOURCE");
906
    // Indicate that we have __float128.
907
61
    Builder.defineMacro("__FLOAT128__");
908
61
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
899
31
                    MacroBuilder &Builder) const override {
900
    // A common platform macro.
901
31
    if (Opts.POSIXThreads)
902
2
      Builder.defineMacro("_REENTRANT");
903
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
904
31
    if (Opts.CPlusPlus)
905
7
      Builder.defineMacro("_GNU_SOURCE");
906
    // Indicate that we have __float128.
907
31
    Builder.defineMacro("__FLOAT128__");
908
31
  }
909
910
public:
911
  explicit WebAssemblyOSTargetInfo(const llvm::Triple &Triple,
912
                                   const TargetOptions &Opts)
913
94
      : OSTargetInfo<Target>(Triple, Opts) {
914
94
    this->MCountName = "__mcount";
915
94
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
916
94
    this->HasFloat128 = true;
917
94
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
913
3
      : OSTargetInfo<Target>(Triple, Opts) {
914
3
    this->MCountName = "__mcount";
915
3
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
916
3
    this->HasFloat128 = true;
917
3
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
913
59
      : OSTargetInfo<Target>(Triple, Opts) {
914
59
    this->MCountName = "__mcount";
915
59
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
916
59
    this->HasFloat128 = true;
917
59
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
913
1
      : OSTargetInfo<Target>(Triple, Opts) {
914
1
    this->MCountName = "__mcount";
915
1
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
916
1
    this->HasFloat128 = true;
917
1
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
913
31
      : OSTargetInfo<Target>(Triple, Opts) {
914
31
    this->MCountName = "__mcount";
915
31
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
916
31
    this->HasFloat128 = true;
917
31
  }
918
};
919
920
// WASI target
921
template <typename Target>
922
class LLVM_LIBRARY_VISIBILITY WASITargetInfo
923
    : public WebAssemblyOSTargetInfo<Target> {
924
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
925
2
                    MacroBuilder &Builder) const final {
926
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
927
2
    Builder.defineMacro("__wasi__");
928
2
  }
clang::targets::WASITargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
925
1
                    MacroBuilder &Builder) const final {
926
1
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
927
1
    Builder.defineMacro("__wasi__");
928
1
  }
clang::targets::WASITargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
925
1
                    MacroBuilder &Builder) const final {
926
1
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
927
1
    Builder.defineMacro("__wasi__");
928
1
  }
929
930
public:
931
  explicit WASITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
932
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::WASITargetInfo<clang::targets::WebAssembly32TargetInfo>::WASITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
932
1
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::WASITargetInfo<clang::targets::WebAssembly64TargetInfo>::WASITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
932
1
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
933
};
934
935
// Emscripten target
936
template <typename Target>
937
class LLVM_LIBRARY_VISIBILITY EmscriptenTargetInfo
938
    : public WebAssemblyOSTargetInfo<Target> {
939
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
940
2
                    MacroBuilder &Builder) const final {
941
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
942
2
    Builder.defineMacro("__EMSCRIPTEN__");
943
2
  }
clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
940
2
                    MacroBuilder &Builder) const final {
941
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
942
2
    Builder.defineMacro("__EMSCRIPTEN__");
943
2
  }
Unexecuted instantiation: clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
944
945
public:
946
  explicit EmscriptenTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
947
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly32TargetInfo>::EmscriptenTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
947
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
Unexecuted instantiation: clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly64TargetInfo>::EmscriptenTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
948
};
949
950
} // namespace targets
951
} // namespace clang
952
#endif // LLVM_CLANG_LIB_BASIC_TARGETS_OSTARGETS_H