Browse Source

[spirv] Remove old comments/TODOs.

Ehsan Nasiri 6 years ago
parent
commit
1e9a00fc63

+ 0 - 2
tools/clang/include/clang/SPIRV/SpirvBuilder.h

@@ -487,8 +487,6 @@ public:
                llvm::StringRef name = "",
                llvm::Optional<SpirvInstruction *> init = llvm::None,
                SourceLocation loc = {});
-  // TODO(ehsan): This API should be removed once aliasing has been moved to a
-  // pass.
   SpirvVariable *
   addModuleVar(const SpirvType *valueType, spv::StorageClass storageClass,
                llvm::StringRef name = "",

+ 0 - 2
tools/clang/lib/SPIRV/AstTypeProbe.cpp

@@ -422,11 +422,9 @@ uint32_t getElementSpirvBitwidth(const ASTContext &astContext, QualType type,
       return is16BitTypeEnabled ? 16 : 32;
     }
     case BuiltinType::LitFloat: {
-      // TODO(ehsan): Literal types not handled properly.
       return 64;
     }
     case BuiltinType::LitInt: {
-      // TODO(ehsan): Literal types not handled properly.
       return 64;
     }
     default:

+ 0 - 4
tools/clang/lib/SPIRV/DeclResultIdMapper.cpp

@@ -930,10 +930,6 @@ DeclResultIdMapper::getCounterVarFields(const DeclaratorDecl *decl) {
 
 void DeclResultIdMapper::registerSpecConstant(const VarDecl *decl,
                                               SpirvInstruction *specConstant) {
-  // TODO(ehsan): Remove the following line once we are sure the instruction
-  // that was created prior to calling this function was in fact a spec constant
-  // instruction.
-  // specConstant->setSpecConstant();
   specConstant->setRValue();
   astDecls[decl] = DeclSpirvInfo(specConstant);
 }

+ 5 - 5
tools/clang/lib/SPIRV/LowerTypeVisitor.cpp

@@ -315,14 +315,14 @@ const SpirvType *LowerTypeVisitor::lowerType(QualType type,
         case BuiltinType::Min16UInt:
           return spvContext.getUIntType(use16Bit ? 16 : 32);
 
-        // Literal types.
+        // All literal types should have been lowered to concrete types before
+        // LowerTypeVisitor is invoked. We should error out if we encounter a
+        // literal type.
         case BuiltinType::LitInt:
-          // TODO: analyze adjacent instructions for type hints
-          // emitError("TODO: literal int", srcLoc);
+          emitError("found literal int type when lowering types", srcLoc);
           return spvContext.getUIntType(64);
         case BuiltinType::LitFloat: {
-          // TODO: analyze adjacent instructions for type hints
-          // emitError("TODO: literal float", srcLoc);
+          emitError("found literal float type when lowering types", srcLoc);
           return spvContext.getFloatType(64);
 
         default: