Skip to content

Commit 9756878

Browse files
committed
reset debug module
1 parent d5b80a7 commit 9756878

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/clang/tools/dxcompiler/dxcutil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ HRESULT ValidateAndAssembleToContainer(AssembleInputs &inputs) {
151151
CComPtr<IDxcValidator> pValidator;
152152
CreateValidator(pValidator);
153153

154+
if (llvm::getDebugMetadataVersionFromModule(*inputs.pM) != 0) {
155+
llvmModuleWithDebugInfo.reset(llvm::CloneModule(inputs.pM.get()));
156+
}
157+
154158
// Verify validator version can validate this module
155159
CComPtr<IDxcVersionInfo> pValidatorVersion;
156160
IFT(pValidator->QueryInterface(&pValidatorVersion));

0 commit comments

Comments
 (0)