[llvm] llvm-tli-checker: Remove TLINameList helper struct (PR #142535)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 08:52:02 PDT 2025
================
@@ -110,43 +110,31 @@ static std::string getPrintableName(StringRef Name) {
return OutputName;
}
-// Store all the names that TargetLibraryInfo knows about; the bool indicates
-// whether TLI has it marked as "available" for the target of interest.
-// This is a vector to preserve the sorted order for better reporting.
-struct TLINameList : std::vector<std::pair<StringRef, bool>> {
- // Record all the TLI info in the vector.
- void initialize(StringRef TargetTriple);
- // Print out what we found.
- void dump();
-};
-static TLINameList TLINames;
-
-void TLINameList::initialize(StringRef TargetTriple) {
----------------
serge-sans-paille wrote:
I like the overall idea, but I think you would have a better encapsulation with a class that would take the `TargetTriple` as its constructor, perform initialization and keeping a TLi reference as member, and provide method to dump TLI entries / number of entries. that would avoid leaking some variable in the context. No need of a static variable for this.
https://github.com/llvm/llvm-project/pull/142535
More information about the llvm-commits
mailing list