зеркало из https://github.com/microsoft/clang-1.git
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
ce0d89744b
Коммит
4e494cf563
|
@ -1020,24 +1020,15 @@ static bool hasTrivialSetExpr(const ObjCPropertyImplDecl *PID) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool UseOptimizedSetter(CodeGenModule &CGM) {
|
||||
static bool UseOptimizedSetter(CodeGenModule &CGM) {
|
||||
if (CGM.getLangOptions().getGC() != LangOptions::NonGC)
|
||||
return false;
|
||||
const TargetInfo &Target = CGM.getContext().getTargetInfo();
|
||||
StringRef TargetPlatform = Target.getPlatformName();
|
||||
if (TargetPlatform.empty())
|
||||
|
||||
if (Target.getPlatformName() != "macosx")
|
||||
return false;
|
||||
VersionTuple TargetMinVersion = Target.getPlatformMinVersion();
|
||||
|
||||
if (TargetPlatform.compare("macosx") ||
|
||||
TargetMinVersion.getMajor() <= 9)
|
||||
return false;
|
||||
|
||||
unsigned minor = 0;
|
||||
if (llvm::Optional<unsigned> Minor = TargetMinVersion.getMinor())
|
||||
minor = *Minor;
|
||||
|
||||
return (minor >= 8);
|
||||
|
||||
return Target.getPlatformMinVersion() >= VersionTuple(10, 8);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче