@@ -52,15 +52,6 @@ namespace RISCV {
52
52
#include " RISCVGenSearchableTables.inc"
53
53
} // namespace RISCV
54
54
55
- // Report an error but don't ask the user to report a bug.
56
- // TODO: Remove these wrappers.
57
- [[noreturn]] static void reportError (const char *Reason) {
58
- reportFatalUsageError (Reason);
59
- }
60
- [[noreturn]] static void reportError (Error Err) {
61
- reportFatalUsageError (std::move (Err));
62
- }
63
-
64
55
namespace RISCVABI {
65
56
ABI computeTargetABI (const Triple &TT, const FeatureBitset &FeatureBits,
66
57
StringRef ABIName) {
@@ -97,15 +88,15 @@ ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits,
97
88
if ((TargetABI == RISCVABI::ABI::ABI_ILP32E ||
98
89
(TargetABI == ABI_Unknown && IsRVE && !IsRV64)) &&
99
90
FeatureBits[RISCV::FeatureStdExtD])
100
- reportError (" ILP32E cannot be used with the D ISA extension" );
91
+ reportFatalUsageError (" ILP32E cannot be used with the D ISA extension" );
101
92
102
93
if (TargetABI != ABI_Unknown)
103
94
return TargetABI;
104
95
105
96
// If no explicit ABI is given, try to compute the default ABI.
106
97
auto ISAInfo = RISCVFeatures::parseFeatureBits (IsRV64, FeatureBits);
107
98
if (!ISAInfo)
108
- reportError (ISAInfo.takeError ());
99
+ reportFatalUsageError (ISAInfo.takeError ());
109
100
return getTargetABI ((*ISAInfo)->computeDefaultABI ());
110
101
}
111
102
@@ -137,12 +128,12 @@ namespace RISCVFeatures {
137
128
138
129
void validate (const Triple &TT, const FeatureBitset &FeatureBits) {
139
130
if (TT.isArch64Bit () && !FeatureBits[RISCV::Feature64Bit])
140
- reportError (" RV64 target requires an RV64 CPU" );
131
+ reportFatalUsageError (" RV64 target requires an RV64 CPU" );
141
132
if (!TT.isArch64Bit () && !FeatureBits[RISCV::Feature32Bit])
142
- reportError (" RV32 target requires an RV32 CPU" );
133
+ reportFatalUsageError (" RV32 target requires an RV32 CPU" );
143
134
if (FeatureBits[RISCV::Feature32Bit] &&
144
135
FeatureBits[RISCV::Feature64Bit])
145
- reportError (" RV32 and RV64 can't be combined" );
136
+ reportFatalUsageError (" RV32 and RV64 can't be combined" );
146
137
}
147
138
148
139
llvm::Expected<std::unique_ptr<RISCVISAInfo>>
0 commit comments