[cfe-commits] r164907 - in /cfe/trunk: include/clang/Basic/ObjCRuntime.h lib/CodeGen/CGObjC.cpp lib/Driver/ToolChains.cpp lib/Driver/Tools.cpp runtime/compiler-rt/Makefile test/CodeGenObjC/optimized-setter-ios-device.m test/CodeGenObjC/optimized-

Bob Wilson bob.wilson at apple.com
Fri Oct 19 10:10:48 PDT 2012


On Oct 8, 2012, at 3:33 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote:

> Bob,
> 
>>   const Driver &D = getToolChain().getDriver();
>> -  llvm::Triple Triple = getToolChain().getTriple();
>> +  // Get the effective triple, which takes into account the deployment target.
>> +  std::string TripleStr = getToolChain().ComputeEffectiveClangTriple(Args);
>> +  llvm::Triple Triple(TripleStr);
> A lot of code down contains calls like
> getToolChain().getTriple().isFoo(). Should they be moved to use this
> Triple ?

(Sorry for the slow response.) That "effective triple" will generally be the same except for the OS version number on Darwin, and most of the Darwin version checks are using the information set by the Darwin toolchain's AddDeploymentTarget method rather than checking the triple directly.  This code could certainly use some reorganization to be more consistent, but I don't think there's any reason to use the ComputeEffectiveClangTriple more widely.



More information about the cfe-commits mailing list