Coverage Report

Created: 2022-01-22 13:19

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