@@ -41,17 +41,17 @@ namespace {
41
41
class UniqueResourceFromUseTest : public testing ::Test {
42
42
protected:
43
43
PassBuilder *PB;
44
- ModuleAnalysisManager* MAM;
44
+ ModuleAnalysisManager * MAM;
45
45
46
46
virtual void SetUp () {
47
- MAM = new ModuleAnalysisManager ();
48
- PB = new PassBuilder ();
49
- PB->registerModuleAnalyses (*MAM);
50
- MAM->registerPass ([&]{ return DXILResourceTypeAnalysis (); });
51
- MAM->registerPass ([&] { return DXILResourceBindingAnalysis (); });
47
+ MAM = new ModuleAnalysisManager ();
48
+ PB = new PassBuilder ();
49
+ PB->registerModuleAnalyses (*MAM);
50
+ MAM->registerPass ([&] { return DXILResourceTypeAnalysis (); });
51
+ MAM->registerPass ([&] { return DXILResourceBindingAnalysis (); });
52
52
}
53
53
54
- virtual void TearDown () {
54
+ virtual void TearDown () {
55
55
delete PB;
56
56
delete MAM;
57
57
}
@@ -91,7 +91,8 @@ declare void @a.func(target("dx.RawBuffer", float, 1, 0) %handle)
91
91
const Value *Handle = CI->getArgOperand (0 );
92
92
93
93
const auto Bindings = DBM.findByUse (Handle);
94
- ASSERT_EQ (Bindings.size (), 1u ) << " Handle should resolve into one resource" ;
94
+ ASSERT_EQ (Bindings.size (), 1u )
95
+ << " Handle should resolve into one resource" ;
95
96
96
97
auto Binding = Bindings[0 ].getBinding ();
97
98
EXPECT_EQ (0u , Binding.RecordID );
@@ -143,7 +144,8 @@ declare target("dx.RawBuffer", float, 1, 0) @ind.func(target("dx.RawBuffer", flo
143
144
const Value *Handle = CI->getArgOperand (0 );
144
145
145
146
const auto Bindings = DBM.findByUse (Handle);
146
- ASSERT_EQ (Bindings.size (), 1u ) << " Handle should resolve into one resource" ;
147
+ ASSERT_EQ (Bindings.size (), 1u )
148
+ << " Handle should resolve into one resource" ;
147
149
148
150
auto Binding = Bindings[0 ].getBinding ();
149
151
EXPECT_EQ (0u , Binding.RecordID );
@@ -198,7 +200,8 @@ declare target("dx.RawBuffer", float, 1, 0) @ind.func(target("dx.RawBuffer", flo
198
200
const Value *Handle = CI->getArgOperand (0 );
199
201
200
202
const auto Bindings = DBM.findByUse (Handle);
201
- ASSERT_EQ (Bindings.size (), 4u ) << " Handle should resolve into four resources" ;
203
+ ASSERT_EQ (Bindings.size (), 4u )
204
+ << " Handle should resolve into four resources" ;
202
205
203
206
auto Binding = Bindings[0 ].getBinding ();
204
207
EXPECT_EQ (0u , Binding.RecordID );
@@ -280,7 +283,8 @@ declare target("dx.RawBuffer", float, 1, 0) @ind.func(target("dx.RawBuffer", flo
280
283
const Value *Handle = CI->getArgOperand (0 );
281
284
282
285
const auto Bindings = DBM.findByUse (Handle);
283
- ASSERT_EQ (Bindings.size (), 2u ) << " Handle should resolve into four resources" ;
286
+ ASSERT_EQ (Bindings.size (), 2u )
287
+ << " Handle should resolve into four resources" ;
284
288
285
289
auto Binding = Bindings[0 ].getBinding ();
286
290
EXPECT_EQ (0u , Binding.RecordID );
@@ -302,4 +306,4 @@ declare target("dx.RawBuffer", float, 1, 0) @ind.func(target("dx.RawBuffer", flo
302
306
}
303
307
}
304
308
305
- } // namespace
309
+ } // namespace
0 commit comments