Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/include/llvm/Analysis/IR2Vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ struct Embedding {
return Data[Itr];
}

using iterator = typename std::vector<double>::iterator;
using const_iterator = typename std::vector<double>::const_iterator;
using iterator = std::vector<double>::iterator;
using const_iterator = std::vector<double>::const_iterator;

iterator begin() { return Data.begin(); }
iterator end() { return Data.end(); }
Expand Down
8 changes: 4 additions & 4 deletions llvm/include/llvm/Analysis/LoopIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ struct LoopBodyTraits {
class WrappedSuccIterator
: public iterator_adaptor_base<
WrappedSuccIterator, succ_iterator,
typename std::iterator_traits<succ_iterator>::iterator_category,
NodeRef, std::ptrdiff_t, NodeRef *, NodeRef> {
std::iterator_traits<succ_iterator>::iterator_category, NodeRef,
std::ptrdiff_t, NodeRef *, NodeRef> {
using BaseT = iterator_adaptor_base<
WrappedSuccIterator, succ_iterator,
typename std::iterator_traits<succ_iterator>::iterator_category,
NodeRef, std::ptrdiff_t, NodeRef *, NodeRef>;
std::iterator_traits<succ_iterator>::iterator_category, NodeRef,
std::ptrdiff_t, NodeRef *, NodeRef>;

const Loop *L;

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Analysis/MemorySSA.h
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ class upward_defs_iterator
return DefIterator == Other.DefIterator;
}

typename std::iterator_traits<BaseT>::reference operator*() const {
std::iterator_traits<BaseT>::reference operator*() const {
assert(DefIterator != OriginalAccess->defs_end() &&
"Tried to access past the end of our iterator");
return CurrentPair;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/DIE.h
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ template <class T> class IntrusiveBackList : IntrusiveBackListBase {
public:
const_iterator() = default;
// Placate MSVC by explicitly scoping 'iterator'.
const_iterator(typename IntrusiveBackList<T>::iterator X) : N(X.N) {}
const_iterator(IntrusiveBackList<T>::iterator X) : N(X.N) {}
explicit const_iterator(const T *N) : N(N) {}

const_iterator &operator++() {
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/RDFRegisters.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ struct RegisterAggr {
ref_iterator ref_begin() const { return ref_iterator(*this, false); }
ref_iterator ref_end() const { return ref_iterator(*this, true); }

using unit_iterator = typename BitVector::const_set_bits_iterator;
using unit_iterator = BitVector::const_set_bits_iterator;
unit_iterator unit_begin() const { return Units.set_bits_begin(); }
unit_iterator unit_end() const { return Units.set_bits_end(); }

Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/RegAllocRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class RegisterRegAlloc : public RegisterRegAllocBase<RegisterRegAlloc> {
/// RegisterRegAlloc's global Registry tracks allocator registration.
template <class T>
MachinePassRegistry<typename RegisterRegAllocBase<T>::FunctionPassCtor>
RegisterRegAllocBase<T>::Registry;
RegisterRegAllocBase<T>::Registry;

} // end namespace llvm

Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class DWARFUnitVector final : public SmallVector<std::unique_ptr<DWARFUnit>, 1>

public:
using UnitVector = SmallVectorImpl<std::unique_ptr<DWARFUnit>>;
using iterator = typename UnitVector::iterator;
using iterator_range = llvm::iterator_range<typename UnitVector::iterator>;
using iterator = UnitVector::iterator;
using iterator_range = llvm::iterator_range<UnitVector::iterator>;

using compile_unit_range =
decltype(make_filter_range(std::declval<iterator_range>(), isCompileUnit));
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct FileInfoSubstreamHeader;
class DbiModuleSourceFilesIterator
: public iterator_facade_base<DbiModuleSourceFilesIterator,
std::random_access_iterator_tag, StringRef> {
using BaseType = typename DbiModuleSourceFilesIterator::iterator_facade_base;
using BaseType = DbiModuleSourceFilesIterator::iterator_facade_base;

public:
LLVM_ABI DbiModuleSourceFilesIterator(const DbiModuleList &Modules,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class LibraryManager {
class FilteredView {
public:
using Map = StringMap<std::shared_ptr<LibraryInfo>>;
using Iterator = typename Map::const_iterator;
using Iterator = Map::const_iterator;
class FilterIterator {
public:
FilterIterator(Iterator it_, Iterator end_, LibState S, PathType K)
Expand Down
4 changes: 2 additions & 2 deletions llvm/include/llvm/MC/MCAssembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ class MCAssembler {
const_iterator end() const { return Sections.end(); }

SmallVectorImpl<const MCSymbol *> &getSymbols() { return Symbols; }
iterator_range<pointee_iterator<
typename SmallVector<const MCSymbol *, 0>::const_iterator>>
iterator_range<
pointee_iterator<SmallVector<const MCSymbol *, 0>::const_iterator>>
symbols() const {
return make_pointee_range(Symbols);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/IR/ConstantsContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ struct ConstantPtrAuthKeyType {

unsigned getHash() const { return hash_combine_range(Operands); }

using TypeClass = typename ConstantInfo<ConstantPtrAuth>::TypeClass;
using TypeClass = ConstantInfo<ConstantPtrAuth>::TypeClass;

ConstantPtrAuth *create(TypeClass *Ty) const {
return new ConstantPtrAuth(Operands[0], cast<ConstantInt>(Operands[1]),
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ static std::optional<Instruction *> instCombineSVEPTest(InstCombiner &IC,
return std::nullopt;
}

template <Intrinsic::ID MulOpc, typename Intrinsic::ID FuseOpc>
template <Intrinsic::ID MulOpc, Intrinsic::ID FuseOpc>
static std::optional<Instruction *>
instCombineSVEVectorFuseMulAddSub(InstCombiner &IC, IntrinsicInst &II,
bool MergeIntoAddendOp) {
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class WebAssemblyException {
BlockSet.insert(MBB);
}
ArrayRef<MachineBasicBlock *> getBlocks() const { return Blocks; }
using block_iterator = typename ArrayRef<MachineBasicBlock *>::const_iterator;
using block_iterator = ArrayRef<MachineBasicBlock *>::const_iterator;
block_iterator block_begin() const { return getBlocks().begin(); }
block_iterator block_end() const { return getBlocks().end(); }
inline iterator_range<block_iterator> blocks() const {
Expand All @@ -96,7 +96,7 @@ class WebAssemblyException {
void addSubException(std::unique_ptr<WebAssemblyException> E) {
SubExceptions.push_back(std::move(E));
}
using iterator = typename decltype(SubExceptions)::const_iterator;
using iterator = decltype(SubExceptions)::const_iterator;
iterator begin() const { return SubExceptions.begin(); }
iterator end() const { return SubExceptions.end(); }

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/WebAssembly/WebAssemblySortRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SortRegion {
virtual MachineBasicBlock *getHeader() const = 0;
virtual bool contains(const MachineBasicBlock *MBB) const = 0;
virtual unsigned getNumBlocks() const = 0;
using block_iterator = typename ArrayRef<MachineBasicBlock *>::const_iterator;
using block_iterator = ArrayRef<MachineBasicBlock *>::const_iterator;
virtual iterator_range<block_iterator> blocks() const = 0;
virtual bool isLoop() const = 0;
};
Expand Down
16 changes: 8 additions & 8 deletions llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ struct MachineGadgetGraph : ImmutableGraph<MachineInstr *, int> {
static constexpr MachineInstr *const ArgNodeSentinel = nullptr;

using GraphT = ImmutableGraph<MachineInstr *, int>;
using Node = typename GraphT::Node;
using Edge = typename GraphT::Edge;
using size_type = typename GraphT::size_type;
using Node = GraphT::Node;
using Edge = GraphT::Edge;
using size_type = GraphT::size_type;
MachineGadgetGraph(std::unique_ptr<Node[]> Nodes,
std::unique_ptr<Edge[]> Edges, size_type NodesSize,
size_type EdgesSize, int NumFences = 0, int NumGadgets = 0)
Expand Down Expand Up @@ -191,10 +191,10 @@ template <>
struct DOTGraphTraits<MachineGadgetGraph *> : DefaultDOTGraphTraits {
using GraphType = MachineGadgetGraph;
using Traits = llvm::GraphTraits<GraphType *>;
using NodeRef = typename Traits::NodeRef;
using EdgeRef = typename Traits::EdgeRef;
using ChildIteratorType = typename Traits::ChildIteratorType;
using ChildEdgeIteratorType = typename Traits::ChildEdgeIteratorType;
using NodeRef = Traits::NodeRef;
using EdgeRef = Traits::EdgeRef;
using ChildIteratorType = Traits::ChildIteratorType;
using ChildEdgeIteratorType = Traits::ChildEdgeIteratorType;

DOTGraphTraits(bool IsSimple = false) : DefaultDOTGraphTraits(IsSimple) {}

Expand Down Expand Up @@ -335,7 +335,7 @@ X86LoadValueInjectionLoadHardeningPass::getGadgetGraph(
L.computePhiInfo();

GraphBuilder Builder;
using GraphIter = typename GraphBuilder::BuilderNodeRef;
using GraphIter = GraphBuilder::BuilderNodeRef;
DenseMap<MachineInstr *, GraphIter> NodeMap;
int FenceCount = 0, GadgetCount = 0;
auto MaybeAddNode = [&NodeMap, &Builder](MachineInstr *MI) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/TextAPI/BinaryReader/DylibReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace llvm::MachO;
using namespace llvm::MachO::DylibReader;

using TripleVec = std::vector<Triple>;
static typename TripleVec::iterator emplace(TripleVec &Container, Triple &&T) {
static TripleVec::iterator emplace(TripleVec &Container, Triple &&T) {
auto I = partition_point(Container, [=](const Triple &CT) {
return std::forward_as_tuple(CT.getArch(), CT.getOS(),
CT.getEnvironment()) <
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3619,7 +3619,7 @@ struct AAIntraFnReachabilityFunction final
return true;

RQITy StackRQI(A, From, To, ExclusionSet, false);
typename RQITy::Reachable Result;
RQITy::Reachable Result;
if (!NonConstThis->checkQueryCache(A, StackRQI, Result))
return NonConstThis->isReachableImpl(A, StackRQI,
/*IsTemporaryRQI=*/true);
Expand Down Expand Up @@ -10701,7 +10701,7 @@ struct AAInterFnReachabilityFunction
auto *NonConstThis = const_cast<AAInterFnReachabilityFunction *>(this);

RQITy StackRQI(A, From, To, ExclusionSet, false);
typename RQITy::Reachable Result;
RQITy::Reachable Result;
if (!NonConstThis->checkQueryCache(A, StackRQI, Result))
return NonConstThis->isReachableImpl(A, StackRQI,
/*IsTemporaryRQI=*/true);
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,11 +1034,11 @@ class IndexCallsiteContextGraph
} // namespace

template <>
struct llvm::DenseMapInfo<typename CallsiteContextGraph<
struct llvm::DenseMapInfo<CallsiteContextGraph<
ModuleCallsiteContextGraph, Function, Instruction *>::CallInfo>
: public DenseMapInfo<std::pair<Instruction *, unsigned>> {};
template <>
struct llvm::DenseMapInfo<typename CallsiteContextGraph<
struct llvm::DenseMapInfo<CallsiteContextGraph<
IndexCallsiteContextGraph, FunctionSummary, IndexCall>::CallInfo>
: public DenseMapInfo<std::pair<IndexCall, unsigned>> {};
template <>
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ struct SubGraphTraits {
class WrappedSuccIterator
: public iterator_adaptor_base<
WrappedSuccIterator, BaseSuccIterator,
typename std::iterator_traits<BaseSuccIterator>::iterator_category,
NodeRef, std::ptrdiff_t, NodeRef *, NodeRef> {
std::iterator_traits<BaseSuccIterator>::iterator_category, NodeRef,
std::ptrdiff_t, NodeRef *, NodeRef> {
SmallDenseSet<RegionNode *> *Nodes;

public:
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/Vectorize/VPlanSLP.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ class VPlanSlp {
/// Width of the widest combined bundle in bits.
unsigned WidestBundleBits = 0;

using MultiNodeOpTy =
typename std::pair<VPInstruction *, SmallVector<VPValue *, 4>>;
using MultiNodeOpTy = std::pair<VPInstruction *, SmallVector<VPValue *, 4>>;

// Input operand bundles for the current multi node. Each multi node operand
// bundle contains values not matching the multi node's opcode. They will
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-xray/xray-graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GraphRenderer {
};

GraphT G;
using VertexIdentifier = typename decltype(G)::VertexIdentifier;
using VertexIdentifier = decltype(G)::VertexIdentifier;
using EdgeIdentifier = decltype(G)::EdgeIdentifier;

/// Use a Map to store the Function stack for each thread whilst building the
Expand Down
4 changes: 2 additions & 2 deletions llvm/unittests/Object/XCOFFObjectFileTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ using namespace llvm::XCOFF;
TEST(XCOFFObjectFileTest, XCOFFObjectType) {
// Create an arbitrary object of a non-XCOFF type and test that
// dyn_cast<XCOFFObjectFile> returns null for it.
char Buf[sizeof(typename ELF64LE::Ehdr)] = {};
char Buf[sizeof(ELF64LE::Ehdr)] = {};
memcpy(Buf, "\177ELF", 4);

auto *EHdr = reinterpret_cast<typename ELF64LE::Ehdr *>(Buf);
auto *EHdr = reinterpret_cast<ELF64LE::Ehdr *>(Buf);
EHdr->e_ident[llvm::ELF::EI_CLASS] = llvm::ELF::ELFCLASS64;
EHdr->e_ident[llvm::ELF::EI_DATA] = llvm::ELF::ELFDATA2LSB;

Expand Down
8 changes: 4 additions & 4 deletions llvm/unittests/XRay/GraphTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ struct EAttr {
unsigned EA;
};
typedef Graph<VAttr, EAttr, unsigned> GraphT;
typedef typename GraphT::VertexIdentifier VI;
typedef typename GraphT::EdgeIdentifier EI;
typedef GraphT::VertexIdentifier VI;
typedef GraphT::EdgeIdentifier EI;

// Test Fixture
template <typename T> class GraphTest : public testing::Test {
Expand Down Expand Up @@ -56,8 +56,8 @@ template <typename T> class GraphTest : public testing::Test {

typedef ::testing::Types<GraphT, const GraphT> GraphTestTypes;

using VVT = typename GraphT::VertexValueType;
using EVT = typename GraphT::EdgeValueType;
using VVT = GraphT::VertexValueType;
using EVT = GraphT::EdgeValueType;

TYPED_TEST_SUITE(GraphTest, GraphTestTypes, );

Expand Down
3 changes: 1 addition & 2 deletions llvm/utils/TableGen/Common/CodeGenRegisters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,8 +1651,7 @@ template <> struct llvm::GraphTraits<SubRegIndexCompositionGraph> {
struct ChildIteratorType
: public iterator_adaptor_base<
ChildIteratorType, CompMapIt,
typename std::iterator_traits<CompMapIt>::iterator_category,
NodeRef> {
std::iterator_traits<CompMapIt>::iterator_category, NodeRef> {
ChildIteratorType(CompMapIt I)
: ChildIteratorType::iterator_adaptor_base(I) {}

Expand Down
5 changes: 2 additions & 3 deletions llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ class RuleMatcher : public Matcher {
DefinedInsnVariablesMap::const_iterator defined_insn_vars_end() const {
return InsnVariableIDs.end();
}
iterator_range<typename DefinedInsnVariablesMap::const_iterator>
iterator_range<DefinedInsnVariablesMap::const_iterator>
defined_insn_vars() const {
return make_range(defined_insn_vars_begin(), defined_insn_vars_end());
}
Expand All @@ -632,8 +632,7 @@ class RuleMatcher : public Matcher {
MutatableInsnSet::const_iterator mutatable_insns_end() const {
return MutatableInsns.end();
}
iterator_range<typename MutatableInsnSet::const_iterator>
mutatable_insns() const {
iterator_range<MutatableInsnSet::const_iterator> mutatable_insns() const {
return make_range(mutatable_insns_begin(), mutatable_insns_end());
}
void reserveInsnMatcherForMutation(InstructionMatcher *InsnMatcher) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/utils/TableGen/Common/InfoByHwMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool RegSizeInfoByHwMode::hasStricterSpillThan(
}

void RegSizeInfoByHwMode::writeToStream(raw_ostream &OS) const {
typedef typename decltype(Map)::value_type PairType;
typedef decltype(Map)::value_type PairType;
std::vector<const PairType *> Pairs;
for (const auto &P : Map)
Pairs.push_back(&P);
Expand Down
3 changes: 1 addition & 2 deletions llvm/utils/TableGen/RegisterBankEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ class RegisterBank {
return RCsWithLargestRegSize[HwMode];
}

iterator_range<typename RegisterClassesTy::const_iterator>
register_classes() const {
iterator_range<RegisterClassesTy::const_iterator> register_classes() const {
return RCs;
}
};
Expand Down