|
@@ -6734,9 +6734,7 @@ void ResourceToHandle::ReplaceResourceWithHandle(Value *ResPtr,
|
|
SI->replaceUsesOfWith(LI, TmpRes);
|
|
SI->replaceUsesOfWith(LI, TmpRes);
|
|
} else {
|
|
} else {
|
|
CallInst *CI = cast<CallInst>(ldU);
|
|
CallInst *CI = cast<CallInst>(ldU);
|
|
- HLOpcodeGroup group =
|
|
|
|
- hlsl::GetHLOpcodeGroupByName(CI->getCalledFunction());
|
|
|
|
- DXASSERT(group == HLOpcodeGroup::HLCreateHandle,
|
|
|
|
|
|
+ DXASSERT(hlsl::GetHLOpcodeGroupByName(CI->getCalledFunction()) == HLOpcodeGroup::HLCreateHandle,
|
|
"must be createHandle");
|
|
"must be createHandle");
|
|
CI->replaceAllUsesWith(Handle);
|
|
CI->replaceAllUsesWith(Handle);
|
|
CI->eraseFromParent();
|
|
CI->eraseFromParent();
|
|
@@ -6812,4 +6810,4 @@ INITIALIZE_PASS(ResourceToHandle, "resource-handle",
|
|
// Public interface to the ResourceToHandle pass
|
|
// Public interface to the ResourceToHandle pass
|
|
ModulePass *llvm::createResourceToHandlePass() {
|
|
ModulePass *llvm::createResourceToHandlePass() {
|
|
return new ResourceToHandle();
|
|
return new ResourceToHandle();
|
|
-}
|
|
|
|
|
|
+}
|