Skip to content

Commit

Permalink
Make clang report invalid target versions for all environment.
Browse files Browse the repository at this point in the history
Followup for llvm#75373

1. Make this feature not just available for android, but everyone.
2. Correct some target triples.
3. Add opencl to the environment type list.
  • Loading branch information
ZijunZhaoCCK committed Feb 2, 2024
1 parent 3d25a65 commit 4458696
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions llvm/lib/TargetParser/Triple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1236,9 +1236,8 @@ StringRef Triple::getEnvironmentVersionString() const {
if (getObjectFormat() != Triple::UnknownObjectFormat) {
StringRef ObjectFormatTypeName =
getObjectFormatTypeName(getObjectFormat());
const std::string &tmp = (Twine("-") + ObjectFormatTypeName).str();
StringRef Suffix = tmp;
EnvironmentName.consume_back(Suffix);
const std::string tmp = (Twine("-") + ObjectFormatTypeName).str();
EnvironmentName.consume_back(tmp);
}
}
return EnvironmentName;
Expand Down

0 comments on commit 4458696

Please sign in to comment.