From 6cdef0efb7bf62cc44e80cd0c8973eda26d09db4 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 7 Dec 2017 19:04:10 +0000 Subject: [driver] Set the 'simulator' environment for Darwin when compiling for iOS/tvOS/watchOS simulator rdar://35135215 Differential Revision: https://reviews.llvm.org/D40682 llvm-svn: 320073 --- clang/lib/CodeGen/CGObjCMac.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CGObjCMac.cpp') diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 6c47da8ab99..ef4e6cd4f01 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -4885,10 +4885,7 @@ void CGObjCCommonMac::EmitImageInfo() { } // Indicate whether we're compiling this to run on a simulator. - const llvm::Triple &Triple = CGM.getTarget().getTriple(); - if ((Triple.isiOS() || Triple.isWatchOS()) && - (Triple.getArch() == llvm::Triple::x86 || - Triple.getArch() == llvm::Triple::x86_64)) + if (CGM.getTarget().getTriple().isSimulatorEnvironment()) Mod.addModuleFlag(llvm::Module::Error, "Objective-C Is Simulated", eImageInfo_ImageIsSimulated); -- cgit v1.2.3