[PATCH] D33059: Create an shared include directory for gtest helper functions
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 08:21:10 PDT 2017
zturner updated this revision to Diff 101353.
zturner added a comment.
1. Moved the code from `UnitTestHelpers` to `UnitTestHelpers/Support`. If this is going to be a general purpose location for sharing code amongst unit tests, then it can't be specific to Support. For example, you might have need for specific matchers related to CodeGen or debug info that nothing outside of those unit tests would ever need to use, but that should still be usable by anything that depends on those. For example, you could write a matcher related to a `SelectionDAG` and it could be used in a general purpose `CodeGen` unit test or a target specific one. On the other hand, such a shared matcher doesn't belong next to a `Support` matcher because then anything that used `Support` would have to link against `CodeGen`, and obviously we don't want `SupportTests` and `ADTTests` linking `CodeGen`. We don't have this scenario yet, but I think we need to get the layout right the first time so it's ready to use immediately.
2. Got rid of `StringRef.h`. This was only there to have a formatter for `StringRef`, but due to the design of gmock, all printers really need to be declared in one master file. You don't want someone to get different output depending on whether they remember to include a specific header or not, and when you've got something like trying to print `Expected<T>`, the printer for `Expected<T>` needs to be able to find the printer for `T` or it will print a really ugly version of it, and the only way to remove this burden from the user is to make sure all custom printers are in one file.
https://reviews.llvm.org/D33059
Files:
llvm/cmake/modules/AddLLVM.cmake
llvm/unittests/DebugInfo/CodeView/CMakeLists.txt
llvm/unittests/DebugInfo/CodeView/ErrorChecking.h
llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
llvm/unittests/DebugInfo/PDB/CMakeLists.txt
llvm/unittests/DebugInfo/PDB/ErrorChecking.h
llvm/unittests/DebugInfo/PDB/HashTableTest.cpp
llvm/unittests/DebugInfo/PDB/MSFBuilderTest.cpp
llvm/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
llvm/unittests/DebugInfo/PDB/StringTableBuilderTest.cpp
llvm/unittests/DebugInfo/PDB/TypeServerHandlerTest.cpp
llvm/unittests/Support/BinaryStreamTest.cpp
llvm/unittests/Support/CMakeLists.txt
llvm/utils/unittest/CMakeLists.txt
llvm/utils/unittest/Helpers/CMakeLists.txt
llvm/utils/unittest/Helpers/LLVMBuild.txt
llvm/utils/unittest/Helpers/UnitTestHelpers/CMakeLists.txt
llvm/utils/unittest/Helpers/UnitTestHelpers/LLVMBuild.txt
llvm/utils/unittest/Helpers/UnitTestHelpers/Support/CMakeLists.txt
llvm/utils/unittest/Helpers/UnitTestHelpers/Support/Error.cpp
llvm/utils/unittest/Helpers/UnitTestHelpers/Support/LLVMBuild.txt
llvm/utils/unittest/Helpers/include/UnitTestHelpers/Support/Error.h
llvm/utils/unittest/Helpers/include/UnitTestHelpers/Support/SupportHelpers.h
llvm/utils/unittest/LLVMBuild.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33059.101353.patch
Type: text/x-patch
Size: 71256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170604/0f467268/attachment-0001.bin>
More information about the llvm-commits
mailing list