Make the auto-detection hack for the iOS simulator set the target triple correctly.  Getting the target triple wrong mostly appears to work, but messes up in subtle cases; for example, we incorrectly conclude that fwrite is actually named fwrite$UNIX2003.  Also shuffles around the auto-detection code a bit to try and make it a bit more reliable.  Fixes <rdar://problem/10664848>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148249 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed