Skip to content

[gardening][LLVMPasses] Replace typedef with using #15570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2018
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 lib/LLVMPasses/LLVMInlineTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ namespace {
class InlineTree {
struct Node;

typedef DenseMap<StringRef, Node *> NodeMap;
typedef SmallVector<Node *, 8> NodeList;
using NodeMap = DenseMap<StringRef, Node *>;
using NodeList = SmallVector<Node *, 8>;

/// Defines a unique inline location.
/// Used to distinguish between different instances of an inlined function.
Expand Down
7 changes: 3 additions & 4 deletions lib/LLVMPasses/LLVMMergeFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class SwiftMergeFunctions : public ModulePass {
return FCmp.compareIgnoringConsts() == -1;
}
};
typedef std::set<EquivalenceClass, FunctionNodeCmp> FnTreeType;
using FnTreeType = std::set<EquivalenceClass, FunctionNodeCmp>;

///
struct FunctionEntry {
Expand Down Expand Up @@ -334,7 +334,7 @@ class SwiftMergeFunctions : public ModulePass {
int NumParamsNeeded;
};

typedef SmallVector<FunctionInfo, 8> FunctionInfos;
using FunctionInfos = SmallVector<FunctionInfo, 8>;

/// Describes a parameter which we create to parameterize the merged function.
struct ParamInfo {
Expand All @@ -361,7 +361,7 @@ class SwiftMergeFunctions : public ModulePass {
}
};

typedef SmallVector<ParamInfo, maxAddedParams> ParamInfos;
using ParamInfos = SmallVector<ParamInfo, maxAddedParams>;

GlobalNumberState GlobalNumbers;

Expand Down Expand Up @@ -1098,4 +1098,3 @@ bool SwiftMergeFunctions::replaceDirectCallers(Function *Old, Function *New,
assert(Old->use_empty() && "should have replaced all uses of old function");
return Old->hasLocalLinkage();
}