Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@carlokok

carlokok/test.ll Secret

Last active October 4, 2018 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlokok/3ba9cb1a36a145a3071a7b901867d442 to your computer and use it in GitHub Desktop.
Save carlokok/3ba9cb1a36a145a3071a7b901867d442 to your computer and use it in GitHub Desktop.
; ModuleID = 'test7.ll'
source_filename = "9a499c9817486dc9d636a4d8c245943d-Test"
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc"
%._issue81139_static_dispatchtest.Test = type { %._RemObjects.Elements.System.Object }
%._RemObjects.Elements.System.Object = type { i8* }
%._issue81139_static_dispatchtest.ITestIntf = type { %._RemObjects.Elements.System.Object }
%._RemObjects.Elements.System.String = type { %._RemObjects.Elements.System.Object, i32, i16 }
$_intfstub_mi_t27_issue81139__static__dispatchtest_d_Test4_Test = comdat any
@_rtti_o = external global i8
@_rtti_t2c_issue81139__static__dispatchtest_d_ITestIntf = external global i8
@.str0 = private unnamed_addr constant [36 x i8] c"issue81139_static_dispatchtest.Test\00", align 1
@_typeinfo__rtti_t27_issue81139__static__dispatchtest_d_Test = private constant i8* bitcast ({ { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 }*, i8*, i8*, i8*, [16 x i8], i8*, i8*, i8*, i8*, i8* }* @_rtti_t27_issue81139__static__dispatchtest_d_Test to i8*), section "ELRTTLRR$data", align 4
@_extmd__rtti_t27_issue81139__static__dispatchtest_d_Test = constant [55 x i8] c"X\00`\04\1B\0E\00\00\00\12\04TestH\050\008\04\18`\1B\0C\00\00\00\12\04MainH\050\01\18\01\1B\09\00\00\00\12\01.H\050\02\18\02\06"
@_extmdd__rtti_t27_issue81139__static__dispatchtest_d_Test = constant { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** } { void (%._issue81139_static_dispatchtest.Test*)* @mi_t27_issue81139__static__dispatchtest_d_Test4_Test, void ()* @__elements_entry_point_main, void (%._issue81139_static_dispatchtest.Test*)* @mi_t27_issue81139__static__dispatchtest_d_Test3__d_, i8** @_typeinfo__rtti_t27_issue81139__static__dispatchtest_d_Test }
@_ext__rtti_t27_issue81139__static__dispatchtest_d_Test = constant { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 } { i64 16, [36 x i8]* @.str0, i8* null, [55 x i8]* @_extmd__rtti_t27_issue81139__static__dispatchtest_d_Test, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }* @_extmdd__rtti_t27_issue81139__static__dispatchtest_d_Test, i8* null, i32 4 }
@_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmt = constant { void (i32, i8*)* } { void (i32, i8*)* @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmthelper0 }
@_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmt1 = constant { i8*, i8* } { i8* @_rtti_t2c_issue81139__static__dispatchtest_d_ITestIntf, i8* null }
@_intf__rtti_t27_issue81139__static__dispatchtest_d_Test = constant { i32, i8*, i8*, { i8*, i8* }*, i8*, i8* } { i32 5, i8* null, i8* null, { i8*, i8* }* @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmt1, i8* null, i8* null }
@_rtti_t27_issue81139__static__dispatchtest_d_Test = constant { { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 }*, i8*, i8*, i8*, [16 x i8], i8*, i8*, i8*, i8*, i8* } { { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 }* @_ext__rtti_t27_issue81139__static__dispatchtest_d_Test, i8* @_rtti_o, i8* bitcast ({ i32, i8*, i8*, { i8*, i8* }*, i8*, i8* }* @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test to i8*), i8* bitcast ({ void (i32, i8*)* }* @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmt to i8*), [16 x i8] c"\CCJ\97]\05\DB\C0\EB\EFN\B8\1DB.\1A\D7", i8* bitcast (void (%._RemObjects.Elements.System.Object*)* @__default_finalize to i8*), i8* bitcast (%._RemObjects.Elements.System.String* (%._RemObjects.Elements.System.Object*)* @mi_o8_ToString to i8*), i8* bitcast (i32 (%._RemObjects.Elements.System.Object*)* @mi_ob_GetHashCode to i8*), i8* bitcast (i8 (%._RemObjects.Elements.System.Object*, %._RemObjects.Elements.System.Object*)* @mi_o6_Equalsno to i8*), i8* bitcast (void (%._issue81139_static_dispatchtest.Test*)* @mi_t27_issue81139__static__dispatchtest_d_Test4_Test to i8*) }
declare void @mi_t27_issue81139__static__dispatchtest_d_Test4_Test(%._issue81139_static_dispatchtest.Test*)
define void @__elements_entry_point_main() #0 {
BasicBlock7:
%0 = tail call nonnull i8* @ms_t28_RemObjects_d_Elements_d_System_d_BoehmGC3_Newnp_vni(i8* bitcast ({ { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 }*, i8*, i8*, i8*, [16 x i8], i8*, i8*, i8*, i8*, i8* }* @_rtti_t27_issue81139__static__dispatchtest_d_Test to i8*), i32 4)
%1 = bitcast i8* %0 to i8**
%2 = load i8*, i8** %1, align 4
%3 = icmp eq i8* %2, bitcast ({ { i64, [36 x i8]*, i8*, [55 x i8]*, { void (%._issue81139_static_dispatchtest.Test*)*, void ()*, void (%._issue81139_static_dispatchtest.Test*)*, i8** }*, i8*, i32 }*, i8*, i8*, i8*, [16 x i8], i8*, i8*, i8*, i8*, i8* }* @_rtti_t27_issue81139__static__dispatchtest_d_Test to i8*)
tail call void @llvm.assume(i1 %3)
%4 = bitcast i8* %0 to %._RemObjects.Elements.System.Object*
tail call void @mi_o3__d_(%._RemObjects.Elements.System.Object* nonnull %4)
%5 = bitcast i8* %0 to %._issue81139_static_dispatchtest.ITestIntf*
tail call void bitcast (void (i32, i8*)* @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmthelper0 to void (i32, i8*, %._issue81139_static_dispatchtest.ITestIntf*)*)(i32 -258462079, i8* nonnull @_rtti_t2c_issue81139__static__dispatchtest_d_ITestIntf, %._issue81139_static_dispatchtest.ITestIntf* nonnull %5)
ret void
}
define void @mi_t27_issue81139__static__dispatchtest_d_Test3__d_(%._issue81139_static_dispatchtest.Test*) #0 {
BasicBlock12:
%1 = getelementptr inbounds %._issue81139_static_dispatchtest.Test, %._issue81139_static_dispatchtest.Test* %0, i32 0, i32 0
tail call void @mi_o3__d_(%._RemObjects.Elements.System.Object* %1)
ret void
}
declare void @__default_finalize(%._RemObjects.Elements.System.Object*)
declare %._RemObjects.Elements.System.String* @mi_o8_ToString(%._RemObjects.Elements.System.Object*)
declare i32 @mi_ob_GetHashCode(%._RemObjects.Elements.System.Object*)
declare i8 @mi_o6_Equalsno(%._RemObjects.Elements.System.Object*, %._RemObjects.Elements.System.Object*)
define void @_intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmthelper0(i32, i8*) #1 {
BasicBlock0:
%2 = urem i32 %0, 5
%cond = icmp eq i32 %2, 2
br i1 %cond, label %BasicBlock2, label %BasicBlock1
BasicBlock1: ; preds = %BasicBlock4, %BasicBlock0
tail call void @__abstract()
unreachable
BasicBlock2: ; preds = %BasicBlock0
%3 = icmp eq i8* %1, @_rtti_t2c_issue81139__static__dispatchtest_d_ITestIntf
br i1 %3, label %BasicBlock3, label %BasicBlock4
BasicBlock3: ; preds = %BasicBlock4, %BasicBlock2
musttail call void bitcast (void (i32, i8*, %._issue81139_static_dispatchtest.Test*)* @_intfstub_mi_t27_issue81139__static__dispatchtest_d_Test4_Test to void (i32, i8*)*)(i32 %0, i8* %1)
ret void
BasicBlock4: ; preds = %BasicBlock2
%4 = getelementptr i8, i8* %1, i32 16
%5 = bitcast i8* %4 to i128*
%6 = load i128, i128* %5, align 8
%7 = load i128, i128* bitcast (i8* getelementptr (i8, i8* @_rtti_t2c_issue81139__static__dispatchtest_d_ITestIntf, i32 16) to i128*), align 8
%8 = icmp eq i128 %6, %7
br i1 %8, label %BasicBlock3, label %BasicBlock1
}
define weak_odr void @_intfstub_mi_t27_issue81139__static__dispatchtest_d_Test4_Test(i32, i8*, %._issue81139_static_dispatchtest.Test*) local_unnamed_addr comdat {
BasicBlock5:
tail call void @mi_t27_issue81139__static__dispatchtest_d_Test4_Test(%._issue81139_static_dispatchtest.Test* %2)
ret void
}
declare void @__abstract() local_unnamed_addr
declare i8* @ms_t28_RemObjects_d_Elements_d_System_d_BoehmGC3_Newnp_vni(i8*, i32) local_unnamed_addr
; Function Attrs: nounwind
declare void @llvm.assume(i1) #2
declare void @mi_o3__d_(%._RemObjects.Elements.System.Object*) local_unnamed_addr
attributes #0 = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }
attributes #1 = { "thunk"="true" }
attributes #2 = { nounwind }
!llvm.module.flags = !{!0, !1, !2}
!0 = !{i32 2, !"CodeView", i32 1}
!1 = !{i32 2, !"Dwarf Version", i32 4}
!2 = !{i32 2, !"Debug Info Version", i32 3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment