@@ -51,28 +51,29 @@ declare void @a.func(target("dx.RawBuffer", float, 1, 0) %handle)
51
51
ASSERT_TRUE (M) << " Bad assembly?" ;
52
52
DebugifyCustomPassManager Passes;
53
53
Passes.add (createDXILResourceTypeWrapperPassPass ());
54
- DXILResourceBindingWrapperPass* RBPass = new DXILResourceBindingWrapperPass ();
54
+ DXILResourceBindingWrapperPass * RBPass = new DXILResourceBindingWrapperPass ();
55
55
Passes.add (RBPass);
56
56
Passes.run (*M);
57
57
58
58
const DXILBindingMap &DBM = RBPass->getBindingMap ();
59
- for (const Function& F : M->functions ()) {
59
+ for (const Function & F : M->functions ()) {
60
60
if (F.getName () != " a.func" ) {
61
61
continue ;
62
62
}
63
63
64
64
unsigned CalledResources = 0 ;
65
65
66
- for (const User* U : F.users ()) {
67
- const CallInst* CI = dyn_cast<CallInst>(U);
66
+ for (const User * U : F.users ()) {
67
+ const CallInst * CI = dyn_cast<CallInst>(U);
68
68
ASSERT_TRUE (CI) << " All users of @a.func must be CallInst" ;
69
69
70
- const Value* Handle = CI->getArgOperand (0 );
70
+ const Value * Handle = CI->getArgOperand (0 );
71
71
72
- const auto * It = DBM.findByUse (Handle);
72
+ const auto * It = DBM.findByUse (Handle);
73
73
ASSERT_TRUE (It != DBM.end ()) << " Handle should resolve into resource" ;
74
74
75
- const llvm::dxil::ResourceBindingInfo::ResourceBinding& Binding = It->getBinding ();
75
+ const llvm::dxil::ResourceBindingInfo::ResourceBinding &Binding =
76
+ It->getBinding ();
76
77
EXPECT_EQ (0u , Binding.RecordID );
77
78
EXPECT_EQ (1u , Binding.Space );
78
79
EXPECT_EQ (2u , Binding.LowerBound );
@@ -81,7 +82,7 @@ declare void @a.func(target("dx.RawBuffer", float, 1, 0) %handle)
81
82
CalledResources++;
82
83
}
83
84
84
- EXPECT_EQ (1u , CalledResources) << " Expected exactly 1 resolved call to create resource" ;
85
+ EXPECT_EQ (1u , CalledResources)
86
+ << " Expected exactly 1 resolved call to create resource" ;
85
87
}
86
-
87
88
}
0 commit comments