Skip to content

Commit 2bb3612

Browse files
authored
Merge pull request #15067 from ikesyo/dont-use-moved-value
[LangOptions] Avoid using a `std::move`d value
2 parents 738607d + 2a3b348 commit 2bb3612

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/Basic/LangOptions.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,25 +172,25 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
172172
// Set the "os" platform condition.
173173
if (Target.isMacOSX())
174174
addPlatformConditionValue(PlatformConditionKind::OS, "OSX");
175-
else if (triple.isTvOS())
175+
else if (Target.isTvOS())
176176
addPlatformConditionValue(PlatformConditionKind::OS, "tvOS");
177-
else if (triple.isWatchOS())
177+
else if (Target.isWatchOS())
178178
addPlatformConditionValue(PlatformConditionKind::OS, "watchOS");
179-
else if (triple.isiOS())
179+
else if (Target.isiOS())
180180
addPlatformConditionValue(PlatformConditionKind::OS, "iOS");
181-
else if (triple.isAndroid())
181+
else if (Target.isAndroid())
182182
addPlatformConditionValue(PlatformConditionKind::OS, "Android");
183-
else if (triple.isOSLinux())
183+
else if (Target.isOSLinux())
184184
addPlatformConditionValue(PlatformConditionKind::OS, "Linux");
185-
else if (triple.isOSFreeBSD())
185+
else if (Target.isOSFreeBSD())
186186
addPlatformConditionValue(PlatformConditionKind::OS, "FreeBSD");
187-
else if (triple.isOSWindows())
187+
else if (Target.isOSWindows())
188188
addPlatformConditionValue(PlatformConditionKind::OS, "Windows");
189-
else if (triple.isWindowsCygwinEnvironment())
189+
else if (Target.isWindowsCygwinEnvironment())
190190
addPlatformConditionValue(PlatformConditionKind::OS, "Cygwin");
191-
else if (triple.isPS4())
191+
else if (Target.isPS4())
192192
addPlatformConditionValue(PlatformConditionKind::OS, "PS4");
193-
else if (triple.isOSHaiku())
193+
else if (Target.isOSHaiku())
194194
addPlatformConditionValue(PlatformConditionKind::OS, "Haiku");
195195
else
196196
UnsupportedOS = true;

0 commit comments

Comments
 (0)