forked from OSchip/llvm-project
[Coroutines] Support opaque pointers in solveTypeName()
As far as I can tell, these names are only intended to be informative, so just use a generic "PointerType" for opaque pointers. The code in solveDIType() also treats pointers as basic types (and does not try to encode the pointed-to type further), so I believe this should be fine. Differential Revision: https://reviews.llvm.org/D121280
This commit is contained in:
parent
0803dba7dd
commit
479d684ba5
|
@ -808,9 +808,10 @@ static StringRef solveTypeName(Type *Ty) {
|
|||
return "__floating_type_";
|
||||
}
|
||||
|
||||
if (Ty->isPointerTy()) {
|
||||
auto *PtrTy = cast<PointerType>(Ty);
|
||||
Type *PointeeTy = PtrTy->getPointerElementType();
|
||||
if (auto *PtrTy = dyn_cast<PointerType>(Ty)) {
|
||||
if (PtrTy->isOpaque())
|
||||
return "PointerType";
|
||||
Type *PointeeTy = PtrTy->getNonOpaquePointerElementType();
|
||||
auto Name = solveTypeName(PointeeTy);
|
||||
if (Name == "UnknownType")
|
||||
return "PointerType";
|
||||
|
|
Loading…
Reference in New Issue