================ @@ -3606,22 +3606,33 @@ llvm::GlobalVariable *ItaniumRTTIBuilder::GetAddrOfTypeName( llvm::raw_svector_ostream Out(Name); CGM.getCXXABI().getMangleContext().mangleCXXRTTIName(Ty, Out); - // We know that the mangled name of the type starts at index 4 of the - // mangled name of the typename, so we can just index into it in order to - // get the mangled name of the type. + // RTTI type-name symbol has form "_ZTS<mangled-string>". The string stored in + // type_info object excludes the "_ZTS" prefix. So we skip past the first 4 + // characters. For types that do not have externally visible Clang/C++ + // linkage, '*' is prepended to the type-name string so that within libstdc++ + // RTTI names compare correctly via strcmp across translation units. LLVM + // internal linkage marks incomplete types as internal linkage, resulting in ---------------- matthew-j-code wrote:
Updated the comment accordingly https://github.com/llvm/llvm-project/pull/220864 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
