Skip to content

Commit 137873b

Browse files
committed
address pr comments
1 parent 723e183 commit 137873b

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

llvm/lib/Target/DirectX/DXILLegalizePass.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#define DEBUG_TYPE "dxil-legalize"
2020

2121
using namespace llvm;
22-
namespace {
2322

24-
void fixI8TruncUseChain(Instruction &I, SmallVector<Instruction *> &ToRemove,
25-
DenseMap<Value *, Value *> &ReplacedValues) {
23+
static void fixI8TruncUseChain(Instruction &I,
24+
SmallVectorImpl<Instruction *> &ToRemove,
25+
DenseMap<Value *, Value *> &ReplacedValues) {
2626

2727
auto *Cmp = dyn_cast<CmpInst>(&I);
2828

@@ -89,9 +89,10 @@ void fixI8TruncUseChain(Instruction &I, SmallVector<Instruction *> &ToRemove,
8989
}
9090
}
9191

92-
void downcastI64toI32InsertExtractElements(Instruction &I,
93-
SmallVector<Instruction *> &ToRemove,
94-
DenseMap<Value *, Value *> &) {
92+
static void
93+
downcastI64toI32InsertExtractElements(Instruction &I,
94+
SmallVectorImpl<Instruction *> &ToRemove,
95+
DenseMap<Value *, Value *> &) {
9596

9697
if (auto *Extract = dyn_cast<ExtractElementInst>(&I)) {
9798
Value *Idx = Extract->getIndexOperand();
@@ -127,6 +128,7 @@ void downcastI64toI32InsertExtractElements(Instruction &I,
127128
}
128129
}
129130

131+
namespace {
130132
class DXILLegalizationPipeline {
131133

132134
public:
@@ -147,8 +149,9 @@ class DXILLegalizationPipeline {
147149
}
148150

149151
private:
150-
SmallVector<std::function<void(Instruction &, SmallVector<Instruction *> &,
151-
DenseMap<Value *, Value *> &)>>
152+
SmallVector<
153+
std::function<void(Instruction &, SmallVectorImpl<Instruction *> &,
154+
DenseMap<Value *, Value *> &)>>
152155
LegalizationPipeline;
153156

154157
void initializeLegalizationPipeline() {

0 commit comments

Comments
 (0)