@@ -79,122 +79,6 @@ extern "C" void LLVMRustTimeTraceProfilerFinish(const char *FileName) {
7979 timeTraceProfilerCleanup ();
8080}
8181
82- #ifdef LLVM_COMPONENT_X86
83- #define SUBTARGET_X86 SUBTARGET (X86)
84- #else
85- #define SUBTARGET_X86
86- #endif
87-
88- #ifdef LLVM_COMPONENT_ARM
89- #define SUBTARGET_ARM SUBTARGET (ARM)
90- #else
91- #define SUBTARGET_ARM
92- #endif
93-
94- #ifdef LLVM_COMPONENT_AARCH64
95- #define SUBTARGET_AARCH64 SUBTARGET (AArch64)
96- #else
97- #define SUBTARGET_AARCH64
98- #endif
99-
100- #ifdef LLVM_COMPONENT_AVR
101- #define SUBTARGET_AVR SUBTARGET (AVR)
102- #else
103- #define SUBTARGET_AVR
104- #endif
105-
106- #ifdef LLVM_COMPONENT_M68k
107- #define SUBTARGET_M68K SUBTARGET (M68k)
108- #else
109- #define SUBTARGET_M68K
110- #endif
111-
112- #ifdef LLVM_COMPONENT_CSKY
113- #define SUBTARGET_CSKY SUBTARGET (CSKY)
114- #else
115- #define SUBTARGET_CSKY
116- #endif
117-
118- #ifdef LLVM_COMPONENT_MIPS
119- #define SUBTARGET_MIPS SUBTARGET (Mips)
120- #else
121- #define SUBTARGET_MIPS
122- #endif
123-
124- #ifdef LLVM_COMPONENT_POWERPC
125- #define SUBTARGET_PPC SUBTARGET (PPC)
126- #else
127- #define SUBTARGET_PPC
128- #endif
129-
130- #ifdef LLVM_COMPONENT_SYSTEMZ
131- #define SUBTARGET_SYSTEMZ SUBTARGET (SystemZ)
132- #else
133- #define SUBTARGET_SYSTEMZ
134- #endif
135-
136- #ifdef LLVM_COMPONENT_MSP430
137- #define SUBTARGET_MSP430 SUBTARGET (MSP430)
138- #else
139- #define SUBTARGET_MSP430
140- #endif
141-
142- #ifdef LLVM_COMPONENT_RISCV
143- #define SUBTARGET_RISCV SUBTARGET (RISCV)
144- #else
145- #define SUBTARGET_RISCV
146- #endif
147-
148- #ifdef LLVM_COMPONENT_SPARC
149- #define SUBTARGET_SPARC SUBTARGET (Sparc)
150- #else
151- #define SUBTARGET_SPARC
152- #endif
153-
154- #ifdef LLVM_COMPONENT_XTENSA
155- #define SUBTARGET_XTENSA SUBTARGET (XTENSA)
156- #else
157- #define SUBTARGET_XTENSA
158- #endif
159-
160- #ifdef LLVM_COMPONENT_HEXAGON
161- #define SUBTARGET_HEXAGON SUBTARGET (Hexagon)
162- #else
163- #define SUBTARGET_HEXAGON
164- #endif
165-
166- #ifdef LLVM_COMPONENT_LOONGARCH
167- #define SUBTARGET_LOONGARCH SUBTARGET (LoongArch)
168- #else
169- #define SUBTARGET_LOONGARCH
170- #endif
171-
172- #define GEN_SUBTARGETS \
173- SUBTARGET_X86 \
174- SUBTARGET_ARM \
175- SUBTARGET_AARCH64 \
176- SUBTARGET_AVR \
177- SUBTARGET_M68K \
178- SUBTARGET_CSKY \
179- SUBTARGET_MIPS \
180- SUBTARGET_PPC \
181- SUBTARGET_SYSTEMZ \
182- SUBTARGET_MSP430 \
183- SUBTARGET_SPARC \
184- SUBTARGET_HEXAGON \
185- SUBTARGET_XTENSA \
186- SUBTARGET_RISCV \
187- SUBTARGET_LOONGARCH
188-
189- #define SUBTARGET (x ) \
190- namespace llvm { \
191- extern const SubtargetFeatureKV x##FeatureKV[]; \
192- extern const SubtargetFeatureKV x##SubTypeKV[]; \
193- }
194-
195- GEN_SUBTARGETS
196- #undef SUBTARGET
197-
19882// This struct and various functions are sort of a hack right now, but the
19983// problem is that we've got in-memory LLVM modules after we generate and
20084// optimize all codegen-units for one compilation in rustc. To be compatible
@@ -340,14 +224,6 @@ static FloatABI::ABIType fromRust(LLVMRustFloatABI RustFloatAbi) {
340224 report_fatal_error (" Bad FloatABI." );
341225}
342226
343- // / getLongestEntryLength - Return the length of the longest entry in the table.
344- template <typename KV> static size_t getLongestEntryLength (ArrayRef<KV> Table) {
345- size_t MaxLen = 0 ;
346- for (auto &I : Table)
347- MaxLen = std::max (MaxLen, std::strlen (I.Key ));
348- return MaxLen;
349- }
350-
351227extern " C" void LLVMRustPrintTargetCPUs (LLVMTargetMachineRef TM,
352228 RustStringRef OutStr) {
353229 ArrayRef<SubtargetSubTypeKV> CPUTable =
0 commit comments