aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/Target.cpp
diff options
context:
space:
mode:
authorSam Powell <sam@sampowell.dev>2021-06-09 21:13:31 -0700
committerCyndy Ishida <cyndy_ishida@apple.com>2021-06-09 21:17:34 -0700
commit5b5ab80e31958b3b4a52de13ce4306a2c6c8765d (patch)
treef080cb96a44ede65df1c40ef6102988ef4fcb76d /llvm/lib/TextAPI/Target.cpp
parent5fc2673fbce247e107094b28c22cbb2d5f1691a8 (diff)
downloadllvm-5b5ab80e31958b3b4a52de13ce4306a2c6c8765d.zip
llvm-5b5ab80e31958b3b4a52de13ce4306a2c6c8765d.tar.gz
llvm-5b5ab80e31958b3b4a52de13ce4306a2c6c8765d.tar.bz2
Reland "[llvm] llvm-tapi-diff"
This is relanding commit d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 . This patch additionally addresses failures found in buildbots due to unstable build ordering & post review comments. This patch introduces a new tool, llvm-tapi-diff, that compares and returns the diff of two TBD files. Reviewed By: ributzka, JDevlieghere Differential Revision: https://reviews.llvm.org/D101835
Diffstat (limited to 'llvm/lib/TextAPI/Target.cpp')
-rw-r--r--llvm/lib/TextAPI/Target.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/TextAPI/Target.cpp b/llvm/lib/TextAPI/Target.cpp
index 4c33a58..35fe1bf 100644
--- a/llvm/lib/TextAPI/Target.cpp
+++ b/llvm/lib/TextAPI/Target.cpp
@@ -72,5 +72,11 @@ ArchitectureSet mapToArchitectureSet(ArrayRef<Target> Targets) {
return Result;
}
+std::string getTargetTripleName(const Target &Targ) {
+ return (getArchitectureName(Targ.Arch) + "-apple-" +
+ getOSAndEnvironmentName(Targ.Platform))
+ .str();
+}
+
} // end namespace MachO.
} // end namespace llvm.