@@ -2918,9 +2918,11 @@ void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
2918
2918
static const char *Tau = u8" \u03C4 " ;
2919
2919
llvm::raw_svector_ostream OS (Buf);
2920
2920
OS << ' $' << Tau << ' _' << Depth << ' _' << Index;
2921
+ uint64_t PtrWidthInBits = CI.getTargetInfo ().getPointerWidth (0 );
2922
+ assert (PtrWidthInBits % 8 == 0 );
2921
2923
auto DbgTy = DebugTypeInfo::getTypeMetadata (
2922
2924
getMetadataType (Name)->getDeclaredInterfaceType ().getPointer (),
2923
- Metadata->getType (), Size (CI. getTargetInfo (). getPointerWidth ( 0 ) ),
2925
+ Metadata->getType (), Size (PtrWidthInBits / 8 ),
2924
2926
Alignment (CI.getTargetInfo ().getPointerAlign (0 )));
2925
2927
emitVariableDeclaration (IGF.Builder , Metadata, DbgTy, IGF.getDebugScope (),
2926
2928
{}, {OS.str ().str (), 0 , false },
@@ -2931,7 +2933,8 @@ void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
2931
2933
ArtificialValue);
2932
2934
}
2933
2935
2934
- SILLocation::FilenameAndLocation IRGenDebugInfoImpl::decodeSourceLoc (SourceLoc SL) {
2936
+ SILLocation::FilenameAndLocation
2937
+ IRGenDebugInfoImpl::decodeSourceLoc (SourceLoc SL) {
2935
2938
auto &Cached = FilenameAndLocationCache[SL.getOpaquePointerValue ()];
2936
2939
if (Cached.filename .empty ())
2937
2940
Cached = sanitizeCodeViewFilenameAndLocation (SILLocation::decode (SL, SM));
0 commit comments