File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
llvm/lib/Target/AMDGPU/Utils Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,11 @@ using namespace llvm::AMDGPU;
72
72
class GetMember ##member { \
73
73
public: \
74
74
static const MCExpr *Phony; \
75
- template <typename U, typename std::enable_if_t <IsMCExpr##member::RESULT, \
76
- U> * = nullptr > \
77
- static const MCExpr *&Get (U &C) { \
78
- assert (IsMCExpr##member::RESULT && \
79
- " Trying to retrieve member that does not exist." ); \
80
- return C.member ; \
81
- } \
82
- template <typename U, typename std::enable_if_t <!IsMCExpr##member::RESULT, \
83
- U> * = nullptr > \
84
- static const MCExpr *&Get (U &C) { \
85
- return Phony; \
75
+ template <typename U> static const MCExpr *&Get (U &C) { \
76
+ if constexpr (IsMCExpr##member::RESULT) \
77
+ return C.member ; \
78
+ else \
79
+ return Phony; \
86
80
} \
87
81
}; \
88
82
const MCExpr *GetMember##member::Phony = nullptr ;
You can’t perform that action at this time.
0 commit comments