瀏覽代碼

[spirv] Cleanup the createStageVars function.

This change tries to make this function less messy and uses QualType
rather than integer type-id as much as possible. This will help with
switching to the new infrastructure.
Ehsan Nasiri 6 年之前
父節點
當前提交
920e85c140
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tools/clang/lib/SPIRV/DeclResultIdMapper.cpp

+ 2 - 2
tools/clang/lib/SPIRV/DeclResultIdMapper.cpp

@@ -1422,8 +1422,8 @@ bool DeclResultIdMapper::createStageVars(
     return true;
   }
 
-  // uint32_t typeId = typeTranslator.translateType(type);
-  const SpirvType *spvType = nullptr;
+  // The type the variable is evaluated as for SPIR-V.
+  QualType evalType = type;
 
   // We have several cases regarding HLSL semantics to handle here:
   // * If the currrent decl inherits a semantic from some enclosing entity,