[Lldb-commits] [lldb] r333032 - Avoid using header from Host/macosx when not testing an apple build.
James Y Knight via lldb-commits
lldb-commits at lists.llvm.org
Tue May 22 14:49:41 PDT 2018
Author: jyknight
Date: Tue May 22 14:49:41 2018
New Revision: 333032
URL: http://llvm.org/viewvc/llvm-project?rev=333032&view=rev
Log:
Avoid using header from Host/macosx when not testing an apple build.
Modified:
lldb/trunk/unittests/Host/HostInfoTest.cpp
Modified: lldb/trunk/unittests/Host/HostInfoTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Host/HostInfoTest.cpp?rev=333032&r1=333031&r2=333032&view=diff
==============================================================================
--- lldb/trunk/unittests/Host/HostInfoTest.cpp (original)
+++ lldb/trunk/unittests/Host/HostInfoTest.cpp Tue May 22 14:49:41 2018
@@ -8,11 +8,14 @@
//===----------------------------------------------------------------------===//
#include "lldb/Host/HostInfo.h"
-#include "lldb/Host/macosx/HostInfoMacOSX.h"
#include "lldb/lldb-defines.h"
#include "TestingSupport/TestUtilities.h"
#include "gtest/gtest.h"
+#ifdef __APPLE__
+#include "lldb/Host/macosx/HostInfoMacOSX.h"
+#endif
+
using namespace lldb_private;
using namespace llvm;
@@ -47,6 +50,8 @@ TEST_F(HostInfoTest, GetAugmentedArchSpe
}
+#ifdef __APPLE__
+
struct HostInfoMacOSXTest : public HostInfoMacOSX {
static std::string ComputeClangDir(std::string lldb_shlib_path,
bool verify = false) {
@@ -58,7 +63,6 @@ struct HostInfoMacOSXTest : public HostI
};
-#ifdef __APPLE__
TEST_F(HostInfoTest, MacOSX) {
// This returns whatever the POSIX fallback returns.
std::string posix = "/usr/lib/liblldb.dylib";
More information about the lldb-commits
mailing list