소스 검색

[spirv] Fix translation of InterlockedMethods (use canonical type).

Ehsan Nasiri 6 년 전
부모
커밋
9b9081c8bd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tools/clang/lib/SPIRV/SPIRVEmitter.cpp

+ 1 - 1
tools/clang/lib/SPIRV/SPIRVEmitter.cpp

@@ -6813,7 +6813,7 @@ SPIRVEmitter::processIntrinsicInterlockedMethod(const CallExpr *expr,
   const uint32_t zero = theBuilder.getConstantUint32(0);
   const uint32_t scope = theBuilder.getConstantUint32(1); // Device
   const auto *dest = expr->getArg(0);
-  const auto baseType = dest->getType();
+  const auto baseType = dest->getType()->getCanonicalTypeUnqualified();
 
   if (!baseType->isIntegerType()) {
     emitError("can only perform atomic operations on scalar integer values",