浏览代码

Initialized the commitsha string ref with an empty string rather than leaving it null (#3453)

Adam Yang 4 年之前
父节点
当前提交
83cf9a1511
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/clang/tools/dxcompiler/dxcompilerobj.cpp

+ 1 - 1
tools/clang/tools/dxcompiler/dxcompilerobj.cpp

@@ -96,7 +96,7 @@ static bool ShouldBeCopiedIntoPDB(UINT32 FourCC) {
 struct CompilerVersionPartWriter {
   hlsl::DxilCompilerVersion m_Header = {};
   CComHeapPtr<char> m_CommitShaStorage;
-  llvm::StringRef m_CommitSha;
+  llvm::StringRef m_CommitSha = "";
 
   void Init(IDxcVersionInfo *pVersionInfo) {
     m_Header = {};