Decode opaque types in the runtime demangler.

This commit is contained in:
Joe Groff
2019-03-14 20:53:26 -07:00
parent a3c17bd080
commit 95c43f4e18
17 changed files with 397 additions and 171 deletions

View File

@@ -359,6 +359,12 @@ llvm::Constant *IRGenModule::getAddrOfStringForTypeRef(
}
// \1 - direct reference, \2 - indirect reference
baseKind = 1;
} else if (auto copaque = symbolic.first.dyn_cast<const OpaqueTypeDecl*>()){
auto opaque = const_cast<OpaqueTypeDecl*>(copaque);
IRGen.noteUseOfOpaqueTypeDescriptor(opaque);
ref = getAddrOfLLVMVariableOrGOTEquivalent(
LinkEntity::forOpaqueTypeDescriptor(opaque));
baseKind = 1;
} else {
llvm_unreachable("unhandled symbolic referent");
}