[spirv] use std::ostringstream to build string.
This commit is contained in:
Родитель
825156fd15
Коммит
59d6973a84
|
@ -297,10 +297,8 @@ const SpirvType *LowerTypeVisitor::lowerType(QualType type,
|
|||
// LowerTypeVisitor is invoked. We should error out if we encounter a
|
||||
// literal type.
|
||||
case BuiltinType::LitInt:
|
||||
// emitError("found literal int type when lowering types", srcLoc);
|
||||
return spvContext.getUIntType(64);
|
||||
case BuiltinType::LitFloat: {
|
||||
// emitError("found literal float type when lowering types", srcLoc);
|
||||
return spvContext.getFloatType(64);
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//===------- SpirvEmitter.h - SPIR-V Binary Code Emitter --------*- C++ -*-===//
|
||||
//===------- SpirvEmitter.cpp - SPIR-V Binary Code Emitter ------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#include "clang/SPIRV/SpirvType.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace clang {
|
||||
namespace spirv {
|
||||
|
||||
|
@ -167,9 +169,9 @@ std::string ImageType::getImageName(spv::Dim dim, bool arrayed) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
std::string name =
|
||||
std::string("type.") + dimStr + "image" + (arrayed ? ".array" : "");
|
||||
return name;
|
||||
std::ostringstream name;
|
||||
name << "type." << dimStr << "image" << (arrayed ? ".array" : "");
|
||||
return name.str();
|
||||
}
|
||||
|
||||
bool ImageType::operator==(const ImageType &that) const {
|
||||
|
|
Загрузка…
Ссылка в новой задаче