浏览代码

Fix type ambiguity for ternary operator. (#1281)

Fixes compiler error on Linux.
Ehsan 7 年之前
父节点
当前提交
f72ccb4af2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/HLSL/DxilContainerAssembler.cpp

+ 3 - 1
lib/HLSL/DxilContainerAssembler.cpp

@@ -893,7 +893,9 @@ void hlsl::SerializeDxilContainerForModule(DxilModule *pModule,
       // If the debug name should be specific to the sources, base the name on the debug
       // bitcode, which will include the source references, line numbers, etc. Otherwise,
       // do it exclusively on the target shader bitcode.
-      pHashStream = (int)(Flags & SerializeDxilFlags::DebugNameDependOnSource) ? pModuleBitcode : pProgramStream;
+      pHashStream = (int)(Flags & SerializeDxilFlags::DebugNameDependOnSource)
+                        ? CComPtr<AbstractMemoryStream>(pModuleBitcode)
+                        : CComPtr<AbstractMemoryStream>(pProgramStream);
       const uint32_t DebugInfoNameHashLen = 32;   // 32 chars of MD5
       const uint32_t DebugInfoNameSuffix = 4;     // '.lld'
       const uint32_t DebugInfoNameNullAndPad = 4; // '\0\0\0\0'