From 4eed800b18abaeba3082bf950fbe5c3020c4b592 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Fri, 11 Sep 2020 12:17:51 +0100 Subject: [PATCH] [NFC] Fix the signature and definition of findByPrefix In https://reviews.llvm.org/rG257b29715bb27b7d9f6c3c40c481b6a4af0b37e5, the definition of OptTable::Info::Flags was changed from `unsigned short` to `unsigned int`, but the definition/declaration of OptTable::findByPrefix wasn't updated to reflect that. This patch updates findByPrefix accordingly. --- llvm/include/llvm/Option/OptTable.h | 2 +- llvm/lib/Option/OptTable.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Option/OptTable.h b/llvm/include/llvm/Option/OptTable.h index c0742ebc70acc..58c09b23d237c 100644 --- a/llvm/include/llvm/Option/OptTable.h +++ b/llvm/include/llvm/Option/OptTable.h @@ -152,7 +152,7 @@ class OptTable { /// /// \return The vector of flags which start with Cur. std::vector findByPrefix(StringRef Cur, - unsigned short DisableFlags) const; + unsigned int DisableFlags) const; /// Find the OptTable option that most closely matches the given string. /// diff --git a/llvm/lib/Option/OptTable.cpp b/llvm/lib/Option/OptTable.cpp index 740e02a9d2f0e..304c09fff9d28 100644 --- a/llvm/lib/Option/OptTable.cpp +++ b/llvm/lib/Option/OptTable.cpp @@ -228,7 +228,7 @@ OptTable::suggestValueCompletions(StringRef Option, StringRef Arg) const { } std::vector -OptTable::findByPrefix(StringRef Cur, unsigned short DisableFlags) const { +OptTable::findByPrefix(StringRef Cur, unsigned int DisableFlags) const { std::vector Ret; for (size_t I = FirstSearchableIndex, E = OptionInfos.size(); I < E; I++) { const Info &In = OptionInfos[I];