File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
llvm/include/llvm/Support Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ inline LLVM_GET_TYPE_NAME_CONSTEXPR StringRef getTypeName() {
71
71
LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view Key = " getTypeName<" ;
72
72
LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view GetTypeNameStart =
73
73
Name.substr (Name.find (Key));
74
- static_assert (!GetTypeNameStart.empty (),
75
- " Unable to find the template parameter!" );
74
+ // TODO: SWDEV-517818 - Changed from static_assert to assert to ensure
75
+ // compiler compatibility
76
+ assert (!GetTypeNameStart.empty () && " Unable to find the template parameter!" );
76
77
LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view SubstitutionKey =
77
78
GetTypeNameStart.substr (Key.size ());
78
79
@@ -95,8 +96,10 @@ inline LLVM_GET_TYPE_NAME_CONSTEXPR StringRef getTypeName() {
95
96
: RmPrefixUnion;
96
97
97
98
LLVM_GET_TYPE_NAME_CONSTEXPR auto AnglePos = RmPrefixEnum.rfind (' >' );
98
- static_assert (AnglePos != std::string_view::npos,
99
- " Unable to find the closing '>'!" );
99
+ // TODO: SWDEV-517818 - Changed from static_assert to assert to ensure
100
+ // compiler compatibility
101
+ assert (AnglePos != std::string_view::npos &&
102
+ " Unable to find the closing '>'!" );
100
103
return RmPrefixEnum.substr (0 , AnglePos);
101
104
#else
102
105
// No known technique for statically extracting a type name on this compiler.
You can’t perform that action at this time.
0 commit comments