@@ -51,28 +51,29 @@ declare void @a.func(target("dx.RawBuffer", float, 1, 0) %handle)
5151 ASSERT_TRUE (M) << " Bad assembly?" ;
5252 DebugifyCustomPassManager Passes;
5353 Passes.add (createDXILResourceTypeWrapperPassPass ());
54- DXILResourceBindingWrapperPass* RBPass = new DXILResourceBindingWrapperPass ();
54+ DXILResourceBindingWrapperPass * RBPass = new DXILResourceBindingWrapperPass ();
5555 Passes.add (RBPass);
5656 Passes.run (*M);
5757
5858 const DXILBindingMap &DBM = RBPass->getBindingMap ();
59- for (const Function& F : M->functions ()) {
59+ for (const Function & F : M->functions ()) {
6060 if (F.getName () != " a.func" ) {
6161 continue ;
6262 }
6363
6464 unsigned CalledResources = 0 ;
6565
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);
6868 ASSERT_TRUE (CI) << " All users of @a.func must be CallInst" ;
6969
70- const Value* Handle = CI->getArgOperand (0 );
70+ const Value * Handle = CI->getArgOperand (0 );
7171
72- const auto * It = DBM.findByUse (Handle);
72+ const auto * It = DBM.findByUse (Handle);
7373 ASSERT_TRUE (It != DBM.end ()) << " Handle should resolve into resource" ;
7474
75- const llvm::dxil::ResourceBindingInfo::ResourceBinding& Binding = It->getBinding ();
75+ const llvm::dxil::ResourceBindingInfo::ResourceBinding &Binding =
76+ It->getBinding ();
7677 EXPECT_EQ (0u , Binding.RecordID );
7778 EXPECT_EQ (1u , Binding.Space );
7879 EXPECT_EQ (2u , Binding.LowerBound );
@@ -81,7 +82,7 @@ declare void @a.func(target("dx.RawBuffer", float, 1, 0) %handle)
8182 CalledResources++;
8283 }
8384
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" ;
8587 }
86-
8788}
0 commit comments