Coverage Report

Created: 2020-09-19 12:23

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