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 name;
|
||||
while (type->isPointerTy()) {
|
||||
name += "conte ";
|
||||
type = type->getPointerElementType();
|
||||
}
|
||||
name += getSourceBaseType(type);
|
||||
return name;
|
||||
// TODO: Show the pointer type, if possible.
|
||||
return type->isPointerTy() ? "conte" : getSourceBaseType(type);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
Reference in New Issue
Block a user