From 20126c9fd4afe2fe11510becccaa769332da302f Mon Sep 17 00:00:00 2001 From: Sam Powell Date: Wed, 9 Jun 2021 10:29:29 -0700 Subject: Reland "[llvm] llvm-tapi-diff" This is relanding commit d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 . This patch additionally addresses failures found in buildbots & 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 --- llvm/lib/TextAPI/Target.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/TextAPI/Target.cpp') diff --git a/llvm/lib/TextAPI/Target.cpp b/llvm/lib/TextAPI/Target.cpp index 4c33a5883247..35fe1bf65e6f 100644 --- a/llvm/lib/TextAPI/Target.cpp +++ b/llvm/lib/TextAPI/Target.cpp @@ -72,5 +72,11 @@ ArchitectureSet mapToArchitectureSet(ArrayRef Targets) { return Result; } +std::string getTargetTripleName(const Target &Targ) { + return (getArchitectureName(Targ.Arch) + "-apple-" + + getOSAndEnvironmentName(Targ.Platform)) + .str(); +} + } // end namespace MachO. } // end namespace llvm. -- cgit v1.2.3