Skip to content

Commit 991bbc7

Browse files
committed
reset debug module
1 parent debb7cc commit 991bbc7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)