Created
July 9, 2018 19:20
-
-
Save mortenbekditlevsen/563013b3cb12b6093fcdb91a2f3a5691 to your computer and use it in GitHub Desktop.
IR code from the Foundation module built with the PR from https://github.com/apple/swift/pull/16238
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am including parts of the IR code generated for i386 / iphone simulator (where the crash occurs) followed by corresponding parts fom x86_64 (non-crashing): | |
The crash was due to missing / garbage witness table data for the _JSONStringKeyedDictionaryEncodableMarker, so this is what I have been focusing on - skipping a few occurrances that I somehow don't think are relevant. | |
i386: | |
%T10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP = type { [12 x i8], %swift.type*, i8** } | |
x64_64: | |
%T10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP = type { [24 x i8], %swift.type*, i8** } | |
i386: | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWp" = internal constant [1 x i8*] [i8* bitcast ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" to i8*)], align 4 | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG" = internal constant %swift.generic_witness_table_cache { i16 1, i16 1, i32 add (i32 sub (i32 ptrtoint (%swift.protocol** @"got.$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i32), i32 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 2) to i32)), i32 1), i32 sub (i32 ptrtoint ([1 x i8*]* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWp" to i32), i32 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 3) to i32)), i32 0, i32 sub (i32 ptrtoint (void (i8**, %swift.type*, i8**)* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI" to i32), i32 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 5) to i32)), i32 sub (i32 ptrtoint ([16 x i8*]* @340 to i32), i32 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 6) to i32)) }, align 4 | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" = internal constant %swift.protocol { i8* null, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @878, i32 0, i32 0), i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i32 40, i32 7, i32 0, i32 0, i32 0, i32 0 }, align 4 | |
@"got.$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" = private unnamed_addr constant %swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" | |
x86_64: | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWp" = internal constant [1 x i8*] [i8* bitcast ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" to i8*)], align 8 | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG" = internal constant %swift.generic_witness_table_cache { i16 1, i16 1, i32 add (i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol** @"got.$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i64), i64 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 2) to i64)) to i32), i32 1), i32 trunc (i64 sub (i64 ptrtoint ([1 x i8*]* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWp" to i64), i64 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 3) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (void (i8**, %swift.type*, i8**)* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI" to i64), i64 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 5) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8*]* @274 to i64), i64 ptrtoint (i32* getelementptr inbounds (%swift.generic_witness_table_cache, %swift.generic_witness_table_cache* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", i32 0, i32 6) to i64)) to i32) }, align 8 | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" = internal constant %swift.protocol { i8* null, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @817, i64 0, i64 0), i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i32 72, i32 7, i32 0, i32 0, i32 0, i32 0 }, align 8 | |
@"got.$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" = private unnamed_addr constant %swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" | |
i386: | |
@"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP" = linkonce_odr hidden constant <{ [90 x i8], i8 }> <{ [90 x i8] c"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP", i8 0 }>, section "__TEXT,__swift5_typeref, regular, no_dead_strip", align 1 | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF" = internal constant { i32, i32, i16, i16, i32 } { i32 sub (i32 ptrtoint (<{ [90 x i8], i8 }>* @"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP" to i32), i32 ptrtoint ({ i32, i32, i16, i16, i32 }* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF" to i32)), i32 0, i16 4, i16 12, i32 0 }, section "__TEXT,__swift5_fieldmd, regular, no_dead_strip", align 4 | |
@878 = private unnamed_addr constant [91 x i8] c"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP\00" | |
x86_64: | |
@"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP" = linkonce_odr hidden constant <{ [90 x i8], i8 }> <{ [90 x i8] c"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP", i8 0 }>, section "__TEXT,__swift5_typeref, regular, no_dead_strip", align 1 | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF" = internal constant { i32, i32, i16, i16, i32 } { i32 trunc (i64 sub (i64 ptrtoint (<{ [90 x i8], i8 }>* @"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP" to i64), i64 ptrtoint ({ i32, i32, i16, i16, i32 }* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF" to i64)) to i32), i32 0, i16 4, i16 12, i32 0 }, section "__TEXT,__swift5_fieldmd, regular, no_dead_strip", align 4 | |
@817 = private unnamed_addr constant [91 x i8] c"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP\00" | |
i386: | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pML" = linkonce_odr hidden local_unnamed_addr global %swift.type* null, align 4 | |
x86_64: | |
@"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pML" = linkonce_odr hidden local_unnamed_addr global %swift.type* null, align 8 | |
i386: | |
@"\01l_protocols" = private constant [13 x %swift.protocolref] [%swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation14_MutableBoxingMp" to i32), i32 ptrtoint ([13 x %swift.protocolref]* @"\01l_protocols" to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 1, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryDecodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 2, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation14LocalizedErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 3, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation16RecoverableErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 4, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation13CustomNSErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 5, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation26_ObjectiveCBridgeableErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 6, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation15_BridgedNSErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 7, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation21_BridgedStoredNSErrorMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 8, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation18_ErrorCodeProtocolMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 9, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation27_KeyValueCodingAndObservingMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 10, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation32NSKeyValueObservingCustomizationMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 11, i32 0) to i32)) }, %swift.protocolref { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation20ReferenceConvertibleMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 12, i32 0) to i32)) }], section "__TEXT, __swift5_protos, regular, no_dead_strip", align 4 | |
x86_64: | |
@"\01l_protocols" = private constant [13 x %swift.protocolref] [%swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation14_MutableBoxingMp" to i64), i64 ptrtoint ([13 x %swift.protocolref]* @"\01l_protocols" to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 1, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryDecodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 2, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation14LocalizedErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 3, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation16RecoverableErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 4, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation13CustomNSErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 5, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation26_ObjectiveCBridgeableErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 6, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation15_BridgedNSErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 7, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation21_BridgedStoredNSErrorMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 8, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation18_ErrorCodeProtocolMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 9, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation27_KeyValueCodingAndObservingMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 10, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation32NSKeyValueObservingCustomizationMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 11, i32 0) to i64)) to i32) }, %swift.protocolref { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation20ReferenceConvertibleMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ([13 x %swift.protocolref], [13 x %swift.protocolref]* @"\01l_protocols", i32 0, i32 12, i32 0) to i64)) to i32) }], section "__TEXT, __swift5_protos, regular, no_dead_strip", align 4 | |
i386: | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" = internal constant { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } { i32 sub (i32 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i32), i32 ptrtoint ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" to i32)), i32 sub (i32 ptrtoint (%swift.type_descriptor** @"got.$Ss10DictionaryVMn" to i32), i32 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 1) to i32)), i32 sub (i32 ptrtoint (i8** (%swift.type*, i8***)* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa" to i32), i32 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 2) to i32)), i32 522, i32 1, i32 0, i32 sub (i32 ptrtoint (<{ [2 x i8], i8 }>* @"symbolic SS" to i32), i32 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 6) to i32)), i32 128, i32 2, i32 add (i32 sub (i32 ptrtoint (%swift.protocol** @"got.$Ss9EncodableMp" to i32), i32 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 9) to i32)), i32 1) }, align 4 | |
x86_64: | |
@"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" = internal constant { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp" to i64), i64 ptrtoint ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc" to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (%swift.type_descriptor** @"got.$Ss10DictionaryVMn" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 1) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (i8** (%swift.type*, i8***)* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 2) to i64)) to i32), i32 522, i32 1, i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ [2 x i8], i8 }>* @"symbolic SS" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 6) to i64)) to i32), i32 128, i32 2, i32 add (i32 trunc (i64 sub (i64 ptrtoint (%swift.protocol** @"got.$Ss9EncodableMp" to i64), i64 ptrtoint (i32* getelementptr inbounds ({ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }, { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }* @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlMc", i32 0, i32 9) to i64)) to i32), i32 1) }, align 8 | |
//skipped a few really, really long lines with references to the _JSONStringA15EncodableMarker protocol here | |
i386: | |
define internal swiftcc i32 @"$S10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgs9Encodable_pKF"(%Ts9EncodableP* noalias nocapture dereferenceable(20), %T10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC* swiftself, %swift.error**) unnamed_addr #0 !dbg !57032 { | |
entry: | |
%3 = alloca { i32, i32 }, align 4 | |
%4 = alloca %Ts7EncoderP, align 4 | |
%5 = alloca %Ts7EncoderP, align 4 | |
%6 = alloca { i32, i32 }, align 4 | |
%7 = alloca %Ts7EncoderP, align 4 | |
%call.aggresult.i = alloca %struct._SwiftNSOperatingSystemVersion, align 4 | |
%8 = alloca { i32, i32, i32, i32, i32, i32, i32, i32, i32 }, align 4 | |
%9 = alloca %TSS, align 4 | |
%10 = alloca %swift.type*, align 4 | |
%11 = alloca %TSS, align 4 | |
%12 = alloca %TSS, align 4 | |
%13 = alloca %TSS, align 4 | |
%14 = alloca %TSS, align 4 | |
%15 = alloca %TSS, align 4 | |
%16 = alloca %TSS, align 4 | |
%17 = alloca %swift.type*, align 4 | |
%18 = alloca %TSS, align 4 | |
%19 = alloca %TSS, align 4 | |
%20 = alloca %TSS, align 4 | |
%21 = alloca %swift.type*, align 4 | |
%22 = alloca %TSS, align 4 | |
%23 = alloca %TSS, align 4 | |
%protocols.i = alloca [1 x %swift.protocol*], align 4 | |
%24 = alloca %Ts9EncodableP, align 4 | |
%25 = alloca %T10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP, align 4 | |
%26 = alloca %Ts7EncoderP, align 4 | |
%27 = alloca %Ts9EncodableP, align 4 | |
%28 = alloca i32, align 4 | |
%29 = alloca %Ts9EncodableP, align 4 | |
%30 = alloca %TSo15NSDecimalNumberC*, align 4 | |
%31 = alloca %Ts9EncodableP, align 4 | |
%32 = alloca %T10Foundation3URLV, align 4 | |
%33 = alloca %Ts9EncodableP, align 4 | |
%34 = alloca %T10Foundation4DataV, align 4 | |
%35 = alloca %Ts9EncodableP, align 4 | |
%36 = alloca %T10Foundation4DateV, align 8 | |
call void @llvm.dbg.value(metadata %Ts9EncodableP* %0, metadata !57036, metadata !DIExpression(DW_OP_deref)), !dbg !57038 | |
call void @llvm.dbg.value(metadata %T10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC* %1, metadata !57039, metadata !DIExpression()), !dbg !57040 | |
%37 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i32 0, i32 1, !dbg !57041 | |
%38 = load %swift.type*, %swift.type** %37, align 4, !dbg !57041 | |
%39 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i32 0, i32 0, !dbg !57041 | |
%40 = tail call %swift.opaque* @__swift_project_boxed_opaque_existential_0([12 x i8]* %39, %swift.type* %38), !dbg !57041 | |
%41 = tail call %swift.type* @swift_getDynamicType(%swift.opaque* %40, %swift.type* %38, i1 true), !dbg !57041 | |
%42 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i32 0, i32 2, !dbg !57041 | |
call void @llvm.dbg.value(metadata %swift.type* %41, metadata !57043, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !57045 | |
call void @llvm.dbg.value(metadata i8*** %42, metadata !57043, metadata !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 32, 32)), !dbg !57045 | |
%43 = icmp eq %swift.type* %41, bitcast (i32* getelementptr inbounds (<{ i8**, i32, <{ i32, i32, i32, i32, i32, i32 }>*, i32 }>, <{ i8**, i32, <{ i32, i32, i32, i32, i32, i32 }>*, i32 }>* @"$S10Foundation4DateVMf", i32 0, i32 1) to %swift.type*), !dbg !57046 | |
br i1 %43, label %52, label %44, !dbg !57054 | |
; <label>:44: ; preds = %entry | |
%45 = load %swift.type*, %swift.type** @"$SSo6NSDateCML", align 4, !dbg !57055 | |
%46 = icmp eq %swift.type* %45, null, !dbg !57055 | |
br i1 %46, label %cacheIsNull.i, label %"$SSo6NSDateCMa.exit", !dbg !57055 | |
x86_64: | |
define internal swiftcc i64 @"$S10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC4box_ySo8NSObjectCSgs9Encodable_pKF"(%Ts9EncodableP* noalias nocapture dereferenceable(40), %T10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC* swiftself, %swift.error** swifterror) unnamed_addr #4 !dbg !58661 { | |
entry: | |
%3 = alloca { i64, i64 }, align 8 | |
%4 = alloca %Ts7EncoderP, align 8 | |
%5 = alloca %Ts7EncoderP, align 8 | |
%6 = alloca { i64, i64 }, align 8 | |
%7 = alloca %Ts7EncoderP, align 8 | |
%call.aggresult.i = alloca %struct._SwiftNSOperatingSystemVersion, align 8 | |
%8 = alloca { i64, i64, i64, i64, i64, i64 }, align 8 | |
%9 = alloca %TSS, align 8 | |
%10 = alloca %TSS, align 8 | |
%11 = alloca %TSS, align 8 | |
%12 = alloca %TSS, align 8 | |
%13 = alloca %TSS, align 8 | |
%14 = alloca %TSS, align 8 | |
%15 = alloca %TSS, align 8 | |
%16 = alloca %TSS, align 8 | |
%17 = alloca %TSS, align 8 | |
%protocols.i = alloca [1 x %swift.protocol*], align 8 | |
%18 = alloca %Ts9EncodableP, align 8 | |
%19 = alloca %T10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP, align 8 | |
%20 = alloca %Ts7EncoderP, align 8 | |
%21 = alloca %Ts9EncodableP, align 8 | |
%22 = alloca i64, align 8 | |
%23 = alloca %Ts9EncodableP, align 8 | |
%24 = alloca %TSo15NSDecimalNumberC*, align 8 | |
%25 = alloca %Ts9EncodableP, align 8 | |
%26 = alloca %T10Foundation3URLV, align 8 | |
%27 = alloca %Ts9EncodableP, align 8 | |
%28 = alloca %T10Foundation4DataV, align 8 | |
%29 = alloca %Ts9EncodableP, align 8 | |
%30 = alloca %T10Foundation4DateV, align 8 | |
call void @llvm.dbg.value(metadata %Ts9EncodableP* %0, metadata !58665, metadata !DIExpression(DW_OP_deref)), !dbg !58667 | |
call void @llvm.dbg.value(metadata %T10Foundation12_JSONEncoder33_12768CA107A31EF2DCE034FD75B541C9LLC* %1, metadata !58668, metadata !DIExpression()), !dbg !58669 | |
%31 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i64 0, i32 1, !dbg !58670 | |
%32 = load %swift.type*, %swift.type** %31, align 8, !dbg !58670 | |
%33 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i64 0, i32 0, !dbg !58670 | |
%34 = tail call %swift.opaque* @__swift_project_boxed_opaque_existential_0([24 x i8]* %33, %swift.type* %32), !dbg !58670 | |
%35 = tail call %swift.type* @swift_getDynamicType(%swift.opaque* %34, %swift.type* %32, i1 true), !dbg !58670 | |
%36 = getelementptr inbounds %Ts9EncodableP, %Ts9EncodableP* %0, i64 0, i32 2, !dbg !58670 | |
call void @llvm.dbg.value(metadata %swift.type* %35, metadata !58672, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !58674 | |
call void @llvm.dbg.value(metadata i8*** %36, metadata !58672, metadata !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 64, 64)), !dbg !58674 | |
%37 = icmp eq %swift.type* %35, bitcast (i64* getelementptr inbounds (<{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>*, i32, [4 x i8] }>, <{ i8**, i64, <{ i32, i32, i32, i32, i32, i32 }>*, i32, [4 x i8] }>* @"$S10Foundation4DateVMf", i64 0, i32 1) to %swift.type*), !dbg !58675 | |
br i1 %37, label %46, label %38, !dbg !58683 | |
; <label>:38: ; preds = %entry | |
%39 = load %swift.type*, %swift.type** @"$SSo6NSDateCML", align 8, !dbg !58684 | |
%40 = icmp eq %swift.type* %39, null, !dbg !58684 | |
br i1 %40, label %cacheIsNull.i, label %"$SSo6NSDateCMa.exit", !dbg !58684 | |
// Skipped references similar to this, but for other types | |
i386: | |
; Function Attrs: nounwind readonly | |
define internal i8** @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa"(%swift.type* readonly, i8*** readonly) #6 !dbg !148873 { | |
entry: | |
%2 = tail call i8** @swift_getGenericWitnessTable(%swift.generic_witness_table_cache* nonnull @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", %swift.type* %0, i8*** %1) #16, !dbg !148874 | |
ret i8** %2, !dbg !148874 | |
} | |
x86_64: | |
; Function Attrs: nounwind readonly | |
define internal i8** @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa"(%swift.type* readonly, i8*** readonly) #0 !dbg !154762 { | |
entry: | |
%2 = tail call i8** @swift_getGenericWitnessTable(%swift.generic_witness_table_cache* nonnull @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWG", %swift.type* %0, i8*** %1) #7, !dbg !154763 | |
ret i8** %2, !dbg !154763 | |
} | |
i386: | |
; Function Attrs: norecurse nounwind | |
define internal void @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI"(i8** nocapture, %swift.type* nocapture readnone, i8** nocapture readonly) #5 { | |
tail call void @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15DecodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI"(i8** nocapture %0, %swift.type* nocapture readnone %1, i8** nocapture readonly %2) #5 | |
ret void | |
} | |
x86_64: | |
; Function Attrs: norecurse nounwind | |
define internal void @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI"(i8** nocapture, %swift.type* nocapture readnone, i8** nocapture readonly) #12 { | |
tail call void @"$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15DecodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWI"(i8** nocapture %0, %swift.type* nocapture readnone %1, i8** nocapture readonly %2) #12 | |
ret void | |
} | |
i386: | |
!1322 = !{<{ [90 x i8], i8 }>* @"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP", null, null, i1 false, i1 true} | |
!1323 = !{{ i32, i32, i16, i16, i32 }* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF", null, null, i1 false, i1 true} | |
!1324 = !{%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp", null, null, i1 false, i1 true} | |
x86_64: | |
!1340 = !{<{ [90 x i8], i8 }>* @"symbolic $S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLP", null, null, i1 false, i1 true} | |
!1341 = !{{ i32, i32, i16, i16, i32 }* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMF", null, null, i1 false, i1 true} | |
!1342 = !{%swift.protocol* @"$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLMp", null, null, i1 false, i1 true} | |
i386: | |
!57956 = distinct !DISubprogram(linkageName: "$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMa", scope: !2, file: !2833, type: !2987, isLocal: false, isDefinition: true, flags: DIFlagArtificial, isOptimized: true, unit: !249, variables: !7) | |
x86_64: | |
!59614 = distinct !DISubprogram(linkageName: "$S10Foundation36_JSONStringDictionaryEncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LL_pMa", scope: !2, file: !2871, type: !3257, isLocal: false, isDefinition: true, flags: DIFlagArtificial, isOptimized: true, unit: !253, variables: !5) | |
i386: | |
!148873 = distinct !DISubprogram(linkageName: "$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa", scope: !2, file: !2833, type: !2987, isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: true, unit: !249, variables: !7) | |
x86_64: | |
!154762 = distinct !DISubprogram(linkageName: "$Ss10DictionaryVyxq_G10Foundation011_JSONStringA15EncodableMarker33_12768CA107A31EF2DCE034FD75B541C9LLADSSRszs0D0R_rlWa", scope: !2, file: !2871, type: !3257, isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: true, unit: !253, variables: !5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment