Coverage Report

Created: 2020-02-25 14:32

/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
56.7k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::PPC32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
60
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::PPC64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
231
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::X86_32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
1.39k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::X86_64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
53.6k
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::AArch64leTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
398
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::AArch64beTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
8
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::ARMleTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
580
      : 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
180
      : 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
14
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RISCV32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
18
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::RISCV64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
15
      : 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
18
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::SystemZTargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
84
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::WebAssembly32TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
41
      : TgtInfo(Triple, Opts) {}
clang::targets::OSTargetInfo<clang::targets::WebAssembly64TargetInfo>::OSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
29
31
      : 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) {}
30
31
  void getTargetDefines(const LangOptions &Opts,
32
49.6k
                        MacroBuilder &Builder) const override {
33
49.6k
    TgtInfo::getTargetDefines(Opts, Builder);
34
49.6k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
49.6k
  }
clang::targets::OSTargetInfo<clang::targets::PPC32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
60
                        MacroBuilder &Builder) const override {
33
60
    TgtInfo::getTargetDefines(Opts, Builder);
34
60
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
60
  }
clang::targets::OSTargetInfo<clang::targets::PPC64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
213
                        MacroBuilder &Builder) const override {
33
213
    TgtInfo::getTargetDefines(Opts, Builder);
34
213
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
213
  }
clang::targets::OSTargetInfo<clang::targets::X86_32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
1.37k
                        MacroBuilder &Builder) const override {
33
1.37k
    TgtInfo::getTargetDefines(Opts, Builder);
34
1.37k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
1.37k
  }
clang::targets::OSTargetInfo<clang::targets::X86_64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
46.6k
                        MacroBuilder &Builder) const override {
33
46.6k
    TgtInfo::getTargetDefines(Opts, Builder);
34
46.6k
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
46.6k
  }
clang::targets::OSTargetInfo<clang::targets::AArch64leTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
394
                        MacroBuilder &Builder) const override {
33
394
    TgtInfo::getTargetDefines(Opts, Builder);
34
394
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
394
  }
clang::targets::OSTargetInfo<clang::targets::AArch64beTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
8
                        MacroBuilder &Builder) const override {
33
8
    TgtInfo::getTargetDefines(Opts, Builder);
34
8
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
8
  }
clang::targets::OSTargetInfo<clang::targets::ARMleTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
570
                        MacroBuilder &Builder) const override {
33
570
    TgtInfo::getTargetDefines(Opts, Builder);
34
570
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
570
  }
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
170
                        MacroBuilder &Builder) const override {
33
170
    TgtInfo::getTargetDefines(Opts, Builder);
34
170
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
170
  }
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
14
                        MacroBuilder &Builder) const override {
33
14
    TgtInfo::getTargetDefines(Opts, Builder);
34
14
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
14
  }
clang::targets::OSTargetInfo<clang::targets::RISCV32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
18
                        MacroBuilder &Builder) const override {
33
18
    TgtInfo::getTargetDefines(Opts, Builder);
34
18
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
18
  }
clang::targets::OSTargetInfo<clang::targets::RISCV64TargetInfo>::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::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
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::SystemZTargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
84
                        MacroBuilder &Builder) const override {
33
84
    TgtInfo::getTargetDefines(Opts, Builder);
34
84
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
84
  }
clang::targets::OSTargetInfo<clang::targets::WebAssembly32TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
41
                        MacroBuilder &Builder) const override {
33
41
    TgtInfo::getTargetDefines(Opts, Builder);
34
41
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
41
  }
clang::targets::OSTargetInfo<clang::targets::WebAssembly64TargetInfo>::getTargetDefines(clang::LangOptions const&, clang::MacroBuilder&) const
Line
Count
Source
32
30
                        MacroBuilder &Builder) const override {
33
30
    TgtInfo::getTargetDefines(Opts, Builder);
34
30
    getOSDefines(Opts, TgtInfo::getTriple(), Builder);
35
30
  }
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
  }
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
10
    // 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
2
    // 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
3
    // 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
5
    // 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
0
    // 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
45.0k
                    MacroBuilder &Builder) const override {
83
45.0k
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
45.0k
                     this->PlatformMinVersion);
85
45.0k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
7
                    MacroBuilder &Builder) const override {
83
7
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
7
                     this->PlatformMinVersion);
85
7
  }
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
369
                    MacroBuilder &Builder) const override {
83
369
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
369
                     this->PlatformMinVersion);
85
369
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
82
44.6k
                    MacroBuilder &Builder) const override {
83
44.6k
    getDarwinDefines(Builder, Opts, Triple, this->PlatformName,
84
44.6k
                     this->PlatformMinVersion);
85
44.6k
  }
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
52.2k
      : OSTargetInfo<Target>(Triple, Opts) {
90
52.2k
    // By default, no TLS, and we whitelist permitted architecture/OS
91
52.2k
    // combinations.
92
52.2k
    this->TLSSupported = false;
93
52.2k
94
52.2k
    if (Triple.isMacOSX())
95
51.9k
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
339
    else if (Triple.isiOS()) {
97
261
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
261
      // 32-bit simulator from 10 onwards.
99
261
      if (Triple.isArch64Bit())
100
154
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
107
      else if (Triple.isArch32Bit()) {
102
107
        if (!Triple.isSimulatorEnvironment())
103
102
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
5
        else
105
5
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
107
      }
107
261
    } else 
if (78
Triple.isWatchOS()78
) {
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
52.2k
114
52.2k
    this->MCountName = "\01mcount";
115
52.2k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
7
      : OSTargetInfo<Target>(Triple, Opts) {
90
7
    // By default, no TLS, and we whitelist permitted architecture/OS
91
7
    // combinations.
92
7
    this->TLSSupported = false;
93
7
94
7
    if (Triple.isMacOSX())
95
7
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
0
    else if (Triple.isiOS()) {
97
0
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
0
      // 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
7
114
7
    this->MCountName = "\01mcount";
115
7
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
1
      : OSTargetInfo<Target>(Triple, Opts) {
90
1
    // By default, no TLS, and we whitelist permitted architecture/OS
91
1
    // 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
0
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
0
      // 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
375
      : OSTargetInfo<Target>(Triple, Opts) {
90
375
    // By default, no TLS, and we whitelist permitted architecture/OS
91
375
    // combinations.
92
375
    this->TLSSupported = false;
93
375
94
375
    if (Triple.isMacOSX())
95
346
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
29
    else if (Triple.isiOS()) {
97
14
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
14
      // 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
375
114
375
    this->MCountName = "\01mcount";
115
375
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
51.5k
      : OSTargetInfo<Target>(Triple, Opts) {
90
51.5k
    // By default, no TLS, and we whitelist permitted architecture/OS
91
51.5k
    // combinations.
92
51.5k
    this->TLSSupported = false;
93
51.5k
94
51.5k
    if (Triple.isMacOSX())
95
51.4k
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
63
    else if (Triple.isiOS()) {
97
47
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
47
      // 32-bit simulator from 10 onwards.
99
47
      if (Triple.isArch64Bit())
100
47
        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
47
    } else 
if (16
Triple.isWatchOS()16
) {
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
51.5k
114
51.5k
    this->MCountName = "\01mcount";
115
51.5k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
142
      : OSTargetInfo<Target>(Triple, Opts) {
90
142
    // By default, no TLS, and we whitelist permitted architecture/OS
91
142
    // combinations.
92
142
    this->TLSSupported = false;
93
142
94
142
    if (Triple.isMacOSX())
95
18
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
124
    else if (Triple.isiOS()) {
97
118
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
118
      // 32-bit simulator from 10 onwards.
99
118
      if (Triple.isArch64Bit())
100
107
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
11
      else if (Triple.isArch32Bit()) {
102
11
        if (!Triple.isSimulatorEnvironment())
103
11
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
11
      }
107
118
    } else 
if (6
Triple.isWatchOS()6
) {
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
142
114
142
    this->MCountName = "\01mcount";
115
142
  }
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::DarwinTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
89
200
      : OSTargetInfo<Target>(Triple, Opts) {
90
200
    // By default, no TLS, and we whitelist permitted architecture/OS
91
200
    // combinations.
92
200
    this->TLSSupported = false;
93
200
94
200
    if (Triple.isMacOSX())
95
77
      this->TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
96
123
    else if (Triple.isiOS()) {
97
82
      // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
98
82
      // 32-bit simulator from 10 onwards.
99
82
      if (Triple.isArch64Bit())
100
0
        this->TLSSupported = !Triple.isOSVersionLT(8);
101
82
      else if (Triple.isArch32Bit()) {
102
82
        if (!Triple.isSimulatorEnvironment())
103
82
          this->TLSSupported = !Triple.isOSVersionLT(9);
104
0
        else
105
0
          this->TLSSupported = !Triple.isOSVersionLT(10);
106
82
      }
107
82
    } else 
if (41
Triple.isWatchOS()41
) {
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
200
114
200
    this->MCountName = "\01mcount";
115
200
  }
116
117
2.30k
  std::string isValidSectionSpecifier(StringRef SR) const override {
118
2.30k
    // Let MCSectionMachO validate this.
119
2.30k
    StringRef Segment, Section;
120
2.30k
    unsigned TAA, StubSize;
121
2.30k
    bool HasTAA;
122
2.30k
    return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
123
2.30k
                                                       TAA, HasTAA, StubSize);
124
2.30k
  }
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
4
    // 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.30k
  std::string isValidSectionSpecifier(StringRef SR) const override {
118
2.30k
    // Let MCSectionMachO validate this.
119
2.30k
    StringRef Segment, Section;
120
2.30k
    unsigned TAA, StubSize;
121
2.30k
    bool HasTAA;
122
2.30k
    return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
123
2.30k
                                                       TAA, HasTAA, StubSize);
124
2.30k
  }
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.53k
  const char *getStaticInitSectionSpecifier() const override {
127
1.53k
    // FIXME: We should return 0 when building kexts.
128
1.53k
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
1.53k
  }
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
23
    // 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.49k
  const char *getStaticInitSectionSpecifier() const override {
127
1.49k
    // FIXME: We should return 0 when building kexts.
128
1.49k
    return "__TEXT,__StaticInit,regular,pure_instructions";
129
1.49k
  }
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
18
    // 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.72k
  unsigned getExnObjectAlignment() const override {
137
4.72k
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
4.72k
    // exception objects because of a bug in __cxa_exception that was
139
4.72k
    // eventually fixed in r319123.
140
4.72k
    llvm::VersionTuple MinVersion;
141
4.72k
    const llvm::Triple &T = this->getTriple();
142
4.72k
143
4.72k
    // Compute the earliest OS versions that have the fix to libc++abi.
144
4.72k
    switch (T.getOS()) {
145
4.66k
    case llvm::Triple::Darwin:
146
4.66k
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
4.66k
      MinVersion = llvm::VersionTuple(10U, 14U);
148
4.66k
      break;
149
4.66k
    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
40
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
20
      MinVersion = llvm::VersionTuple(5U);
155
20
      break;
156
40
    default:
157
0
      llvm_unreachable("Unexpected OS");
158
4.72k
    }
159
4.72k
160
4.72k
    unsigned Major, Minor, Micro;
161
4.72k
    T.getOSVersion(Major, Minor, Micro);
162
4.72k
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
163
46
      return 64;
164
4.67k
    return OSTargetInfo<Target>::getExnObjectAlignment();
165
4.67k
  }
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
12
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
12
    // exception objects because of a bug in __cxa_exception that was
139
12
    // eventually fixed in r319123.
140
12
    llvm::VersionTuple MinVersion;
141
12
    const llvm::Triple &T = this->getTriple();
142
12
143
12
    // 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.68k
  unsigned getExnObjectAlignment() const override {
137
4.68k
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
4.68k
    // exception objects because of a bug in __cxa_exception that was
139
4.68k
    // eventually fixed in r319123.
140
4.68k
    llvm::VersionTuple MinVersion;
141
4.68k
    const llvm::Triple &T = this->getTriple();
142
4.68k
143
4.68k
    // Compute the earliest OS versions that have the fix to libc++abi.
144
4.68k
    switch (T.getOS()) {
145
4.66k
    case llvm::Triple::Darwin:
146
4.66k
    case llvm::Triple::MacOSX: // Earliest supporting version is 10.14.
147
4.66k
      MinVersion = llvm::VersionTuple(10U, 14U);
148
4.66k
      break;
149
4.66k
    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
24
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
0
      MinVersion = llvm::VersionTuple(5U);
155
0
      break;
156
24
    default:
157
0
      llvm_unreachable("Unexpected OS");
158
4.68k
    }
159
4.68k
160
4.68k
    unsigned Major, Minor, Micro;
161
4.68k
    T.getOSVersion(Major, Minor, Micro);
162
4.68k
    if (llvm::VersionTuple(Major, Minor, Micro) < MinVersion)
163
33
      return 64;
164
4.65k
    return OSTargetInfo<Target>::getExnObjectAlignment();
165
4.65k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getExnObjectAlignment() const
Line
Count
Source
136
24
  unsigned getExnObjectAlignment() const override {
137
24
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
24
    // exception objects because of a bug in __cxa_exception that was
139
24
    // eventually fixed in r319123.
140
24
    llvm::VersionTuple MinVersion;
141
24
    const llvm::Triple &T = this->getTriple();
142
24
143
24
    // 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
16
    case llvm::Triple::WatchOS: // Earliest supporting version is 5.0.0.
154
8
      MinVersion = llvm::VersionTuple(5U);
155
8
      break;
156
16
    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
1
    // Older versions of libc++abi guarantee an alignment of only 8-bytes for
138
1
    // exception objects because of a bug in __cxa_exception that was
139
1
    // eventually fixed in r319123.
140
1
    llvm::VersionTuple MinVersion;
141
1
    const llvm::Triple &T = this->getTriple();
142
1
143
1
    // 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
1
    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
725k
                                             bool IsSigned) const final {
169
725k
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
725k
    return BitWidth == 64
171
725k
               ? 
(IsSigned 181k
?
TargetInfo::SignedLongLong90.6k
172
181k
                           : 
TargetInfo::UnsignedLongLong90.6k
)
173
725k
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)544k
;
174
725k
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC32TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
112
                                             bool IsSigned) const final {
169
112
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
112
    return BitWidth == 64
171
112
               ? 
(IsSigned 28
?
TargetInfo::SignedLongLong14
172
28
                           : 
TargetInfo::UnsignedLongLong14
)
173
112
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)84
;
174
112
  }
clang::targets::DarwinTargetInfo<clang::targets::PPC64TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
16
                                             bool IsSigned) const final {
169
16
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
16
    return BitWidth == 64
171
16
               ? 
(IsSigned 4
?
TargetInfo::SignedLongLong2
172
4
                           : 
TargetInfo::UnsignedLongLong2
)
173
16
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)12
;
174
16
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_32TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
5.90k
                                             bool IsSigned) const final {
169
5.90k
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
5.90k
    return BitWidth == 64
171
5.90k
               ? 
(IsSigned 1.47k
?
TargetInfo::SignedLongLong738
172
1.47k
                           : 
TargetInfo::UnsignedLongLong738
)
173
5.90k
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)4.42k
;
174
5.90k
  }
clang::targets::DarwinTargetInfo<clang::targets::X86_64TargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
714k
                                             bool IsSigned) const final {
169
714k
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
714k
    return BitWidth == 64
171
714k
               ? 
(IsSigned 178k
?
TargetInfo::SignedLongLong89.2k
172
178k
                           : 
TargetInfo::UnsignedLongLong89.2k
)
173
714k
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)535k
;
174
714k
  }
clang::targets::DarwinTargetInfo<clang::targets::AArch64leTargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
2.27k
                                             bool IsSigned) const final {
169
2.27k
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
2.27k
    return BitWidth == 64
171
2.27k
               ? 
(IsSigned 568
?
TargetInfo::SignedLongLong284
172
568
                           : 
TargetInfo::UnsignedLongLong284
)
173
2.27k
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)1.70k
;
174
2.27k
  }
clang::targets::DarwinTargetInfo<clang::targets::ARMleTargetInfo>::getLeastIntTypeByWidth(unsigned int, bool) const
Line
Count
Source
168
3.04k
                                             bool IsSigned) const final {
169
3.04k
    // Darwin uses `long long` for `int_least64_t` and `int_fast64_t`.
170
3.04k
    return BitWidth == 64
171
3.04k
               ? 
(IsSigned 760
?
TargetInfo::SignedLongLong380
172
760
                           : 
TargetInfo::UnsignedLongLong380
)
173
3.04k
               : 
TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned)2.28k
;
174
3.04k
  }
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
1
    // 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
1
    // 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
58
#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
58
                    MacroBuilder &Builder) const override {
216
58
    // FreeBSD defines; list based off of gcc output
217
58
218
58
    unsigned Release = Triple.getOSMajorVersion();
219
58
    if (Release == 0U)
220
38
      Release = 8U;
221
58
    unsigned CCVersion = FREEBSD_CC_VERSION;
222
58
    if (CCVersion == 0U)
223
58
      CCVersion = Release * 100000U + 1U;
224
58
225
58
    Builder.defineMacro("__FreeBSD__", Twine(Release));
226
58
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
227
58
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
228
58
    DefineStd(Builder, "unix", Opts);
229
58
    Builder.defineMacro("__ELF__");
230
58
231
58
    // On FreeBSD, wchar_t contains the number of the code point as
232
58
    // used by the character set of the locale. These character sets are
233
58
    // not necessarily a superset of ASCII.
234
58
    //
235
58
    // FIXME: This is wrong; the macro refers to the numerical values
236
58
    // of wchar_t *literals*, which are not locale-dependent. However,
237
58
    // FreeBSD systems apparently depend on us getting this wrong, and
238
58
    // setting this to 1 is conforming even if all the basic source
239
58
    // character literals have the same encoding as char and wchar_t.
240
58
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
241
58
  }
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
2
    // 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
2
    // On FreeBSD, wchar_t contains the number of the code point as
232
2
    // used by the character set of the locale. These character sets are
233
2
    // not necessarily a superset of ASCII.
234
2
    //
235
2
    // FIXME: This is wrong; the macro refers to the numerical values
236
2
    // of wchar_t *literals*, which are not locale-dependent. However,
237
2
    // FreeBSD systems apparently depend on us getting this wrong, and
238
2
    // setting this to 1 is conforming even if all the basic source
239
2
    // 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
6
    // 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
6
    // On FreeBSD, wchar_t contains the number of the code point as
232
6
    // used by the character set of the locale. These character sets are
233
6
    // not necessarily a superset of ASCII.
234
6
    //
235
6
    // FIXME: This is wrong; the macro refers to the numerical values
236
6
    // of wchar_t *literals*, which are not locale-dependent. However,
237
6
    // FreeBSD systems apparently depend on us getting this wrong, and
238
6
    // setting this to 1 is conforming even if all the basic source
239
6
    // 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
4
    // 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
4
    // On FreeBSD, wchar_t contains the number of the code point as
232
4
    // used by the character set of the locale. These character sets are
233
4
    // not necessarily a superset of ASCII.
234
4
    //
235
4
    // FIXME: This is wrong; the macro refers to the numerical values
236
4
    // of wchar_t *literals*, which are not locale-dependent. However,
237
4
    // FreeBSD systems apparently depend on us getting this wrong, and
238
4
    // setting this to 1 is conforming even if all the basic source
239
4
    // 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
2
                    MacroBuilder &Builder) const override {
216
2
    // 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
2
    // On FreeBSD, wchar_t contains the number of the code point as
232
2
    // used by the character set of the locale. These character sets are
233
2
    // not necessarily a superset of ASCII.
234
2
    //
235
2
    // FIXME: This is wrong; the macro refers to the numerical values
236
2
    // of wchar_t *literals*, which are not locale-dependent. However,
237
2
    // FreeBSD systems apparently depend on us getting this wrong, and
238
2
    // setting this to 1 is conforming even if all the basic source
239
2
    // character literals have the same encoding as char and wchar_t.
240
2
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
241
2
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
215
5
                    MacroBuilder &Builder) const override {
216
5
    // FreeBSD defines; list based off of gcc output
217
5
218
5
    unsigned Release = Triple.getOSMajorVersion();
219
5
    if (Release == 0U)
220
2
      Release = 8U;
221
5
    unsigned CCVersion = FREEBSD_CC_VERSION;
222
5
    if (CCVersion == 0U)
223
5
      CCVersion = Release * 100000U + 1U;
224
5
225
5
    Builder.defineMacro("__FreeBSD__", Twine(Release));
226
5
    Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
227
5
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
228
5
    DefineStd(Builder, "unix", Opts);
229
5
    Builder.defineMacro("__ELF__");
230
5
231
5
    // On FreeBSD, wchar_t contains the number of the code point as
232
5
    // used by the character set of the locale. These character sets are
233
5
    // not necessarily a superset of ASCII.
234
5
    //
235
5
    // FIXME: This is wrong; the macro refers to the numerical values
236
5
    // of wchar_t *literals*, which are not locale-dependent. However,
237
5
    // FreeBSD systems apparently depend on us getting this wrong, and
238
5
    // setting this to 1 is conforming even if all the basic source
239
5
    // character literals have the same encoding as char and wchar_t.
240
5
    Builder.defineMacro("__STDC_MB_MIGHT_NEQ_WC__", "1");
241
5
  }
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
3
    // 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
3
    // On FreeBSD, wchar_t contains the number of the code point as
232
3
    // used by the character set of the locale. These character sets are
233
3
    // not necessarily a superset of ASCII.
234
3
    //
235
3
    // FIXME: This is wrong; the macro refers to the numerical values
236
3
    // of wchar_t *literals*, which are not locale-dependent. However,
237
3
    // FreeBSD systems apparently depend on us getting this wrong, and
238
3
    // setting this to 1 is conforming even if all the basic source
239
3
    // 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
36
    // 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
36
    // On FreeBSD, wchar_t contains the number of the code point as
232
36
    // used by the character set of the locale. These character sets are
233
36
    // not necessarily a superset of ASCII.
234
36
    //
235
36
    // FIXME: This is wrong; the macro refers to the numerical values
236
36
    // of wchar_t *literals*, which are not locale-dependent. However,
237
36
    // FreeBSD systems apparently depend on us getting this wrong, and
238
36
    // setting this to 1 is conforming even if all the basic source
239
36
    // 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
58
      : OSTargetInfo<Target>(Triple, Opts) {
246
58
    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
43
    case llvm::Triple::mips:
253
9
    case llvm::Triple::mipsel:
254
9
    case llvm::Triple::ppc:
255
9
    case llvm::Triple::ppc64:
256
9
    case llvm::Triple::ppc64le:
257
9
      this->MCountName = "_mcount";
258
9
      break;
259
9
    case llvm::Triple::arm:
260
6
      this->MCountName = "__mcount";
261
6
      break;
262
58
    }
263
58
  }
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
2
    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
2
    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
2
      : OSTargetInfo<Target>(Triple, Opts) {
246
2
    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
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
2
    case llvm::Triple::arm:
260
0
      this->MCountName = "__mcount";
261
0
      break;
262
2
    }
263
2
  }
clang::targets::FreeBSDTargetInfo<clang::targets::PPC64TargetInfo>::FreeBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
245
5
      : OSTargetInfo<Target>(Triple, Opts) {
246
5
    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
5
    case llvm::Triple::mips:
253
5
    case llvm::Triple::mipsel:
254
5
    case llvm::Triple::ppc:
255
5
    case llvm::Triple::ppc64:
256
5
    case llvm::Triple::ppc64le:
257
5
      this->MCountName = "_mcount";
258
5
      break;
259
5
    case llvm::Triple::arm:
260
0
      this->MCountName = "__mcount";
261
0
      break;
262
5
    }
263
5
  }
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
3
    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
36
    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
2
    // 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
1
    // 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
1
    // 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
4
    // 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
3
    // 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
1
    // 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
0
    // 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
0
    // 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
2.77k
                    MacroBuilder &Builder) const override {
375
2.77k
    // Linux defines; list based off of gcc output
376
2.77k
    DefineStd(Builder, "unix", Opts);
377
2.77k
    DefineStd(Builder, "linux", Opts);
378
2.77k
    Builder.defineMacro("__ELF__");
379
2.77k
    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
2.75k
    } else {
388
2.75k
        Builder.defineMacro("__gnu_linux__");
389
2.75k
    }
390
2.77k
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
2.77k
    if (Opts.CPlusPlus)
393
1.18k
      Builder.defineMacro("_GNU_SOURCE");
394
2.77k
    if (this->HasFloat128)
395
1.79k
      Builder.defineMacro("__FLOAT128__");
396
2.77k
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
377
                    MacroBuilder &Builder) const override {
375
377
    // Linux defines; list based off of gcc output
376
377
    DefineStd(Builder, "unix", Opts);
377
377
    DefineStd(Builder, "linux", Opts);
378
377
    Builder.defineMacro("__ELF__");
379
377
    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
374
    } else {
388
374
        Builder.defineMacro("__gnu_linux__");
389
374
    }
390
377
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
377
    if (Opts.CPlusPlus)
393
141
      Builder.defineMacro("_GNU_SOURCE");
394
377
    if (this->HasFloat128)
395
377
      Builder.defineMacro("__FLOAT128__");
396
377
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
1.41k
                    MacroBuilder &Builder) const override {
375
1.41k
    // Linux defines; list based off of gcc output
376
1.41k
    DefineStd(Builder, "unix", Opts);
377
1.41k
    DefineStd(Builder, "linux", Opts);
378
1.41k
    Builder.defineMacro("__ELF__");
379
1.41k
    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
1.41k
    } else {
388
1.41k
        Builder.defineMacro("__gnu_linux__");
389
1.41k
    }
390
1.41k
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
1.41k
    if (Opts.CPlusPlus)
393
823
      Builder.defineMacro("_GNU_SOURCE");
394
1.41k
    if (this->HasFloat128)
395
1.41k
      Builder.defineMacro("__FLOAT128__");
396
1.41k
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
195
                    MacroBuilder &Builder) const override {
375
195
    // Linux defines; list based off of gcc output
376
195
    DefineStd(Builder, "unix", Opts);
377
195
    DefineStd(Builder, "linux", Opts);
378
195
    Builder.defineMacro("__ELF__");
379
195
    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
194
    } else {
388
194
        Builder.defineMacro("__gnu_linux__");
389
194
    }
390
195
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
195
    if (Opts.CPlusPlus)
393
38
      Builder.defineMacro("_GNU_SOURCE");
394
195
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
195
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64beTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
8
                    MacroBuilder &Builder) const override {
375
8
    // Linux defines; list based off of gcc output
376
8
    DefineStd(Builder, "unix", Opts);
377
8
    DefineStd(Builder, "linux", Opts);
378
8
    Builder.defineMacro("__ELF__");
379
8
    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
8
    } else {
388
8
        Builder.defineMacro("__gnu_linux__");
389
8
    }
390
8
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
8
    if (Opts.CPlusPlus)
393
1
      Builder.defineMacro("_GNU_SOURCE");
394
8
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
8
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
261
                    MacroBuilder &Builder) const override {
375
261
    // Linux defines; list based off of gcc output
376
261
    DefineStd(Builder, "unix", Opts);
377
261
    DefineStd(Builder, "linux", Opts);
378
261
    Builder.defineMacro("__ELF__");
379
261
    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
250
    } else {
388
250
        Builder.defineMacro("__gnu_linux__");
389
250
    }
390
261
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
261
    if (Opts.CPlusPlus)
393
30
      Builder.defineMacro("_GNU_SOURCE");
394
261
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
261
  }
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
9
    // 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
160
                    MacroBuilder &Builder) const override {
375
160
    // Linux defines; list based off of gcc output
376
160
    DefineStd(Builder, "unix", Opts);
377
160
    DefineStd(Builder, "linux", Opts);
378
160
    Builder.defineMacro("__ELF__");
379
160
    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
160
    } else {
388
160
        Builder.defineMacro("__gnu_linux__");
389
160
    }
390
160
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
160
    if (Opts.CPlusPlus)
393
33
      Builder.defineMacro("_GNU_SOURCE");
394
160
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
160
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
26
                    MacroBuilder &Builder) const override {
375
26
    // Linux defines; list based off of gcc output
376
26
    DefineStd(Builder, "unix", Opts);
377
26
    DefineStd(Builder, "linux", Opts);
378
26
    Builder.defineMacro("__ELF__");
379
26
    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
26
    } else {
388
26
        Builder.defineMacro("__gnu_linux__");
389
26
    }
390
26
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
26
    if (Opts.CPlusPlus)
393
8
      Builder.defineMacro("_GNU_SOURCE");
394
26
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
26
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
197
                    MacroBuilder &Builder) const override {
375
197
    // Linux defines; list based off of gcc output
376
197
    DefineStd(Builder, "unix", Opts);
377
197
    DefineStd(Builder, "linux", Opts);
378
197
    Builder.defineMacro("__ELF__");
379
197
    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
197
    } else {
388
197
        Builder.defineMacro("__gnu_linux__");
389
197
    }
390
197
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
197
    if (Opts.CPlusPlus)
393
91
      Builder.defineMacro("_GNU_SOURCE");
394
197
    if (this->HasFloat128)
395
5
      Builder.defineMacro("__FLOAT128__");
396
197
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
18
                    MacroBuilder &Builder) const override {
375
18
    // Linux defines; list based off of gcc output
376
18
    DefineStd(Builder, "unix", Opts);
377
18
    DefineStd(Builder, "linux", Opts);
378
18
    Builder.defineMacro("__ELF__");
379
18
    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
18
    } else {
388
18
        Builder.defineMacro("__gnu_linux__");
389
18
    }
390
18
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
18
    if (Opts.CPlusPlus)
393
0
      Builder.defineMacro("_GNU_SOURCE");
394
18
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
18
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
15
                    MacroBuilder &Builder) const override {
375
15
    // Linux defines; list based off of gcc output
376
15
    DefineStd(Builder, "unix", Opts);
377
15
    DefineStd(Builder, "linux", Opts);
378
15
    Builder.defineMacro("__ELF__");
379
15
    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
15
    } else {
388
15
        Builder.defineMacro("__gnu_linux__");
389
15
    }
390
15
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
15
    if (Opts.CPlusPlus)
393
0
      Builder.defineMacro("_GNU_SOURCE");
394
15
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
15
  }
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
2
    // 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
1
    // 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
6
                    MacroBuilder &Builder) const override {
375
6
    // Linux defines; list based off of gcc output
376
6
    DefineStd(Builder, "unix", Opts);
377
6
    DefineStd(Builder, "linux", Opts);
378
6
    Builder.defineMacro("__ELF__");
379
6
    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
6
    } else {
388
6
        Builder.defineMacro("__gnu_linux__");
389
6
    }
390
6
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
6
    if (Opts.CPlusPlus)
393
5
      Builder.defineMacro("_GNU_SOURCE");
394
6
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
6
  }
clang::targets::LinuxTargetInfo<clang::targets::SystemZTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
374
84
                    MacroBuilder &Builder) const override {
375
84
    // Linux defines; list based off of gcc output
376
84
    DefineStd(Builder, "unix", Opts);
377
84
    DefineStd(Builder, "linux", Opts);
378
84
    Builder.defineMacro("__ELF__");
379
84
    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
84
    } else {
388
84
        Builder.defineMacro("__gnu_linux__");
389
84
    }
390
84
    if (Opts.POSIXThreads)
391
0
      Builder.defineMacro("_REENTRANT");
392
84
    if (Opts.CPlusPlus)
393
6
      Builder.defineMacro("_GNU_SOURCE");
394
84
    if (this->HasFloat128)
395
0
      Builder.defineMacro("__FLOAT128__");
396
84
  }
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
1
    // 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
1
    // 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
1
    } 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
  }
397
398
public:
399
  LinuxTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
400
2.92k
      : OSTargetInfo<Target>(Triple, Opts) {
401
2.92k
    this->WIntType = TargetInfo::UnsignedInt;
402
2.92k
403
2.92k
    switch (Triple.getArch()) {
404
602
    default:
405
602
      break;
406
411
    case llvm::Triple::mips:
407
411
    case llvm::Triple::mipsel:
408
411
    case llvm::Triple::mips64:
409
411
    case llvm::Triple::mips64el:
410
411
    case llvm::Triple::ppc:
411
411
    case llvm::Triple::ppc64:
412
411
    case llvm::Triple::ppc64le:
413
411
      this->MCountName = "_mcount";
414
411
      break;
415
1.91k
    case llvm::Triple::x86:
416
1.91k
    case llvm::Triple::x86_64:
417
1.91k
      this->HasFloat128 = true;
418
1.91k
      break;
419
2.92k
    }
420
2.92k
  }
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
386
      : OSTargetInfo<Target>(Triple, Opts) {
401
386
    this->WIntType = TargetInfo::UnsignedInt;
402
386
403
386
    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
386
    case llvm::Triple::x86:
416
386
    case llvm::Triple::x86_64:
417
386
      this->HasFloat128 = true;
418
386
      break;
419
386
    }
420
386
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
1.52k
      : OSTargetInfo<Target>(Triple, Opts) {
401
1.52k
    this->WIntType = TargetInfo::UnsignedInt;
402
1.52k
403
1.52k
    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
1.52k
    case llvm::Triple::x86:
416
1.52k
    case llvm::Triple::x86_64:
417
1.52k
      this->HasFloat128 = true;
418
1.52k
      break;
419
1.52k
    }
420
1.52k
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
196
      : OSTargetInfo<Target>(Triple, Opts) {
401
196
    this->WIntType = TargetInfo::UnsignedInt;
402
196
403
196
    switch (Triple.getArch()) {
404
196
    default:
405
196
      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
196
    }
420
196
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64beTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
8
      : OSTargetInfo<Target>(Triple, Opts) {
401
8
    this->WIntType = TargetInfo::UnsignedInt;
402
8
403
8
    switch (Triple.getArch()) {
404
8
    default:
405
8
      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
8
    }
420
8
  }
clang::targets::LinuxTargetInfo<clang::targets::ARMleTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
261
      : OSTargetInfo<Target>(Triple, Opts) {
401
261
    this->WIntType = TargetInfo::UnsignedInt;
402
261
403
261
    switch (Triple.getArch()) {
404
261
    default:
405
261
      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
261
    }
420
261
  }
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
170
      : OSTargetInfo<Target>(Triple, Opts) {
401
170
    this->WIntType = TargetInfo::UnsignedInt;
402
170
403
170
    switch (Triple.getArch()) {
404
0
    default:
405
0
      break;
406
170
    case llvm::Triple::mips:
407
170
    case llvm::Triple::mipsel:
408
170
    case llvm::Triple::mips64:
409
170
    case llvm::Triple::mips64el:
410
170
    case llvm::Triple::ppc:
411
170
    case llvm::Triple::ppc64:
412
170
    case llvm::Triple::ppc64le:
413
170
      this->MCountName = "_mcount";
414
170
      break;
415
170
    case llvm::Triple::x86:
416
0
    case llvm::Triple::x86_64:
417
0
      this->HasFloat128 = true;
418
0
      break;
419
170
    }
420
170
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
26
      : OSTargetInfo<Target>(Triple, Opts) {
401
26
    this->WIntType = TargetInfo::UnsignedInt;
402
26
403
26
    switch (Triple.getArch()) {
404
0
    default:
405
0
      break;
406
26
    case llvm::Triple::mips:
407
26
    case llvm::Triple::mipsel:
408
26
    case llvm::Triple::mips64:
409
26
    case llvm::Triple::mips64el:
410
26
    case llvm::Triple::ppc:
411
26
    case llvm::Triple::ppc64:
412
26
    case llvm::Triple::ppc64le:
413
26
      this->MCountName = "_mcount";
414
26
      break;
415
26
    case llvm::Triple::x86:
416
0
    case llvm::Triple::x86_64:
417
0
      this->HasFloat128 = true;
418
0
      break;
419
26
    }
420
26
  }
clang::targets::LinuxTargetInfo<clang::targets::PPC64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
215
      : OSTargetInfo<Target>(Triple, Opts) {
401
215
    this->WIntType = TargetInfo::UnsignedInt;
402
215
403
215
    switch (Triple.getArch()) {
404
0
    default:
405
0
      break;
406
215
    case llvm::Triple::mips:
407
215
    case llvm::Triple::mipsel:
408
215
    case llvm::Triple::mips64:
409
215
    case llvm::Triple::mips64el:
410
215
    case llvm::Triple::ppc:
411
215
    case llvm::Triple::ppc64:
412
215
    case llvm::Triple::ppc64le:
413
215
      this->MCountName = "_mcount";
414
215
      break;
415
215
    case llvm::Triple::x86:
416
0
    case llvm::Triple::x86_64:
417
0
      this->HasFloat128 = true;
418
0
      break;
419
215
    }
420
215
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV32TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
18
      : OSTargetInfo<Target>(Triple, Opts) {
401
18
    this->WIntType = TargetInfo::UnsignedInt;
402
18
403
18
    switch (Triple.getArch()) {
404
18
    default:
405
18
      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
18
    }
420
18
  }
clang::targets::LinuxTargetInfo<clang::targets::RISCV64TargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
15
      : OSTargetInfo<Target>(Triple, Opts) {
401
15
    this->WIntType = TargetInfo::UnsignedInt;
402
15
403
15
    switch (Triple.getArch()) {
404
15
    default:
405
15
      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
15
    }
420
15
  }
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
6
      : OSTargetInfo<Target>(Triple, Opts) {
401
6
    this->WIntType = TargetInfo::UnsignedInt;
402
6
403
6
    switch (Triple.getArch()) {
404
6
    default:
405
6
      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
6
    }
420
6
  }
clang::targets::LinuxTargetInfo<clang::targets::SystemZTargetInfo>::LinuxTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
400
84
      : OSTargetInfo<Target>(Triple, Opts) {
401
84
    this->WIntType = TargetInfo::UnsignedInt;
402
84
403
84
    switch (Triple.getArch()) {
404
84
    default:
405
84
      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
84
    }
420
84
  }
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
  }
421
422
647
  const char *getStaticInitSectionSpecifier() const override {
423
647
    return ".text.startup";
424
647
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_32TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
422
75
  const char *getStaticInitSectionSpecifier() const override {
423
75
    return ".text.startup";
424
75
  }
clang::targets::LinuxTargetInfo<clang::targets::X86_64TargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
422
496
  const char *getStaticInitSectionSpecifier() const override {
423
496
    return ".text.startup";
424
496
  }
clang::targets::LinuxTargetInfo<clang::targets::AArch64leTargetInfo>::getStaticInitSectionSpecifier() const
Line
Count
Source
422
14
  const char *getStaticInitSectionSpecifier() const override {
423
14
    return ".text.startup";
424
14
  }
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
58
  const char *getStaticInitSectionSpecifier() const override {
423
58
    return ".text.startup";
424
58
  }
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
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
37
                    MacroBuilder &Builder) const override {
433
37
    // NetBSD defines; list based off of gcc output
434
37
    Builder.defineMacro("__NetBSD__");
435
37
    Builder.defineMacro("__unix__");
436
37
    Builder.defineMacro("__ELF__");
437
37
    if (Opts.POSIXThreads)
438
1
      Builder.defineMacro("_REENTRANT");
439
37
  }
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
7
    // 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
5
    // 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
7
    // 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
3
    // 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
2
                    MacroBuilder &Builder) const override {
433
2
    // NetBSD defines; list based off of gcc output
434
2
    Builder.defineMacro("__NetBSD__");
435
2
    Builder.defineMacro("__unix__");
436
2
    Builder.defineMacro("__ELF__");
437
2
    if (Opts.POSIXThreads)
438
0
      Builder.defineMacro("_REENTRANT");
439
2
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
432
4
                    MacroBuilder &Builder) const override {
433
4
    // 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
2
    // 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
1
    // 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
6
    // 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
51
      : OSTargetInfo<Target>(Triple, Opts) {
444
51
    this->MCountName = "__mcount";
445
51
  }
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
2
      : OSTargetInfo<Target>(Triple, Opts) {
444
2
    this->MCountName = "__mcount";
445
2
  }
clang::targets::NetBSDTargetInfo<clang::targets::PPC64TargetInfo>::NetBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
443
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
26
                    MacroBuilder &Builder) const override {
454
26
    // OpenBSD defines; list based off of gcc output
455
26
456
26
    Builder.defineMacro("__OpenBSD__");
457
26
    DefineStd(Builder, "unix", Opts);
458
26
    Builder.defineMacro("__ELF__");
459
26
    if (Opts.POSIXThreads)
460
0
      Builder.defineMacro("_REENTRANT");
461
26
    if (this->HasFloat128)
462
7
      Builder.defineMacro("__FLOAT128__");
463
26
  }
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
4
    // 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
3
    // 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
4
    // 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
5
    // 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
3
    // 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
3
                    MacroBuilder &Builder) const override {
454
3
    // 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::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
453
2
                    MacroBuilder &Builder) const override {
454
2
    // 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
  }
Unexecuted instantiation: clang::targets::OpenBSDTargetInfo<clang::targets::SparcV8elTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
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
2
    // 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
26
      : OSTargetInfo<Target>(Triple, Opts) {
468
26
    switch (Triple.getArch()) {
469
7
    case llvm::Triple::x86:
470
7
    case llvm::Triple::x86_64:
471
7
      this->HasFloat128 = true;
472
7
      LLVM_FALLTHROUGH;
473
18
    default:
474
18
      this->MCountName = "__mcount";
475
18
      break;
476
8
    case llvm::Triple::mips64:
477
8
    case llvm::Triple::mips64el:
478
8
    case llvm::Triple::ppc:
479
8
    case llvm::Triple::sparcv9:
480
8
      this->MCountName = "_mcount";
481
8
      break;
482
26
    }
483
26
  }
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
    switch (Triple.getArch()) {
469
4
    case llvm::Triple::x86:
470
4
    case llvm::Triple::x86_64:
471
4
      this->HasFloat128 = true;
472
4
      LLVM_FALLTHROUGH;
473
4
    default:
474
4
      this->MCountName = "__mcount";
475
4
      break;
476
4
    case llvm::Triple::mips64:
477
0
    case llvm::Triple::mips64el:
478
0
    case llvm::Triple::ppc:
479
0
    case llvm::Triple::sparcv9:
480
0
      this->MCountName = "_mcount";
481
0
      break;
482
4
    }
483
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
    switch (Triple.getArch()) {
469
3
    case llvm::Triple::x86:
470
3
    case llvm::Triple::x86_64:
471
3
      this->HasFloat128 = true;
472
3
      LLVM_FALLTHROUGH;
473
3
    default:
474
3
      this->MCountName = "__mcount";
475
3
      break;
476
3
    case llvm::Triple::mips64:
477
0
    case llvm::Triple::mips64el:
478
0
    case llvm::Triple::ppc:
479
0
    case llvm::Triple::sparcv9:
480
0
      this->MCountName = "_mcount";
481
0
      break;
482
3
    }
483
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
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
4
    default:
474
4
      this->MCountName = "__mcount";
475
4
      break;
476
0
    case llvm::Triple::mips64:
477
0
    case llvm::Triple::mips64el:
478
0
    case llvm::Triple::ppc:
479
0
    case llvm::Triple::sparcv9:
480
0
      this->MCountName = "_mcount";
481
0
      break;
482
4
    }
483
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
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
5
    default:
474
5
      this->MCountName = "__mcount";
475
5
      break;
476
0
    case llvm::Triple::mips64:
477
0
    case llvm::Triple::mips64el:
478
0
    case llvm::Triple::ppc:
479
0
    case llvm::Triple::sparcv9:
480
0
      this->MCountName = "_mcount";
481
0
      break;
482
5
    }
483
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
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
0
    default:
474
0
      this->MCountName = "__mcount";
475
0
      break;
476
3
    case llvm::Triple::mips64:
477
3
    case llvm::Triple::mips64el:
478
3
    case llvm::Triple::ppc:
479
3
    case llvm::Triple::sparcv9:
480
3
      this->MCountName = "_mcount";
481
3
      break;
482
3
    }
483
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::PPC32TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
467
3
      : OSTargetInfo<Target>(Triple, Opts) {
468
3
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
0
    default:
474
0
      this->MCountName = "__mcount";
475
0
      break;
476
3
    case llvm::Triple::mips64:
477
3
    case llvm::Triple::mips64el:
478
3
    case llvm::Triple::ppc:
479
3
    case llvm::Triple::sparcv9:
480
3
      this->MCountName = "_mcount";
481
3
      break;
482
3
    }
483
3
  }
clang::targets::OpenBSDTargetInfo<clang::targets::SparcV8TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
467
2
      : OSTargetInfo<Target>(Triple, Opts) {
468
2
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
2
    default:
474
2
      this->MCountName = "__mcount";
475
2
      break;
476
0
    case llvm::Triple::mips64:
477
0
    case llvm::Triple::mips64el:
478
0
    case llvm::Triple::ppc:
479
0
    case llvm::Triple::sparcv9:
480
0
      this->MCountName = "_mcount";
481
0
      break;
482
2
    }
483
2
  }
Unexecuted instantiation: clang::targets::OpenBSDTargetInfo<clang::targets::SparcV8elTargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
clang::targets::OpenBSDTargetInfo<clang::targets::SparcV9TargetInfo>::OpenBSDTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
467
2
      : OSTargetInfo<Target>(Triple, Opts) {
468
2
    switch (Triple.getArch()) {
469
0
    case llvm::Triple::x86:
470
0
    case llvm::Triple::x86_64:
471
0
      this->HasFloat128 = true;
472
0
      LLVM_FALLTHROUGH;
473
0
    default:
474
0
      this->MCountName = "__mcount";
475
0
      break;
476
2
    case llvm::Triple::mips64:
477
2
    case llvm::Triple::mips64el:
478
2
    case llvm::Triple::ppc:
479
2
    case llvm::Triple::sparcv9:
480
2
      this->MCountName = "_mcount";
481
2
      break;
482
2
    }
483
2
  }
484
};
485
486
// PSP Target
487
template <typename Target>
488
class LLVM_LIBRARY_VISIBILITY PSPTargetInfo : public OSTargetInfo<Target> {
489
protected:
490
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
491
                    MacroBuilder &Builder) const override {
492
    // PSP defines; list based on the output of the pspdev gcc toolchain.
493
    Builder.defineMacro("PSP");
494
    Builder.defineMacro("_PSP");
495
    Builder.defineMacro("__psp__");
496
    Builder.defineMacro("__ELF__");
497
  }
498
499
public:
500
  PSPTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {}
501
};
502
503
// PS3 PPU Target
504
template <typename Target>
505
class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo<Target> {
506
protected:
507
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
508
1
                    MacroBuilder &Builder) const override {
509
1
    // PS3 PPU defines.
510
1
    Builder.defineMacro("__PPC__");
511
1
    Builder.defineMacro("__PPU__");
512
1
    Builder.defineMacro("__CELLOS_LV2__");
513
1
    Builder.defineMacro("__ELF__");
514
1
    Builder.defineMacro("__LP32__");
515
1
    Builder.defineMacro("_ARCH_PPC64");
516
1
    Builder.defineMacro("__powerpc64__");
517
1
  }
518
519
public:
520
  PS3PPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
521
1
      : OSTargetInfo<Target>(Triple, Opts) {
522
1
    this->LongWidth = this->LongAlign = 32;
523
1
    this->PointerWidth = this->PointerAlign = 32;
524
1
    this->IntMaxType = TargetInfo::SignedLongLong;
525
1
    this->Int64Type = TargetInfo::SignedLongLong;
526
1
    this->SizeType = TargetInfo::UnsignedInt;
527
1
    this->resetDataLayout("E-m:e-p:32:32-i64:64-n32:64");
528
1
  }
529
};
530
531
template <typename Target>
532
class LLVM_LIBRARY_VISIBILITY PS4OSTargetInfo : public OSTargetInfo<Target> {
533
protected:
534
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
535
23
                    MacroBuilder &Builder) const override {
536
23
    Builder.defineMacro("__FreeBSD__", "9");
537
23
    Builder.defineMacro("__FreeBSD_cc_version", "900001");
538
23
    Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
539
23
    DefineStd(Builder, "unix", Opts);
540
23
    Builder.defineMacro("__ELF__");
541
23
    Builder.defineMacro("__SCE__");
542
23
    Builder.defineMacro("__ORBIS__");
543
23
  }
544
545
public:
546
  PS4OSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
547
25
      : OSTargetInfo<Target>(Triple, Opts) {
548
25
    this->WCharType = TargetInfo::UnsignedShort;
549
25
550
25
    // On PS4, TLS variable cannot be aligned to more than 32 bytes (256 bits).
551
25
    this->MaxTLSAlign = 256;
552
25
553
25
    // On PS4, do not honor explicit bit field alignment,
554
25
    // as in "__attribute__((aligned(2))) int b : 1;".
555
25
    this->UseExplicitBitFieldAlignment = false;
556
25
557
25
    switch (Triple.getArch()) {
558
0
    default:
559
25
    case llvm::Triple::x86_64:
560
25
      this->MCountName = ".mcount";
561
25
      this->NewAlign = 256;
562
25
      break;
563
25
    }
564
25
  }
565
  TargetInfo::CallingConvCheckResult
566
15
  checkCallingConvention(CallingConv CC) const override {
567
15
    return (CC == CC_C) ? 
TargetInfo::CCCR_OK2
:
TargetInfo::CCCR_Error13
;
568
15
  }
569
};
570
571
// RTEMS Target
572
template <typename Target>
573
class LLVM_LIBRARY_VISIBILITY RTEMSTargetInfo : public OSTargetInfo<Target> {
574
protected:
575
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
576
4
                    MacroBuilder &Builder) const override {
577
4
    // RTEMS defines; list based off of gcc output
578
4
579
4
    Builder.defineMacro("__rtems__");
580
4
    Builder.defineMacro("__ELF__");
581
4
    if (Opts.CPlusPlus)
582
1
      Builder.defineMacro("_GNU_SOURCE");
583
4
  }
clang::targets::RTEMSTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
576
2
                    MacroBuilder &Builder) const override {
577
2
    // RTEMS defines; list based off of gcc output
578
2
579
2
    Builder.defineMacro("__rtems__");
580
2
    Builder.defineMacro("__ELF__");
581
2
    if (Opts.CPlusPlus)
582
0
      Builder.defineMacro("_GNU_SOURCE");
583
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
576
2
                    MacroBuilder &Builder) const override {
577
2
    // RTEMS defines; list based off of gcc output
578
2
579
2
    Builder.defineMacro("__rtems__");
580
2
    Builder.defineMacro("__ELF__");
581
2
    if (Opts.CPlusPlus)
582
1
      Builder.defineMacro("_GNU_SOURCE");
583
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::SparcV8elTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
584
585
public:
586
  RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
587
4
      : OSTargetInfo<Target>(Triple, Opts) {
588
4
    switch (Triple.getArch()) {
589
2
    default:
590
2
    case llvm::Triple::x86:
591
2
      // this->MCountName = ".mcount";
592
2
      break;
593
2
    case llvm::Triple::mips:
594
0
    case llvm::Triple::mipsel:
595
0
    case llvm::Triple::ppc:
596
0
    case llvm::Triple::ppc64:
597
0
    case llvm::Triple::ppc64le:
598
0
      // this->MCountName = "_mcount";
599
0
      break;
600
2
    case llvm::Triple::arm:
601
2
      // this->MCountName = "__mcount";
602
2
      break;
603
4
    }
604
4
  }
clang::targets::RTEMSTargetInfo<clang::targets::ARMleTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
587
2
      : OSTargetInfo<Target>(Triple, Opts) {
588
2
    switch (Triple.getArch()) {
589
0
    default:
590
0
    case llvm::Triple::x86:
591
0
      // this->MCountName = ".mcount";
592
0
      break;
593
0
    case llvm::Triple::mips:
594
0
    case llvm::Triple::mipsel:
595
0
    case llvm::Triple::ppc:
596
0
    case llvm::Triple::ppc64:
597
0
    case llvm::Triple::ppc64le:
598
0
      // this->MCountName = "_mcount";
599
0
      break;
600
2
    case llvm::Triple::arm:
601
2
      // this->MCountName = "__mcount";
602
2
      break;
603
2
    }
604
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
587
2
      : OSTargetInfo<Target>(Triple, Opts) {
588
2
    switch (Triple.getArch()) {
589
2
    default:
590
2
    case llvm::Triple::x86:
591
2
      // this->MCountName = ".mcount";
592
2
      break;
593
2
    case llvm::Triple::mips:
594
0
    case llvm::Triple::mipsel:
595
0
    case llvm::Triple::ppc:
596
0
    case llvm::Triple::ppc64:
597
0
    case llvm::Triple::ppc64le:
598
0
      // this->MCountName = "_mcount";
599
0
      break;
600
0
    case llvm::Triple::arm:
601
0
      // this->MCountName = "__mcount";
602
0
      break;
603
2
    }
604
2
  }
Unexecuted instantiation: clang::targets::RTEMSTargetInfo<clang::targets::SparcV8elTargetInfo>::RTEMSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
605
};
606
607
// Solaris target
608
template <typename Target>
609
class LLVM_LIBRARY_VISIBILITY SolarisTargetInfo : public OSTargetInfo<Target> {
610
protected:
611
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
612
11
                    MacroBuilder &Builder) const override {
613
11
    DefineStd(Builder, "sun", Opts);
614
11
    DefineStd(Builder, "unix", Opts);
615
11
    Builder.defineMacro("__ELF__");
616
11
    Builder.defineMacro("__svr4__");
617
11
    Builder.defineMacro("__SVR4");
618
11
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
619
11
    // newer, but to 500 for everything else.  feature_test.h has a check to
620
11
    // ensure that you are not using C99 with an old version of X/Open or C89
621
11
    // with a new version.
622
11
    if (Opts.C99)
623
8
      Builder.defineMacro("_XOPEN_SOURCE", "600");
624
3
    else
625
3
      Builder.defineMacro("_XOPEN_SOURCE", "500");
626
11
    if (Opts.CPlusPlus) {
627
3
      Builder.defineMacro("__C99FEATURES__");
628
3
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
629
3
    }
630
11
    // GCC restricts the next two to C++.
631
11
    Builder.defineMacro("_LARGEFILE_SOURCE");
632
11
    Builder.defineMacro("_LARGEFILE64_SOURCE");
633
11
    Builder.defineMacro("__EXTENSIONS__");
634
11
    if (Opts.POSIXThreads)
635
0
      Builder.defineMacro("_REENTRANT");
636
11
    if (this->HasFloat128)
637
8
      Builder.defineMacro("__FLOAT128__");
638
11
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV8TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
612
2
                    MacroBuilder &Builder) const override {
613
2
    DefineStd(Builder, "sun", Opts);
614
2
    DefineStd(Builder, "unix", Opts);
615
2
    Builder.defineMacro("__ELF__");
616
2
    Builder.defineMacro("__svr4__");
617
2
    Builder.defineMacro("__SVR4");
618
2
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
619
2
    // newer, but to 500 for everything else.  feature_test.h has a check to
620
2
    // ensure that you are not using C99 with an old version of X/Open or C89
621
2
    // with a new version.
622
2
    if (Opts.C99)
623
2
      Builder.defineMacro("_XOPEN_SOURCE", "600");
624
0
    else
625
0
      Builder.defineMacro("_XOPEN_SOURCE", "500");
626
2
    if (Opts.CPlusPlus) {
627
0
      Builder.defineMacro("__C99FEATURES__");
628
0
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
629
0
    }
630
2
    // GCC restricts the next two to C++.
631
2
    Builder.defineMacro("_LARGEFILE_SOURCE");
632
2
    Builder.defineMacro("_LARGEFILE64_SOURCE");
633
2
    Builder.defineMacro("__EXTENSIONS__");
634
2
    if (Opts.POSIXThreads)
635
0
      Builder.defineMacro("_REENTRANT");
636
2
    if (this->HasFloat128)
637
0
      Builder.defineMacro("__FLOAT128__");
638
2
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV9TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
612
1
                    MacroBuilder &Builder) const override {
613
1
    DefineStd(Builder, "sun", Opts);
614
1
    DefineStd(Builder, "unix", Opts);
615
1
    Builder.defineMacro("__ELF__");
616
1
    Builder.defineMacro("__svr4__");
617
1
    Builder.defineMacro("__SVR4");
618
1
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
619
1
    // newer, but to 500 for everything else.  feature_test.h has a check to
620
1
    // ensure that you are not using C99 with an old version of X/Open or C89
621
1
    // with a new version.
622
1
    if (Opts.C99)
623
1
      Builder.defineMacro("_XOPEN_SOURCE", "600");
624
0
    else
625
0
      Builder.defineMacro("_XOPEN_SOURCE", "500");
626
1
    if (Opts.CPlusPlus) {
627
0
      Builder.defineMacro("__C99FEATURES__");
628
0
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
629
0
    }
630
1
    // GCC restricts the next two to C++.
631
1
    Builder.defineMacro("_LARGEFILE_SOURCE");
632
1
    Builder.defineMacro("_LARGEFILE64_SOURCE");
633
1
    Builder.defineMacro("__EXTENSIONS__");
634
1
    if (Opts.POSIXThreads)
635
0
      Builder.defineMacro("_REENTRANT");
636
1
    if (this->HasFloat128)
637
0
      Builder.defineMacro("__FLOAT128__");
638
1
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
612
6
                    MacroBuilder &Builder) const override {
613
6
    DefineStd(Builder, "sun", Opts);
614
6
    DefineStd(Builder, "unix", Opts);
615
6
    Builder.defineMacro("__ELF__");
616
6
    Builder.defineMacro("__svr4__");
617
6
    Builder.defineMacro("__SVR4");
618
6
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
619
6
    // newer, but to 500 for everything else.  feature_test.h has a check to
620
6
    // ensure that you are not using C99 with an old version of X/Open or C89
621
6
    // with a new version.
622
6
    if (Opts.C99)
623
4
      Builder.defineMacro("_XOPEN_SOURCE", "600");
624
2
    else
625
2
      Builder.defineMacro("_XOPEN_SOURCE", "500");
626
6
    if (Opts.CPlusPlus) {
627
2
      Builder.defineMacro("__C99FEATURES__");
628
2
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
629
2
    }
630
6
    // GCC restricts the next two to C++.
631
6
    Builder.defineMacro("_LARGEFILE_SOURCE");
632
6
    Builder.defineMacro("_LARGEFILE64_SOURCE");
633
6
    Builder.defineMacro("__EXTENSIONS__");
634
6
    if (Opts.POSIXThreads)
635
0
      Builder.defineMacro("_REENTRANT");
636
6
    if (this->HasFloat128)
637
6
      Builder.defineMacro("__FLOAT128__");
638
6
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
612
2
                    MacroBuilder &Builder) const override {
613
2
    DefineStd(Builder, "sun", Opts);
614
2
    DefineStd(Builder, "unix", Opts);
615
2
    Builder.defineMacro("__ELF__");
616
2
    Builder.defineMacro("__svr4__");
617
2
    Builder.defineMacro("__SVR4");
618
2
    // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
619
2
    // newer, but to 500 for everything else.  feature_test.h has a check to
620
2
    // ensure that you are not using C99 with an old version of X/Open or C89
621
2
    // with a new version.
622
2
    if (Opts.C99)
623
1
      Builder.defineMacro("_XOPEN_SOURCE", "600");
624
1
    else
625
1
      Builder.defineMacro("_XOPEN_SOURCE", "500");
626
2
    if (Opts.CPlusPlus) {
627
1
      Builder.defineMacro("__C99FEATURES__");
628
1
      Builder.defineMacro("_FILE_OFFSET_BITS", "64");
629
1
    }
630
2
    // GCC restricts the next two to C++.
631
2
    Builder.defineMacro("_LARGEFILE_SOURCE");
632
2
    Builder.defineMacro("_LARGEFILE64_SOURCE");
633
2
    Builder.defineMacro("__EXTENSIONS__");
634
2
    if (Opts.POSIXThreads)
635
0
      Builder.defineMacro("_REENTRANT");
636
2
    if (this->HasFloat128)
637
2
      Builder.defineMacro("__FLOAT128__");
638
2
  }
639
640
public:
641
  SolarisTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
642
11
      : OSTargetInfo<Target>(Triple, Opts) {
643
11
    if (this->PointerWidth == 64) {
644
3
      this->WCharType = this->WIntType = this->SignedInt;
645
8
    } else {
646
8
      this->WCharType = this->WIntType = this->SignedLong;
647
8
    }
648
11
    switch (Triple.getArch()) {
649
3
    default:
650
3
      break;
651
8
    case llvm::Triple::x86:
652
8
    case llvm::Triple::x86_64:
653
8
      this->HasFloat128 = true;
654
8
      break;
655
11
    }
656
11
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV8TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
642
2
      : OSTargetInfo<Target>(Triple, Opts) {
643
2
    if (this->PointerWidth == 64) {
644
0
      this->WCharType = this->WIntType = this->SignedInt;
645
2
    } else {
646
2
      this->WCharType = this->WIntType = this->SignedLong;
647
2
    }
648
2
    switch (Triple.getArch()) {
649
2
    default:
650
2
      break;
651
0
    case llvm::Triple::x86:
652
0
    case llvm::Triple::x86_64:
653
0
      this->HasFloat128 = true;
654
0
      break;
655
2
    }
656
2
  }
clang::targets::SolarisTargetInfo<clang::targets::SparcV9TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
642
1
      : OSTargetInfo<Target>(Triple, Opts) {
643
1
    if (this->PointerWidth == 64) {
644
1
      this->WCharType = this->WIntType = this->SignedInt;
645
1
    } else {
646
0
      this->WCharType = this->WIntType = this->SignedLong;
647
0
    }
648
1
    switch (Triple.getArch()) {
649
1
    default:
650
1
      break;
651
0
    case llvm::Triple::x86:
652
0
    case llvm::Triple::x86_64:
653
0
      this->HasFloat128 = true;
654
0
      break;
655
1
    }
656
1
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_32TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
642
6
      : OSTargetInfo<Target>(Triple, Opts) {
643
6
    if (this->PointerWidth == 64) {
644
0
      this->WCharType = this->WIntType = this->SignedInt;
645
6
    } else {
646
6
      this->WCharType = this->WIntType = this->SignedLong;
647
6
    }
648
6
    switch (Triple.getArch()) {
649
0
    default:
650
0
      break;
651
6
    case llvm::Triple::x86:
652
6
    case llvm::Triple::x86_64:
653
6
      this->HasFloat128 = true;
654
6
      break;
655
6
    }
656
6
  }
clang::targets::SolarisTargetInfo<clang::targets::X86_64TargetInfo>::SolarisTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
642
2
      : OSTargetInfo<Target>(Triple, Opts) {
643
2
    if (this->PointerWidth == 64) {
644
2
      this->WCharType = this->WIntType = this->SignedInt;
645
2
    } else {
646
0
      this->WCharType = this->WIntType = this->SignedLong;
647
0
    }
648
2
    switch (Triple.getArch()) {
649
0
    default:
650
0
      break;
651
2
    case llvm::Triple::x86:
652
2
    case llvm::Triple::x86_64:
653
2
      this->HasFloat128 = true;
654
2
      break;
655
2
    }
656
2
  }
657
};
658
659
// AIX Target
660
template <typename Target>
661
class AIXTargetInfo : public OSTargetInfo<Target> {
662
protected:
663
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
664
25
                    MacroBuilder &Builder) const override {
665
25
    DefineStd(Builder, "unix", Opts);
666
25
    Builder.defineMacro("_IBMR2");
667
25
    Builder.defineMacro("_POWER");
668
25
669
25
    Builder.defineMacro("_AIX");
670
25
671
25
    unsigned Major, Minor, Micro;
672
25
    Triple.getOSVersion(Major, Minor, Micro);
673
25
674
25
    // Define AIX OS-Version Macros.
675
25
    // Includes logic for legacy versions of AIX; no specific intent to support.
676
25
    std::pair<int, int> OsVersion = {Major, Minor};
677
25
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")17
;
678
25
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")16
;
679
25
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")15
;
680
25
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")14
;
681
25
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")13
;
682
25
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")12
;
683
25
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")11
;
684
25
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")10
;
685
25
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")9
;
686
25
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")1
;
687
25
688
25
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
689
25
    Builder.defineMacro("_LONG_LONG");
690
25
691
25
    if (Opts.POSIXThreads) {
692
1
      Builder.defineMacro("_THREAD_SAFE");
693
1
    }
694
25
695
25
    if (this->PointerWidth == 64) {
696
5
      Builder.defineMacro("__64BIT__");
697
5
    }
698
25
699
25
    // Define _WCHAR_T when it is a fundamental type
700
25
    // (i.e., for C++ without -fno-wchar).
701
25
    if (Opts.CPlusPlus && 
Opts.WChar6
) {
702
5
      Builder.defineMacro("_WCHAR_T");
703
5
    }
704
25
  }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
664
20
                    MacroBuilder &Builder) const override {
665
20
    DefineStd(Builder, "unix", Opts);
666
20
    Builder.defineMacro("_IBMR2");
667
20
    Builder.defineMacro("_POWER");
668
20
669
20
    Builder.defineMacro("_AIX");
670
20
671
20
    unsigned Major, Minor, Micro;
672
20
    Triple.getOSVersion(Major, Minor, Micro);
673
20
674
20
    // Define AIX OS-Version Macros.
675
20
    // Includes logic for legacy versions of AIX; no specific intent to support.
676
20
    std::pair<int, int> OsVersion = {Major, Minor};
677
20
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")16
;
678
20
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")15
;
679
20
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")14
;
680
20
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")13
;
681
20
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")12
;
682
20
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")11
;
683
20
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")10
;
684
20
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")9
;
685
20
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")8
;
686
20
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")1
;
687
20
688
20
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
689
20
    Builder.defineMacro("_LONG_LONG");
690
20
691
20
    if (Opts.POSIXThreads) {
692
1
      Builder.defineMacro("_THREAD_SAFE");
693
1
    }
694
20
695
20
    if (this->PointerWidth == 64) {
696
0
      Builder.defineMacro("__64BIT__");
697
0
    }
698
20
699
20
    // Define _WCHAR_T when it is a fundamental type
700
20
    // (i.e., for C++ without -fno-wchar).
701
20
    if (Opts.CPlusPlus && 
Opts.WChar4
) {
702
3
      Builder.defineMacro("_WCHAR_T");
703
3
    }
704
20
  }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
664
5
                    MacroBuilder &Builder) const override {
665
5
    DefineStd(Builder, "unix", Opts);
666
5
    Builder.defineMacro("_IBMR2");
667
5
    Builder.defineMacro("_POWER");
668
5
669
5
    Builder.defineMacro("_AIX");
670
5
671
5
    unsigned Major, Minor, Micro;
672
5
    Triple.getOSVersion(Major, Minor, Micro);
673
5
674
5
    // Define AIX OS-Version Macros.
675
5
    // Includes logic for legacy versions of AIX; no specific intent to support.
676
5
    std::pair<int, int> OsVersion = {Major, Minor};
677
5
    if (OsVersion >= std::make_pair(3, 2)) 
Builder.defineMacro("_AIX32")1
;
678
5
    if (OsVersion >= std::make_pair(4, 1)) 
Builder.defineMacro("_AIX41")1
;
679
5
    if (OsVersion >= std::make_pair(4, 3)) 
Builder.defineMacro("_AIX43")1
;
680
5
    if (OsVersion >= std::make_pair(5, 0)) 
Builder.defineMacro("_AIX50")1
;
681
5
    if (OsVersion >= std::make_pair(5, 1)) 
Builder.defineMacro("_AIX51")1
;
682
5
    if (OsVersion >= std::make_pair(5, 2)) 
Builder.defineMacro("_AIX52")1
;
683
5
    if (OsVersion >= std::make_pair(5, 3)) 
Builder.defineMacro("_AIX53")1
;
684
5
    if (OsVersion >= std::make_pair(6, 1)) 
Builder.defineMacro("_AIX61")1
;
685
5
    if (OsVersion >= std::make_pair(7, 1)) 
Builder.defineMacro("_AIX71")1
;
686
5
    if (OsVersion >= std::make_pair(7, 2)) 
Builder.defineMacro("_AIX72")0
;
687
5
688
5
    // FIXME: Do not define _LONG_LONG when -fno-long-long is specified.
689
5
    Builder.defineMacro("_LONG_LONG");
690
5
691
5
    if (Opts.POSIXThreads) {
692
0
      Builder.defineMacro("_THREAD_SAFE");
693
0
    }
694
5
695
5
    if (this->PointerWidth == 64) {
696
5
      Builder.defineMacro("__64BIT__");
697
5
    }
698
5
699
5
    // Define _WCHAR_T when it is a fundamental type
700
5
    // (i.e., for C++ without -fno-wchar).
701
5
    if (Opts.CPlusPlus && 
Opts.WChar2
) {
702
2
      Builder.defineMacro("_WCHAR_T");
703
2
    }
704
5
  }
705
706
public:
707
  AIXTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
708
25
      : OSTargetInfo<Target>(Triple, Opts) {
709
25
    this->TheCXXABI.set(TargetCXXABI::XL);
710
25
711
25
    if (this->PointerWidth == 64) {
712
5
      this->WCharType = this->UnsignedInt;
713
20
    } else {
714
20
      this->WCharType = this->UnsignedShort;
715
20
    }
716
25
    this->UseZeroLengthBitfieldAlignment = true;
717
25
  }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::AIXTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
708
20
      : OSTargetInfo<Target>(Triple, Opts) {
709
20
    this->TheCXXABI.set(TargetCXXABI::XL);
710
20
711
20
    if (this->PointerWidth == 64) {
712
0
      this->WCharType = this->UnsignedInt;
713
20
    } else {
714
20
      this->WCharType = this->UnsignedShort;
715
20
    }
716
20
    this->UseZeroLengthBitfieldAlignment = true;
717
20
  }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::AIXTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
708
5
      : OSTargetInfo<Target>(Triple, Opts) {
709
5
    this->TheCXXABI.set(TargetCXXABI::XL);
710
5
711
5
    if (this->PointerWidth == 64) {
712
5
      this->WCharType = this->UnsignedInt;
713
5
    } else {
714
0
      this->WCharType = this->UnsignedShort;
715
0
    }
716
5
    this->UseZeroLengthBitfieldAlignment = true;
717
5
  }
718
719
  // AIX sets FLT_EVAL_METHOD to be 1.
720
25
  unsigned getFloatEvalMethod() const override { return 1; }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::getFloatEvalMethod() const
Line
Count
Source
720
20
  unsigned getFloatEvalMethod() const override { return 1; }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::getFloatEvalMethod() const
Line
Count
Source
720
5
  unsigned getFloatEvalMethod() const override { return 1; }
721
58
  bool hasInt128Type() const override { return false; }
clang::targets::AIXTargetInfo<clang::targets::PPC32TargetInfo>::hasInt128Type() const
Line
Count
Source
721
44
  bool hasInt128Type() const override { return false; }
clang::targets::AIXTargetInfo<clang::targets::PPC64TargetInfo>::hasInt128Type() const
Line
Count
Source
721
14
  bool hasInt128Type() const override { return false; }
722
};
723
724
void addWindowsDefines(const llvm::Triple &Triple, const LangOptions &Opts,
725
                       MacroBuilder &Builder);
726
727
// Windows target
728
template <typename Target>
729
class LLVM_LIBRARY_VISIBILITY WindowsTargetInfo : public OSTargetInfo<Target> {
730
protected:
731
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
732
1.25k
                    MacroBuilder &Builder) const override {
733
1.25k
    addWindowsDefines(Triple, Opts, Builder);
734
1.25k
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
732
600
                    MacroBuilder &Builder) const override {
733
600
    addWindowsDefines(Triple, Opts, Builder);
734
600
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
732
518
                    MacroBuilder &Builder) const override {
733
518
    addWindowsDefines(Triple, Opts, Builder);
734
518
  }
clang::targets::WindowsTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
732
43
                    MacroBuilder &Builder) const override {
733
43
    addWindowsDefines(Triple, Opts, Builder);
734
43
  }
clang::targets::WindowsTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
732
94
                    MacroBuilder &Builder) const override {
733
94
    addWindowsDefines(Triple, Opts, Builder);
734
94
  }
735
736
public:
737
  WindowsTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
738
1.26k
      : OSTargetInfo<Target>(Triple, Opts) {
739
1.26k
    this->WCharType = TargetInfo::UnsignedShort;
740
1.26k
    this->WIntType = TargetInfo::UnsignedShort;
741
1.26k
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_32TargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
738
605
      : OSTargetInfo<Target>(Triple, Opts) {
739
605
    this->WCharType = TargetInfo::UnsignedShort;
740
605
    this->WIntType = TargetInfo::UnsignedShort;
741
605
  }
clang::targets::WindowsTargetInfo<clang::targets::X86_64TargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
738
521
      : OSTargetInfo<Target>(Triple, Opts) {
739
521
    this->WCharType = TargetInfo::UnsignedShort;
740
521
    this->WIntType = TargetInfo::UnsignedShort;
741
521
  }
clang::targets::WindowsTargetInfo<clang::targets::AArch64leTargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
738
43
      : OSTargetInfo<Target>(Triple, Opts) {
739
43
    this->WCharType = TargetInfo::UnsignedShort;
740
43
    this->WIntType = TargetInfo::UnsignedShort;
741
43
  }
clang::targets::WindowsTargetInfo<clang::targets::ARMleTargetInfo>::WindowsTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
738
94
      : OSTargetInfo<Target>(Triple, Opts) {
739
94
    this->WCharType = TargetInfo::UnsignedShort;
740
94
    this->WIntType = TargetInfo::UnsignedShort;
741
94
  }
742
};
743
744
template <typename Target>
745
class LLVM_LIBRARY_VISIBILITY NaClTargetInfo : public OSTargetInfo<Target> {
746
protected:
747
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
748
29
                    MacroBuilder &Builder) const override {
749
29
    if (Opts.POSIXThreads)
750
3
      Builder.defineMacro("_REENTRANT");
751
29
    if (Opts.CPlusPlus)
752
13
      Builder.defineMacro("_GNU_SOURCE");
753
29
754
29
    DefineStd(Builder, "unix", Opts);
755
29
    Builder.defineMacro("__ELF__");
756
29
    Builder.defineMacro("__native_client__");
757
29
  }
clang::targets::NaClTargetInfo<clang::targets::ARMleTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
748
2
                    MacroBuilder &Builder) const override {
749
2
    if (Opts.POSIXThreads)
750
0
      Builder.defineMacro("_REENTRANT");
751
2
    if (Opts.CPlusPlus)
752
0
      Builder.defineMacro("_GNU_SOURCE");
753
2
754
2
    DefineStd(Builder, "unix", Opts);
755
2
    Builder.defineMacro("__ELF__");
756
2
    Builder.defineMacro("__native_client__");
757
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
748
3
                    MacroBuilder &Builder) const override {
749
3
    if (Opts.POSIXThreads)
750
1
      Builder.defineMacro("_REENTRANT");
751
3
    if (Opts.CPlusPlus)
752
2
      Builder.defineMacro("_GNU_SOURCE");
753
3
754
3
    DefineStd(Builder, "unix", Opts);
755
3
    Builder.defineMacro("__ELF__");
756
3
    Builder.defineMacro("__native_client__");
757
3
  }
clang::targets::NaClTargetInfo<clang::targets::PNaClTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
748
14
                    MacroBuilder &Builder) const override {
749
14
    if (Opts.POSIXThreads)
750
1
      Builder.defineMacro("_REENTRANT");
751
14
    if (Opts.CPlusPlus)
752
6
      Builder.defineMacro("_GNU_SOURCE");
753
14
754
14
    DefineStd(Builder, "unix", Opts);
755
14
    Builder.defineMacro("__ELF__");
756
14
    Builder.defineMacro("__native_client__");
757
14
  }
clang::targets::NaClTargetInfo<clang::targets::X86_32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
748
2
                    MacroBuilder &Builder) const override {
749
2
    if (Opts.POSIXThreads)
750
0
      Builder.defineMacro("_REENTRANT");
751
2
    if (Opts.CPlusPlus)
752
0
      Builder.defineMacro("_GNU_SOURCE");
753
2
754
2
    DefineStd(Builder, "unix", Opts);
755
2
    Builder.defineMacro("__ELF__");
756
2
    Builder.defineMacro("__native_client__");
757
2
  }
clang::targets::NaClTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
748
8
                    MacroBuilder &Builder) const override {
749
8
    if (Opts.POSIXThreads)
750
1
      Builder.defineMacro("_REENTRANT");
751
8
    if (Opts.CPlusPlus)
752
5
      Builder.defineMacro("_GNU_SOURCE");
753
8
754
8
    DefineStd(Builder, "unix", Opts);
755
8
    Builder.defineMacro("__ELF__");
756
8
    Builder.defineMacro("__native_client__");
757
8
  }
758
759
public:
760
  NaClTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
761
29
      : OSTargetInfo<Target>(Triple, Opts) {
762
29
    this->LongAlign = 32;
763
29
    this->LongWidth = 32;
764
29
    this->PointerAlign = 32;
765
29
    this->PointerWidth = 32;
766
29
    this->IntMaxType = TargetInfo::SignedLongLong;
767
29
    this->Int64Type = TargetInfo::SignedLongLong;
768
29
    this->DoubleAlign = 64;
769
29
    this->LongDoubleWidth = 64;
770
29
    this->LongDoubleAlign = 64;
771
29
    this->LongLongWidth = 64;
772
29
    this->LongLongAlign = 64;
773
29
    this->SizeType = TargetInfo::UnsignedInt;
774
29
    this->PtrDiffType = TargetInfo::SignedInt;
775
29
    this->IntPtrType = TargetInfo::SignedInt;
776
29
    // RegParmMax is inherited from the underlying architecture.
777
29
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
29
    if (Triple.getArch() == llvm::Triple::arm) {
779
2
      // Handled in ARM's setABI().
780
27
    } else if (Triple.getArch() == llvm::Triple::x86) {
781
2
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
2
                            "i64:64-n8:16:32-S128");
783
25
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
784
8
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
8
                            "i64:64-n8:16:32:64-S128");
786
17
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
787
3
      // Handled on mips' setDataLayout.
788
14
    } else {
789
14
      assert(Triple.getArch() == llvm::Triple::le32);
790
14
      this->resetDataLayout("e-p:32:32-i64:64");
791
14
    }
792
29
  }
clang::targets::NaClTargetInfo<clang::targets::ARMleTargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
761
2
      : OSTargetInfo<Target>(Triple, Opts) {
762
2
    this->LongAlign = 32;
763
2
    this->LongWidth = 32;
764
2
    this->PointerAlign = 32;
765
2
    this->PointerWidth = 32;
766
2
    this->IntMaxType = TargetInfo::SignedLongLong;
767
2
    this->Int64Type = TargetInfo::SignedLongLong;
768
2
    this->DoubleAlign = 64;
769
2
    this->LongDoubleWidth = 64;
770
2
    this->LongDoubleAlign = 64;
771
2
    this->LongLongWidth = 64;
772
2
    this->LongLongAlign = 64;
773
2
    this->SizeType = TargetInfo::UnsignedInt;
774
2
    this->PtrDiffType = TargetInfo::SignedInt;
775
2
    this->IntPtrType = TargetInfo::SignedInt;
776
2
    // RegParmMax is inherited from the underlying architecture.
777
2
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
2
    if (Triple.getArch() == llvm::Triple::arm) {
779
2
      // Handled in ARM's setABI().
780
2
    } else 
if (0
Triple.getArch() == llvm::Triple::x860
) {
781
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
0
                            "i64:64-n8:16:32-S128");
783
0
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
784
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
0
                            "i64:64-n8:16:32:64-S128");
786
0
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
787
0
      // Handled on mips' setDataLayout.
788
0
    } else {
789
0
      assert(Triple.getArch() == llvm::Triple::le32);
790
0
      this->resetDataLayout("e-p:32:32-i64:64");
791
0
    }
792
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
761
3
      : OSTargetInfo<Target>(Triple, Opts) {
762
3
    this->LongAlign = 32;
763
3
    this->LongWidth = 32;
764
3
    this->PointerAlign = 32;
765
3
    this->PointerWidth = 32;
766
3
    this->IntMaxType = TargetInfo::SignedLongLong;
767
3
    this->Int64Type = TargetInfo::SignedLongLong;
768
3
    this->DoubleAlign = 64;
769
3
    this->LongDoubleWidth = 64;
770
3
    this->LongDoubleAlign = 64;
771
3
    this->LongLongWidth = 64;
772
3
    this->LongLongAlign = 64;
773
3
    this->SizeType = TargetInfo::UnsignedInt;
774
3
    this->PtrDiffType = TargetInfo::SignedInt;
775
3
    this->IntPtrType = TargetInfo::SignedInt;
776
3
    // RegParmMax is inherited from the underlying architecture.
777
3
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
3
    if (Triple.getArch() == llvm::Triple::arm) {
779
0
      // Handled in ARM's setABI().
780
3
    } else if (Triple.getArch() == llvm::Triple::x86) {
781
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
0
                            "i64:64-n8:16:32-S128");
783
3
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
784
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
0
                            "i64:64-n8:16:32:64-S128");
786
3
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
787
3
      // Handled on mips' setDataLayout.
788
3
    } else {
789
0
      assert(Triple.getArch() == llvm::Triple::le32);
790
0
      this->resetDataLayout("e-p:32:32-i64:64");
791
0
    }
792
3
  }
clang::targets::NaClTargetInfo<clang::targets::PNaClTargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
761
14
      : OSTargetInfo<Target>(Triple, Opts) {
762
14
    this->LongAlign = 32;
763
14
    this->LongWidth = 32;
764
14
    this->PointerAlign = 32;
765
14
    this->PointerWidth = 32;
766
14
    this->IntMaxType = TargetInfo::SignedLongLong;
767
14
    this->Int64Type = TargetInfo::SignedLongLong;
768
14
    this->DoubleAlign = 64;
769
14
    this->LongDoubleWidth = 64;
770
14
    this->LongDoubleAlign = 64;
771
14
    this->LongLongWidth = 64;
772
14
    this->LongLongAlign = 64;
773
14
    this->SizeType = TargetInfo::UnsignedInt;
774
14
    this->PtrDiffType = TargetInfo::SignedInt;
775
14
    this->IntPtrType = TargetInfo::SignedInt;
776
14
    // RegParmMax is inherited from the underlying architecture.
777
14
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
14
    if (Triple.getArch() == llvm::Triple::arm) {
779
0
      // Handled in ARM's setABI().
780
14
    } else if (Triple.getArch() == llvm::Triple::x86) {
781
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
0
                            "i64:64-n8:16:32-S128");
783
14
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
784
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
0
                            "i64:64-n8:16:32:64-S128");
786
14
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
787
0
      // Handled on mips' setDataLayout.
788
14
    } else {
789
14
      assert(Triple.getArch() == llvm::Triple::le32);
790
14
      this->resetDataLayout("e-p:32:32-i64:64");
791
14
    }
792
14
  }
clang::targets::NaClTargetInfo<clang::targets::X86_32TargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
761
2
      : OSTargetInfo<Target>(Triple, Opts) {
762
2
    this->LongAlign = 32;
763
2
    this->LongWidth = 32;
764
2
    this->PointerAlign = 32;
765
2
    this->PointerWidth = 32;
766
2
    this->IntMaxType = TargetInfo::SignedLongLong;
767
2
    this->Int64Type = TargetInfo::SignedLongLong;
768
2
    this->DoubleAlign = 64;
769
2
    this->LongDoubleWidth = 64;
770
2
    this->LongDoubleAlign = 64;
771
2
    this->LongLongWidth = 64;
772
2
    this->LongLongAlign = 64;
773
2
    this->SizeType = TargetInfo::UnsignedInt;
774
2
    this->PtrDiffType = TargetInfo::SignedInt;
775
2
    this->IntPtrType = TargetInfo::SignedInt;
776
2
    // RegParmMax is inherited from the underlying architecture.
777
2
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
2
    if (Triple.getArch() == llvm::Triple::arm) {
779
0
      // Handled in ARM's setABI().
780
2
    } else if (Triple.getArch() == llvm::Triple::x86) {
781
2
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
2
                            "i64:64-n8:16:32-S128");
783
2
    } else 
if (0
Triple.getArch() == llvm::Triple::x86_640
) {
784
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
0
                            "i64:64-n8:16:32:64-S128");
786
0
    } else if (Triple.getArch() == llvm::Triple::mipsel) {
787
0
      // Handled on mips' setDataLayout.
788
0
    } else {
789
0
      assert(Triple.getArch() == llvm::Triple::le32);
790
0
      this->resetDataLayout("e-p:32:32-i64:64");
791
0
    }
792
2
  }
clang::targets::NaClTargetInfo<clang::targets::X86_64TargetInfo>::NaClTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
761
8
      : OSTargetInfo<Target>(Triple, Opts) {
762
8
    this->LongAlign = 32;
763
8
    this->LongWidth = 32;
764
8
    this->PointerAlign = 32;
765
8
    this->PointerWidth = 32;
766
8
    this->IntMaxType = TargetInfo::SignedLongLong;
767
8
    this->Int64Type = TargetInfo::SignedLongLong;
768
8
    this->DoubleAlign = 64;
769
8
    this->LongDoubleWidth = 64;
770
8
    this->LongDoubleAlign = 64;
771
8
    this->LongLongWidth = 64;
772
8
    this->LongLongAlign = 64;
773
8
    this->SizeType = TargetInfo::UnsignedInt;
774
8
    this->PtrDiffType = TargetInfo::SignedInt;
775
8
    this->IntPtrType = TargetInfo::SignedInt;
776
8
    // RegParmMax is inherited from the underlying architecture.
777
8
    this->LongDoubleFormat = &llvm::APFloat::IEEEdouble();
778
8
    if (Triple.getArch() == llvm::Triple::arm) {
779
0
      // Handled in ARM's setABI().
780
8
    } else if (Triple.getArch() == llvm::Triple::x86) {
781
0
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
782
0
                            "i64:64-n8:16:32-S128");
783
8
    } else if (Triple.getArch() == llvm::Triple::x86_64) {
784
8
      this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
785
8
                            "i64:64-n8:16:32:64-S128");
786
8
    } else 
if (0
Triple.getArch() == llvm::Triple::mipsel0
) {
787
0
      // Handled on mips' setDataLayout.
788
0
    } else {
789
0
      assert(Triple.getArch() == llvm::Triple::le32);
790
0
      this->resetDataLayout("e-p:32:32-i64:64");
791
0
    }
792
8
  }
793
};
794
795
// Fuchsia Target
796
template <typename Target>
797
class LLVM_LIBRARY_VISIBILITY FuchsiaTargetInfo : public OSTargetInfo<Target> {
798
protected:
799
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
800
2
                    MacroBuilder &Builder) const override {
801
2
    Builder.defineMacro("__Fuchsia__");
802
2
    Builder.defineMacro("__ELF__");
803
2
    if (Opts.POSIXThreads)
804
0
      Builder.defineMacro("_REENTRANT");
805
2
    // Required by the libc++ locale support.
806
2
    if (Opts.CPlusPlus)
807
2
      Builder.defineMacro("_GNU_SOURCE");
808
2
  }
clang::targets::FuchsiaTargetInfo<clang::targets::AArch64leTargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
800
1
                    MacroBuilder &Builder) const override {
801
1
    Builder.defineMacro("__Fuchsia__");
802
1
    Builder.defineMacro("__ELF__");
803
1
    if (Opts.POSIXThreads)
804
0
      Builder.defineMacro("_REENTRANT");
805
1
    // Required by the libc++ locale support.
806
1
    if (Opts.CPlusPlus)
807
1
      Builder.defineMacro("_GNU_SOURCE");
808
1
  }
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
clang::targets::FuchsiaTargetInfo<clang::targets::X86_64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
800
1
                    MacroBuilder &Builder) const override {
801
1
    Builder.defineMacro("__Fuchsia__");
802
1
    Builder.defineMacro("__ELF__");
803
1
    if (Opts.POSIXThreads)
804
0
      Builder.defineMacro("_REENTRANT");
805
1
    // Required by the libc++ locale support.
806
1
    if (Opts.CPlusPlus)
807
1
      Builder.defineMacro("_GNU_SOURCE");
808
1
  }
809
810
public:
811
  FuchsiaTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
812
2
      : OSTargetInfo<Target>(Triple, Opts) {
813
2
    this->MCountName = "__mcount";
814
2
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
815
2
  }
clang::targets::FuchsiaTargetInfo<clang::targets::AArch64leTargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
812
1
      : OSTargetInfo<Target>(Triple, Opts) {
813
1
    this->MCountName = "__mcount";
814
1
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
815
1
  }
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&)
clang::targets::FuchsiaTargetInfo<clang::targets::X86_64TargetInfo>::FuchsiaTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
812
1
      : OSTargetInfo<Target>(Triple, Opts) {
813
1
    this->MCountName = "__mcount";
814
1
    this->TheCXXABI.set(TargetCXXABI::Fuchsia);
815
1
  }
816
};
817
818
// WebAssembly target
819
template <typename Target>
820
class LLVM_LIBRARY_VISIBILITY WebAssemblyOSTargetInfo
821
    : public OSTargetInfo<Target> {
822
protected:
823
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
824
71
                    MacroBuilder &Builder) const {
825
71
    // A common platform macro.
826
71
    if (Opts.POSIXThreads)
827
4
      Builder.defineMacro("_REENTRANT");
828
71
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
829
71
    if (Opts.CPlusPlus)
830
19
      Builder.defineMacro("_GNU_SOURCE");
831
71
    // Indicate that we have __float128.
832
71
    Builder.defineMacro("__FLOAT128__");
833
71
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
824
41
                    MacroBuilder &Builder) const {
825
41
    // A common platform macro.
826
41
    if (Opts.POSIXThreads)
827
2
      Builder.defineMacro("_REENTRANT");
828
41
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
829
41
    if (Opts.CPlusPlus)
830
12
      Builder.defineMacro("_GNU_SOURCE");
831
41
    // Indicate that we have __float128.
832
41
    Builder.defineMacro("__FLOAT128__");
833
41
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
824
30
                    MacroBuilder &Builder) const {
825
30
    // A common platform macro.
826
30
    if (Opts.POSIXThreads)
827
2
      Builder.defineMacro("_REENTRANT");
828
30
    // Follow g++ convention and predefine _GNU_SOURCE for C++.
829
30
    if (Opts.CPlusPlus)
830
7
      Builder.defineMacro("_GNU_SOURCE");
831
30
    // Indicate that we have __float128.
832
30
    Builder.defineMacro("__FLOAT128__");
833
30
  }
834
835
public:
836
  explicit WebAssemblyOSTargetInfo(const llvm::Triple &Triple,
837
                                   const TargetOptions &Opts)
838
72
      : OSTargetInfo<Target>(Triple, Opts) {
839
72
    this->MCountName = "__mcount";
840
72
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
841
72
    this->HasFloat128 = true;
842
72
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
838
3
      : OSTargetInfo<Target>(Triple, Opts) {
839
3
    this->MCountName = "__mcount";
840
3
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
841
3
    this->HasFloat128 = true;
842
3
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly32TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
838
38
      : OSTargetInfo<Target>(Triple, Opts) {
839
38
    this->MCountName = "__mcount";
840
38
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
841
38
    this->HasFloat128 = true;
842
38
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
838
1
      : OSTargetInfo<Target>(Triple, Opts) {
839
1
    this->MCountName = "__mcount";
840
1
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
841
1
    this->HasFloat128 = true;
842
1
  }
clang::targets::WebAssemblyOSTargetInfo<clang::targets::WebAssembly64TargetInfo>::WebAssemblyOSTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
838
30
      : OSTargetInfo<Target>(Triple, Opts) {
839
30
    this->MCountName = "__mcount";
840
30
    this->TheCXXABI.set(TargetCXXABI::WebAssembly);
841
30
    this->HasFloat128 = true;
842
30
  }
843
};
844
845
// WASI target
846
template <typename Target>
847
class LLVM_LIBRARY_VISIBILITY WASITargetInfo
848
    : public WebAssemblyOSTargetInfo<Target> {
849
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
850
2
                    MacroBuilder &Builder) const final {
851
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
852
2
    Builder.defineMacro("__wasi__");
853
2
  }
clang::targets::WASITargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
850
1
                    MacroBuilder &Builder) const final {
851
1
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
852
1
    Builder.defineMacro("__wasi__");
853
1
  }
clang::targets::WASITargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
850
1
                    MacroBuilder &Builder) const final {
851
1
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
852
1
    Builder.defineMacro("__wasi__");
853
1
  }
854
855
public:
856
  explicit WASITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
857
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::WASITargetInfo<clang::targets::WebAssembly32TargetInfo>::WASITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
857
1
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::WASITargetInfo<clang::targets::WebAssembly64TargetInfo>::WASITargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
857
1
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
858
};
859
860
// Emscripten target
861
template <typename Target>
862
class LLVM_LIBRARY_VISIBILITY EmscriptenTargetInfo
863
    : public WebAssemblyOSTargetInfo<Target> {
864
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
865
2
                    MacroBuilder &Builder) const final {
866
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
867
2
    Builder.defineMacro("__EMSCRIPTEN__");
868
2
  }
clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly32TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
Line
Count
Source
865
2
                    MacroBuilder &Builder) const final {
866
2
    WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder);
867
2
    Builder.defineMacro("__EMSCRIPTEN__");
868
2
  }
Unexecuted instantiation: clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly64TargetInfo>::getOSDefines(clang::LangOptions const&, llvm::Triple const&, clang::MacroBuilder&) const
869
870
public:
871
  explicit EmscriptenTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
872
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly32TargetInfo>::EmscriptenTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
Line
Count
Source
872
2
      : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {}
Unexecuted instantiation: clang::targets::EmscriptenTargetInfo<clang::targets::WebAssembly64TargetInfo>::EmscriptenTargetInfo(llvm::Triple const&, clang::TargetOptions const&)
873
};
874
875
} // namespace targets
876
} // namespace clang
877
#endif // LLVM_CLANG_LIB_BASIC_TARGETS_OSTARGETS_H