[PATCH] D60644: [compiler-rt][builtins][sanitizers] Guard test cases with macros with GLIBC* macros
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 12:39:42 PDT 2019
amyk marked an inline comment as done.
amyk added inline comments.
================
Comment at: compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc:77
+ // that maybe related to _GLIBCXX_USE_CXX11_ABI and the string assigned.
+#if _GLIBCXX_USE_CXX11_ABI
test<group>(&getgrnam, any_group.c_str());
----------------
hubert.reinterpretcast wrote:
> Both here and below, the test is skipped if `_GLIBCXX_USE_CXX11_ABI` is not defined at all (for example, if the C++ library is not libstdc++).
Yes, you are right. Thank you for pointing that out. Does something like this make sense, and is more suitable?
```
#if (defined(_GLIBCXX_USE_CXX11_ABI) && (_GLIBCXX_USE_CXX11_ABI)) || \
!defined(_GLIBCXX_USE_CXX11_ABI)
test<group>(&getgrnam, any_group.c_str());
#endif
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60644/new/
https://reviews.llvm.org/D60644
More information about the llvm-commits
mailing list