[llvm] 859b5c7 - [TextAPI] Use std::remove_reference_t (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 22 21:18:37 PDT 2023
Author: Kazu Hirata
Date: 2023-10-22T21:18:26-07:00
New Revision: 859b5c732545d83a7ccfa4b1b6aa36a23d18e4b4
URL: https://github.com/llvm/llvm-project/commit/859b5c732545d83a7ccfa4b1b6aa36a23d18e4b4
DIFF: https://github.com/llvm/llvm-project/commit/859b5c732545d83a7ccfa4b1b6aa36a23d18e4b4.diff
LOG: [TextAPI] Use std::remove_reference_t (NFC)
Added:
Modified:
llvm/include/llvm/TextAPI/InterfaceFile.h
llvm/include/llvm/TextAPI/SymbolSet.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/TextAPI/InterfaceFile.h b/llvm/include/llvm/TextAPI/InterfaceFile.h
index 88139d8506524b3..ae2bf78403f4f13 100644
--- a/llvm/include/llvm/TextAPI/InterfaceFile.h
+++ b/llvm/include/llvm/TextAPI/InterfaceFile.h
@@ -352,9 +352,8 @@ class InterfaceFile {
}
/// Add a symbol to the symbols list or extend an existing one.
- template <typename RangeT,
- typename ElT = typename std::remove_reference<
- decltype(*std::begin(std::declval<RangeT>()))>::type>
+ template <typename RangeT, typename ElT = std::remove_reference_t<
+ decltype(*std::begin(std::declval<RangeT>()))>>
void addSymbol(SymbolKind Kind, StringRef Name, RangeT &&Targets,
SymbolFlags Flags = SymbolFlags::None) {
SymbolsSet->addGlobal(Kind, Name, Flags, Targets);
diff --git a/llvm/include/llvm/TextAPI/SymbolSet.h b/llvm/include/llvm/TextAPI/SymbolSet.h
index 238385178d605df..5b67ebea11ed086 100644
--- a/llvm/include/llvm/TextAPI/SymbolSet.h
+++ b/llvm/include/llvm/TextAPI/SymbolSet.h
@@ -95,9 +95,8 @@ class SymbolSet {
const Target &Targ);
size_t size() const { return Symbols.size(); }
- template <typename RangeT,
- typename ElT = typename std::remove_reference<
- decltype(*std::begin(std::declval<RangeT>()))>::type>
+ template <typename RangeT, typename ElT = std::remove_reference_t<
+ decltype(*std::begin(std::declval<RangeT>()))>>
Symbol *addGlobal(SymbolKind Kind, StringRef Name, SymbolFlags Flags,
RangeT &&Targets) {
auto *Global = addGlobalImpl(Kind, Name, Flags);
More information about the llvm-commits
mailing list