aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/Target.cpp
diff options
context:
space:
mode:
authorSam Powell <sam@sampowell.dev>2021-06-03 11:11:23 -0700
committerCyndy Ishida <cyndy_ishida@apple.com>2021-06-03 11:38:00 -0700
commitd1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 (patch)
tree159b889e441d384ce9d7ae385c5d8752c262596d /llvm/lib/TextAPI/Target.cpp
parent44cdf771fe12ca528403cec9e6a8438b5107133b (diff)
downloadllvm-d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096.zip
llvm-d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096.tar.gz
llvm-d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096.tar.bz2
[llvm] llvm-tapi-diff
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.