using IterOfRange = decltype(std::begin(std::declval<RangeT &>()));
template <typename RangeT>
-using ValueOfRange = typename std::remove_reference<decltype(
- *std::begin(std::declval<RangeT &>()))>::type;
+using ValueOfRange =
+ std::remove_reference_t<decltype(*std::begin(std::declval<RangeT &>()))>;
} // end namespace detail
/// Metafunction to determine if T& or T has a member called rbegin().
template <typename Ty>
-struct has_rbegin : has_rbegin_impl<typename std::remove_reference<Ty>::type> {
-};
+struct has_rbegin : has_rbegin_impl<std::remove_reference_t<Ty>> {};
// Returns an iterator_range over the given container which iterates in reverse.
template <typename ContainerTy> auto reverse(ContainerTy &&C) {
template <typename Iter> struct ZipLongestItemType {
using type = llvm::Optional<std::remove_const_t<
- typename std::remove_reference<decltype(*std::declval<Iter>())>::type>>;
+ std::remove_reference_t<decltype(*std::declval<Iter>())>>>;
};
template <typename... Iters> struct ZipLongestTupleType {
if (Name == "require<" NAME ">") { \
MPM.addPass( \
RequireAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type, Module>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>, Module>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
MPM.addPass(InvalidateAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>()); \
return Error::success(); \
}
#define CGSCC_PASS(NAME, CREATE_PASS) \
#define CGSCC_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
CGPM.addPass(RequireAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type, \
+ std::remove_reference_t<decltype(CREATE_PASS)>, \
LazyCallGraph::SCC, CGSCCAnalysisManager, LazyCallGraph &, \
CGSCCUpdateResult &>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
CGPM.addPass(InvalidateAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>()); \
return Error::success(); \
}
#define FUNCTION_PASS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
FPM.addPass( \
RequireAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type, Function>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>, Function>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
FPM.addPass(InvalidateAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>()); \
return Error::success(); \
}
// FIXME: UseMemorySSA is set to false. Maybe we could do things like:
#define LOOP_ANALYSIS(NAME, CREATE_PASS) \
if (Name == "require<" NAME ">") { \
LPM.addPass(RequireAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type, Loop, \
+ std::remove_reference_t<decltype(CREATE_PASS)>, Loop, \
LoopAnalysisManager, LoopStandardAnalysisResults &, \
LPMUpdater &>()); \
return Error::success(); \
} \
if (Name == "invalidate<" NAME ">") { \
LPM.addPass(InvalidateAnalysisPass< \
- std::remove_reference<decltype(CREATE_PASS)>::type>()); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>()); \
return Error::success(); \
}
#include "PassRegistry.def"
#define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
if (Name == NAME) { \
AA.registerModuleAnalysis< \
- std::remove_reference<decltype(CREATE_PASS)>::type>(); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>(); \
return true; \
}
#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
if (Name == NAME) { \
AA.registerFunctionAnalysis< \
- std::remove_reference<decltype(CREATE_PASS)>::type>(); \
+ std::remove_reference_t<decltype(CREATE_PASS)>>(); \
return true; \
}
#include "PassRegistry.def"