File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
llvm/lib/ExecutionEngine/JITLink Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -264,9 +264,9 @@ template <EdgeKind_aarch32 K> constexpr bool isThumb() {
264
264
265
265
template <EdgeKind_aarch32 K> constexpr bool hasOpcode (...) { return false ; }
266
266
template <EdgeKind_aarch32 K, auto _ = FixupInfo<K>::Opcode>
267
- constexpr bool hasOpcode (int ) {
268
- return true ;
269
- }
267
+ constexpr bool hasOpcode (int ) { return true ; }
268
+ template <EdgeKind_aarch32 K, auto _ = FixupInfo<K>::Opcode.Lo>
269
+ constexpr bool hasOpcode ( unsigned ) { return true ; }
270
270
271
271
template <EdgeKind_aarch32 K> static bool checkOpcodeArm (uint32_t Wd) {
272
272
return (Wd & FixupInfo<K>::OpcodeMask) == FixupInfo<K>::Opcode;
@@ -282,12 +282,11 @@ template <EdgeKind_aarch32 K>
282
282
static std::unique_ptr<FixupInfoBase> initFixupInfo () {
283
283
auto Entry = std::make_unique<FixupInfo<K>>();
284
284
if constexpr (hasOpcode<K>(0 )) {
285
+ static_assert (isArm<K>() != isThumb<K>(), " Classes are mutually exclusive" );
285
286
if constexpr (isArm<K>())
286
287
Entry->checkOpcode = checkOpcodeArm<K>;
287
- else if constexpr (isThumb<K>())
288
+ if constexpr (isThumb<K>())
288
289
Entry->checkOpcode = checkOpcodeThumb<K>;
289
- else
290
- llvm_unreachable (" Visited edge kinds must either be Arm or Thumb" );
291
290
}
292
291
return Entry;
293
292
}
You can’t perform that action at this time.
0 commit comments