[Lldb-commits] [PATCH] D31129: Remove remaining platform specific code from FileSpec

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 20 13:06:15 PDT 2017


zturner updated this revision to Diff 92373.
zturner added a comment.

See what you think about this.  I've created a folder called `Mocks` under `Utility`, and created a new target out of it.  `UtilityTests` links against it, and so does `InterpreterTests`.  To do this I had to add the lldb project root as an include directory, this way you can write `#include "unittests/Utility/Mocks/MockTildeExpressionResolver.h"`.  Another possibility would be to create `lldb/unittests/Mocks/Mocks/Utility`, and then add `lldb/unittests/Mocks` as an include folder.  This way you could write `#include "Mocks/Utility/MockTildeExpressionResolver.h"`.  I don't have a strong preference either way.

I explicitly chose NOT to make one single target for all mocks (although there is only one right now obviously), because then you would have `UtilityTests` bringing in mocks from projects it doesn't depend on, and thus it would link against those projects as well, breaking the library layering.


https://reviews.llvm.org/D31129

Files:
  lldb/include/lldb/Host/FileSpec.h
  lldb/include/lldb/Utility/TildeExpressionResolver.h
  lldb/source/API/SBDeclaration.cpp
  lldb/source/API/SBFileSpec.cpp
  lldb/source/API/SBFileSpecList.cpp
  lldb/source/API/SBLineEntry.cpp
  lldb/source/Host/common/FileSpec.cpp
  lldb/source/Host/windows/FileSystem.cpp
  lldb/source/Host/windows/HostInfoWindows.cpp
  lldb/source/Target/TargetList.cpp
  lldb/source/Utility/TildeExpressionResolver.cpp
  lldb/unittests/CMakeLists.txt
  lldb/unittests/Interpreter/CMakeLists.txt
  lldb/unittests/Interpreter/TestCompletion.cpp
  lldb/unittests/Utility/CMakeLists.txt
  lldb/unittests/Utility/Mocks/CMakeLists.txt
  lldb/unittests/Utility/Mocks/MockTildeExpressionResolver.cpp
  lldb/unittests/Utility/Mocks/MockTildeExpressionResolver.h
  lldb/unittests/Utility/TildeExpressionResolverTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31129.92373.patch
Type: text/x-patch
Size: 22476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170320/4ffbdac9/attachment-0001.bin>


More information about the lldb-commits mailing list