[llvm] 42ce6f1 - llvm-tli-checker: Print custom name instead of standard name (#178265)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 27 10:23:43 PST 2026


Author: Matt Arsenault
Date: 2026-01-27T18:23:37Z
New Revision: 42ce6f1b532d21197a8207f4ccd0b6f93220807e

URL: https://github.com/llvm/llvm-project/commit/42ce6f1b532d21197a8207f4ccd0b6f93220807e
DIFF: https://github.com/llvm/llvm-project/commit/42ce6f1b532d21197a8207f4ccd0b6f93220807e.diff

LOG: llvm-tli-checker: Print custom name instead of standard name (#178265)

Previously this always printed the standard name if the function
was available, leaving any custom name override untested. Print the
target's name instead. The message should possibly include the standard
name for reference.

Closes #142537

Added: 
    

Modified: 
    llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp b/llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp
index 0b606afb44cb9..b558236a0979d 100644
--- a/llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp
+++ b/llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp
@@ -129,10 +129,19 @@ static void dumpTLIEntries(const TargetLibraryInfo &TLI) {
   for (unsigned FI = LibFunc::Begin_LibFunc; FI != LibFunc::End_LibFunc; ++FI) {
     LibFunc LF = static_cast<LibFunc>(FI);
     bool IsAvailable = TLI.has(LF);
-    StringRef FuncName = TargetLibraryInfo::getStandardName(LF);
 
     outs() << (IsAvailable ? "    " : "not ") << "available: ";
-    printPrintableName(outs(), FuncName) << '\n';
+
+    if (IsAvailable) {
+      // Print the (possibly custom) name.
+      // TODO: Should we include the standard name in the printed line?
+      printPrintableName(outs(), TLI.getName(LF));
+    } else {
+      // If it's not available, refer to it by the standard name.
+      printPrintableName(outs(), TargetLibraryInfo::getStandardName(LF));
+    }
+
+    outs() << '\n';
   }
 }
 


        


More information about the llvm-commits mailing list