Make the debug type printer compatible with opaque pointers.
This makes the code compatible with both LLVM 14 and 15.
This commit is contained in:
parent
ef048aa324
commit
f7fc90d98d
|
@ -445,13 +445,8 @@ const char* IRGenerator::getSourceBaseType(llvm::Type* type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string IRGenerator::getSourceType(llvm::Type* type) {
|
std::string IRGenerator::getSourceType(llvm::Type* type) {
|
||||||
std::string name;
|
// TODO: Show the pointer type, if possible.
|
||||||
while (type->isPointerTy()) {
|
return type->isPointerTy() ? "conte" : getSourceBaseType(type);
|
||||||
name += "conte ";
|
|
||||||
type = type->getPointerElementType();
|
|
||||||
}
|
|
||||||
name += getSourceBaseType(type);
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
Reference in New Issue
Block a user