Skip to content

Commit 3347d48

Browse files
committed
NFC: Simplify code by using Triple.getOSAndEnvironmentName
This avoids the need to check if the environment component is set.
1 parent fe1b75f commit 3347d48

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/IDE/Utils.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,8 @@ static std::string adjustClangTriple(StringRef TripleStr) {
226226
}
227227
break;
228228
}
229-
OS << '-' << Triple.getVendorName() << '-' << Triple.getOSName();
230-
if (Triple.hasEnvironment())
231-
OS << '-' << Triple.getEnvironmentName();
229+
OS << '-' << Triple.getVendorName() << '-' <<
230+
Triple.getOSAndEnvironmentName();
232231
OS.flush();
233232
return Result;
234233
}

0 commit comments

Comments
 (0)