diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-31 23:42:23 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-31 23:42:23 +0000 |
| commit | d3bafe3e41aab45def514440d72fe43b2072c56d (patch) | |
| tree | 97df19fa92985d2e03020e1e5383cbc616e87916 | |
| parent | 24bbfed22185c92ca00c9f39a8bdb5214d90589c (diff) | |
| download | bcm5719-llvm-d3bafe3e41aab45def514440d72fe43b2072c56d.tar.gz bcm5719-llvm-d3bafe3e41aab45def514440d72fe43b2072c56d.zip | |
MCJIT: ensure that cygwin is identified properly
Cygwin is now a proper environment rather than an OS. This updates the MCJIT
tests to avoid execution on Cygwin. This fixes native cygwin tests.
llvm-svn: 205266
| -rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp | 2 | ||||
| -rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h | 10 | ||||
| -rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp index 092213277d1..3813d59dbd1 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp @@ -135,6 +135,8 @@ protected: // The operating systems below are known to be sufficiently incompatible // that they will fail the MCJIT C API tests. UnsupportedOSs.push_back(Triple::Cygwin); + + UnsupportedEnvironments.push_back(Triple::Cygnus); } virtual void SetUp() { diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h index 7b6e39fb238..a48c0713f9b 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h @@ -71,10 +71,15 @@ protected: /// Returns true if the host OS is known to support MCJIT bool OSSupportsMCJIT() { Triple Host(HostTriple); + + if (std::find(UnsupportedEnvironments.begin(), UnsupportedEnvironments.end(), + Host.getEnvironment()) != UnsupportedEnvironments.end()) + return false; + if (std::find(UnsupportedOSs.begin(), UnsupportedOSs.end(), Host.getOS()) - == UnsupportedOSs.end()) { + == UnsupportedOSs.end()) return true; - } + return false; } @@ -83,6 +88,7 @@ protected: SmallVector<Triple::ArchType, 1> HasSubArchs; SmallVector<std::string, 2> SupportedSubArchs; // We need to own the memory SmallVector<Triple::OSType, 4> UnsupportedOSs; + SmallVector<Triple::EnvironmentType, 1> UnsupportedEnvironments; }; } // namespace llvm diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h index b2cb3bbef6e..25de312e0e8 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h @@ -304,6 +304,8 @@ protected: // should be kept in sync. UnsupportedOSs.push_back(Triple::Cygwin); UnsupportedOSs.push_back(Triple::Darwin); + + UnsupportedEnvironments.push_back(Triple::Cygnus); } void createJIT(Module *M) { |

