[llvm] r205266 - MCJIT: ensure that cygwin is identified properly
Saleem Abdulrasool
compnerd at compnerd.org
Mon Mar 31 16:42:23 PDT 2014
Author: compnerd
Date: Mon Mar 31 18:42:23 2014
New Revision: 205266
URL: http://llvm.org/viewvc/llvm-project?rev=205266&view=rev
Log:
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.
Modified:
llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp?rev=205266&r1=205265&r2=205266&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp Mon Mar 31 18:42:23 2014
@@ -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() {
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h?rev=205266&r1=205265&r2=205266&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h (original)
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h Mon Mar 31 18:42:23 2014
@@ -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
Modified: llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h?rev=205266&r1=205265&r2=205266&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h (original)
+++ llvm/trunk/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h Mon Mar 31 18:42:23 2014
@@ -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) {
More information about the llvm-commits
mailing list