Skip to content

Commit 058cce8

Browse files
authored
Merge pull request #15570 from ikesyo/llvmpasses-using-over-typedef
[gardening][LLVMPasses] Replace `typedef` with `using`
2 parents 4aad932 + 7e6220c commit 058cce8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/LLVMPasses/LLVMInlineTree.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ namespace {
6565
class InlineTree {
6666
struct Node;
6767

68-
typedef DenseMap<StringRef, Node *> NodeMap;
69-
typedef SmallVector<Node *, 8> NodeList;
68+
using NodeMap = DenseMap<StringRef, Node *>;
69+
using NodeList = SmallVector<Node *, 8>;
7070

7171
/// Defines a unique inline location.
7272
/// Used to distinguish between different instances of an inlined function.

lib/LLVMPasses/LLVMMergeFunctions.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class SwiftMergeFunctions : public ModulePass {
263263
return FCmp.compareIgnoringConsts() == -1;
264264
}
265265
};
266-
typedef std::set<EquivalenceClass, FunctionNodeCmp> FnTreeType;
266+
using FnTreeType = std::set<EquivalenceClass, FunctionNodeCmp>;
267267

268268
///
269269
struct FunctionEntry {
@@ -334,7 +334,7 @@ class SwiftMergeFunctions : public ModulePass {
334334
int NumParamsNeeded;
335335
};
336336

337-
typedef SmallVector<FunctionInfo, 8> FunctionInfos;
337+
using FunctionInfos = SmallVector<FunctionInfo, 8>;
338338

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

364-
typedef SmallVector<ParamInfo, maxAddedParams> ParamInfos;
364+
using ParamInfos = SmallVector<ParamInfo, maxAddedParams>;
365365

366366
GlobalNumberState GlobalNumbers;
367367

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

0 commit comments

Comments
 (0)