aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h')
-rw-r--r--unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h b/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
index 7b6e39f..a48c071 100644
--- a/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
+++ b/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