[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 20 04:58:34 PDT 2021
mstorsjo added a comment.
In D98278#2639481 <https://reviews.llvm.org/D98278#2639481>, @zero9178 wrote:
> Changes in this patch are based on this one https://reviews.llvm.org/D97472. In the discussion there it was deemed not a good solution to use case insensitive comparison as that would make any other matches case insensitive as well, which might be a source of bugs.
> Prior to this patch it worke with an MSVC configuration already as the strings were correctly hardcoded for the MSVC STL. Problem was when using any other compiler configuration on Windows. In my case I am using your llvm-mingw distribution to build all of LLVM and since it uses libc++ it produces different error messages from the one in MSVC STL. I observed the same problem when using GCC on Windows and if one were to theoretically use libc++ with clang-cl in a MSVC environment, tests would be failing as well due to a mismatch in error strings.
Ok, I think I see - so longterm (i.e. up until to a few months ago), we've just had some hardcoded (case insensitive) regexes in some testcases, and these didn't match for z/OS. As part of efforts to make it work for z/OS, a number of different incarnations have been used, and using a build-time tool to extract the real message looks like the most flexible solution in the end. And that also allows making it work properly for cases on Windows, where it's hard to know exactly which stdlib is going to be used at runtime and which kind of messages it produces.
Ok, so that makes sense to me, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98278/new/
https://reviews.llvm.org/D98278
More information about the cfe-commits
mailing list