diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-12-07 19:04:10 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-12-07 19:04:10 +0000 |
commit | 6cdef0efb7bf62cc44e80cd0c8973eda26d09db4 (patch) | |
tree | 643e2443aca590b913c107f648045d420f6bffb0 /clang/lib/CodeGen/CGObjCMac.cpp | |
parent | d182aaa69daf3c62ab302ec64356169575e277a2 (diff) | |
download | bcm5719-llvm-6cdef0efb7bf62cc44e80cd0c8973eda26d09db4.tar.gz bcm5719-llvm-6cdef0efb7bf62cc44e80cd0c8973eda26d09db4.zip |
[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
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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); |