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() {
7171 LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view Key = " getTypeName<" ;
7272 LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view GetTypeNameStart =
7373 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!" );
7677 LLVM_GET_TYPE_NAME_CONSTEXPR std::string_view SubstitutionKey =
7778 GetTypeNameStart.substr (Key.size ());
7879
@@ -95,8 +96,10 @@ inline LLVM_GET_TYPE_NAME_CONSTEXPR StringRef getTypeName() {
9596 : RmPrefixUnion;
9697
9798 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 '>'!" );
100103 return RmPrefixEnum.substr (0 , AnglePos);
101104#else
102105 // No known technique for statically extracting a type name on this compiler.
You can’t perform that action at this time.
0 commit comments