1; RUN: llc < %s -filetype=obj | llvm-readobj - --codeview | FileCheck %s 2; RUN: llc < %s | llvm-mc -filetype=obj --triple=x86_64-windows | llvm-readobj - --codeview | FileCheck %s 3; RUN: llc < %s | FileCheck %s --check-prefix=ASM 4 5; C++ source to regenerate: 6; $ cat t.cpp 7; struct A { 8; int a; 9; void f(); 10; }; 11; void usevars(int, ...); 12; void f(float p1, double p2, long long p3) { 13; int v1 = p3; 14; int *v2 = &v1; 15; const int *v21 = &v1; 16; void *v3 = &v1; 17; int A::*v4 = &A::a; 18; void (A::*v5)() = &A::f; 19; long l1 = 0; 20; long int l2 = 0; 21; unsigned long l3 = 0; 22; unsigned long int l4 = 0; 23; const void *v6 = &v1; 24; usevars(v1, v2, v3, l1, l2, l3, l4); 25; } 26; void CharTypes() { 27; signed wchar_t w; 28; unsigned short us; 29; char c; 30; unsigned char uc; 31; signed char sc; 32; char16_t c16; 33; char32_t c32; 34; } 35; $ clang t.cpp -S -emit-llvm -g -gcodeview -o t.ll 36 37; CHECK: CodeViewTypes [ 38; CHECK: Section: .debug$T (6) 39; CHECK: Magic: 0x4 40; CHECK: ArgList (0x1000) { 41; CHECK: TypeLeafKind: LF_ARGLIST (0x1201) 42; CHECK: NumArgs: 3 43; CHECK: Arguments [ 44; CHECK: ArgType: float (0x40) 45; CHECK: ArgType: double (0x41) 46; CHECK: ArgType: __int64 (0x13) 47; CHECK: ] 48; CHECK: } 49; CHECK: Procedure (0x1001) { 50; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) 51; CHECK: ReturnType: void (0x3) 52; CHECK: CallingConvention: NearC (0x0) 53; CHECK: FunctionOptions [ (0x0) 54; CHECK: ] 55; CHECK: NumParameters: 3 56; CHECK: ArgListType: (float, double, __int64) (0x1000) 57; CHECK: } 58; CHECK: FuncId (0x1002) { 59; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) 60; CHECK: ParentScope: 0x0 61; CHECK: FunctionType: void (float, double, __int64) (0x1001) 62; CHECK: Name: f 63; CHECK: } 64; CHECK: Modifier (0x1003) { 65; CHECK: TypeLeafKind: LF_MODIFIER (0x1001) 66; CHECK: ModifiedType: int (0x74) 67; CHECK: Modifiers [ (0x1) 68; CHECK: Const (0x1) 69; CHECK: ] 70; CHECK: } 71; CHECK: Pointer (0x1004) { 72; CHECK: TypeLeafKind: LF_POINTER (0x1002) 73; CHECK: PointeeType: const int (0x1003) 74; CHECK: PtrType: Near64 (0xC) 75; CHECK: PtrMode: Pointer (0x0) 76; CHECK: IsFlat: 0 77; CHECK: IsConst: 0 78; CHECK: IsVolatile: 0 79; CHECK: IsUnaligned: 0 80; CHECK: } 81; CHECK: Struct (0x1005) { 82; CHECK: TypeLeafKind: LF_STRUCTURE (0x1505) 83; CHECK: MemberCount: 0 84; CHECK: Properties [ (0x80) 85; CHECK: ForwardReference (0x80) 86; CHECK: ] 87; CHECK: FieldList: 0x0 88; CHECK: DerivedFrom: 0x0 89; CHECK: VShape: 0x0 90; CHECK: SizeOf: 0 91; CHECK: Name: A 92; CHECK: } 93; CHECK: Pointer (0x1006) { 94; CHECK: TypeLeafKind: LF_POINTER (0x1002) 95; CHECK: PointeeType: int (0x74) 96; CHECK: PtrType: Near64 (0xC) 97; CHECK: PtrMode: PointerToDataMember (0x2) 98; CHECK: IsFlat: 0 99; CHECK: IsConst: 0 100; CHECK: IsVolatile: 0 101; CHECK: IsUnaligned: 0 102; CHECK: ClassType: A (0x1005) 103; CHECK: Representation: GeneralData (0x4) 104; CHECK: } 105; CHECK: Pointer (0x1007) { 106; CHECK: TypeLeafKind: LF_POINTER (0x1002) 107; CHECK: PointeeType: A (0x1005) 108; CHECK: PtrType: Near64 (0xC) 109; CHECK: PtrMode: Pointer (0x0) 110; CHECK: IsFlat: 0 111; CHECK: IsConst: 1 112; CHECK: IsVolatile: 0 113; CHECK: IsUnaligned: 0 114; CHECK: } 115; CHECK: ArgList (0x1008) { 116; CHECK: TypeLeafKind: LF_ARGLIST (0x1201) 117; CHECK: NumArgs: 0 118; CHECK: Arguments [ 119; CHECK: ] 120; CHECK: } 121; CHECK: MemberFunction (0x1009) { 122; CHECK: TypeLeafKind: LF_MFUNCTION (0x1009) 123; CHECK: ReturnType: void (0x3) 124; CHECK: ClassType: A (0x1005) 125; CHECK: ThisType: A* const (0x1007) 126; CHECK: CallingConvention: NearC (0x0) 127; CHECK: FunctionOptions [ (0x0) 128; CHECK: ] 129; CHECK: NumParameters: 0 130; CHECK: ArgListType: () (0x1008) 131; CHECK: ThisAdjustment: 0 132; CHECK: } 133; CHECK: FieldList (0x100A) { 134; CHECK: TypeLeafKind: LF_FIELDLIST (0x1203) 135; CHECK: DataMember { 136; CHECK: AccessSpecifier: Public (0x3) 137; CHECK: Type: int (0x74) 138; CHECK: FieldOffset: 0x0 139; CHECK: Name: a 140; CHECK: } 141; CHECK: OneMethod { 142; CHECK: AccessSpecifier: Public (0x3) 143; CHECK: Type: void A::() (0x1009) 144; CHECK: Name: A::f 145; CHECK: } 146; CHECK: } 147; CHECK: Struct (0x100B) { 148; CHECK: TypeLeafKind: LF_STRUCTURE (0x1505) 149; CHECK: MemberCount: 2 150; CHECK: Properties [ (0x0) 151; CHECK: ] 152; CHECK: FieldList: <field list> (0x100A) 153; CHECK: DerivedFrom: 0x0 154; CHECK: VShape: 0x0 155; CHECK: SizeOf: 4 156; CHECK: Name: A 157; CHECK: } 158; CHECK: StringId (0x100C) { 159; CHECK: TypeLeafKind: LF_STRING_ID (0x1605) 160; CHECK: Id: 0x0 161; CHECK: StringData: D:\src\llvm\build\t.cpp 162; CHECK: } 163; CHECK: UdtSourceLine (0x100D) { 164; CHECK: TypeLeafKind: LF_UDT_SRC_LINE (0x1606) 165; CHECK: UDT: A (0x100B) 166; CHECK: SourceFile: D:\src\llvm\build\t.cpp (0x100C) 167; CHECK: LineNumber: 1 168; CHECK: } 169; CHECK: Pointer (0x100E) { 170; CHECK: TypeLeafKind: LF_POINTER (0x1002) 171; CHECK: PointeeType: void A::() (0x1009) 172; CHECK: PtrType: Near64 (0xC) 173; CHECK: PtrMode: PointerToMemberFunction (0x3) 174; CHECK: IsFlat: 0 175; CHECK: IsConst: 0 176; CHECK: IsVolatile: 0 177; CHECK: IsUnaligned: 0 178; CHECK: ClassType: A (0x1005) 179; CHECK: Representation: GeneralFunction (0x8) 180; CHECK: } 181; CHECK: Modifier (0x100F) { 182; CHECK: TypeLeafKind: LF_MODIFIER (0x1001) 183; CHECK: ModifiedType: void (0x3) 184; CHECK: Modifiers [ (0x1) 185; CHECK: Const (0x1) 186; CHECK: ] 187; CHECK: } 188; CHECK: Pointer (0x1010) { 189; CHECK: TypeLeafKind: LF_POINTER (0x1002) 190; CHECK: PointeeType: const void (0x100F) 191; CHECK: PtrType: Near64 (0xC) 192; CHECK: PtrMode: Pointer (0x0) 193; CHECK: IsFlat: 0 194; CHECK: IsConst: 0 195; CHECK: IsVolatile: 0 196; CHECK: IsUnaligned: 0 197; CHECK: } 198; CHECK: Procedure (0x1011) { 199; CHECK: TypeLeafKind: LF_PROCEDURE (0x1008) 200; CHECK: ReturnType: void (0x3) 201; CHECK: CallingConvention: NearC (0x0) 202; CHECK: FunctionOptions [ (0x0) 203; CHECK: ] 204; CHECK: NumParameters: 0 205; CHECK: ArgListType: () (0x1008) 206; CHECK: } 207; CHECK: FuncId (0x1012) { 208; CHECK: TypeLeafKind: LF_FUNC_ID (0x1601) 209; CHECK: ParentScope: 0x0 210; CHECK: FunctionType: void () (0x1011) 211; CHECK: Name: CharTypes 212; CHECK: } 213; CHECK: ] 214 215; CHECK: CodeViewDebugInfo [ 216; CHECK: Subsection [ 217; CHECK: SubSectionType: Symbols (0xF1) 218; CHECK: {{.*}}Proc{{.*}}Sym { 219; CHECK: DbgStart: 0x0 220; CHECK: DbgEnd: 0x0 221; CHECK: FunctionType: f (0x1002) 222; CHECK: CodeOffset: ?f@@YAXMN_J@Z+0x0 223; CHECK: Segment: 0x0 224; CHECK: Flags [ (0x80) 225; CHECK: HasOptimizedDebugInfo (0x80) 226; CHECK: ] 227; CHECK: DisplayName: f 228; CHECK: LinkageName: ?f@@YAXMN_J@Z 229; CHECK: } 230; CHECK: LocalSym { 231; CHECK: Type: float (0x40) 232; CHECK: Flags [ (0x1) 233; CHECK: IsParameter (0x1) 234; CHECK: ] 235; CHECK: VarName: p1 236; CHECK: } 237; CHECK: LocalSym { 238; CHECK: Type: double (0x41) 239; CHECK: Flags [ (0x1) 240; CHECK: IsParameter (0x1) 241; CHECK: ] 242; CHECK: VarName: p2 243; CHECK: } 244; CHECK: LocalSym { 245; CHECK: Type: __int64 (0x13) 246; CHECK: Flags [ (0x1) 247; CHECK: IsParameter (0x1) 248; CHECK: ] 249; CHECK: VarName: p3 250; CHECK: } 251; CHECK: LocalSym { 252; CHECK: Type: int (0x74) 253; CHECK: VarName: v1 254; CHECK: } 255; CHECK: LocalSym { 256; CHECK: Type: int* (0x674) 257; CHECK: VarName: v2 258; CHECK: } 259; CHECK: LocalSym { 260; CHECK: Type: const int* (0x1004) 261; CHECK: VarName: v21 262; CHECK: } 263; CHECK: LocalSym { 264; CHECK: Type: void* (0x603) 265; CHECK: VarName: v3 266; CHECK: } 267; CHECK: LocalSym { 268; CHECK: Type: int A::* (0x1006) 269; CHECK: VarName: v4 270; CHECK: } 271; CHECK: LocalSym { 272; CHECK: Type: void A::() A::* (0x100E) 273; CHECK: VarName: v5 274; CHECK: } 275; CHECK: LocalSym { 276; CHECK: Type: long (0x12) 277; CHECK: VarName: l1 278; CHECK: } 279; CHECK: LocalSym { 280; CHECK: Type: long (0x12) 281; CHECK: VarName: l2 282; CHECK: } 283; CHECK: LocalSym { 284; CHECK: Type: unsigned long (0x22) 285; CHECK: VarName: l3 286; CHECK: } 287; CHECK: LocalSym { 288; CHECK: Type: unsigned long (0x22) 289; CHECK: VarName: l4 290; CHECK: } 291; CHECK: LocalSym { 292; CHECK: Type: const void* (0x1010) 293; CHECK: VarName: v6 294; CHECK: } 295; CHECK: ProcEnd { 296; CHECK: } 297; CHECK: ] 298; CHECK: Subsection [ 299; CHECK: {{.*}}Proc{{.*}}Sym { 300; CHECK: Type: CharTypes (0x1012) 301; CHECK: DisplayName: CharTypes 302; CHECK: LinkageName: ?CharTypes@@YAXXZ 303; CHECK: } 304; CHECK: LocalSym { 305; CHECK: Type: wchar_t (0x71) 306; CHECK: Flags [ (0x0) 307; CHECK: ] 308; CHECK: VarName: w 309; CHECK: } 310; CHECK: LocalSym { 311; CHECK: Type: unsigned short (0x21) 312; CHECK: Flags [ (0x0) 313; CHECK: ] 314; CHECK: VarName: us 315; CHECK: } 316; CHECK: LocalSym { 317; CHECK: Type: char (0x70) 318; CHECK: Flags [ (0x0) 319; CHECK: ] 320; CHECK: VarName: c 321; CHECK: } 322; CHECK: LocalSym { 323; CHECK: Type: unsigned char (0x20) 324; CHECK: Flags [ (0x0) 325; CHECK: ] 326; CHECK: VarName: uc 327; CHECK: } 328; CHECK: LocalSym { 329; CHECK: Type: signed char (0x10) 330; CHECK: Flags [ (0x0) 331; CHECK: ] 332; CHECK: VarName: sc 333; CHECK: } 334; CHECK: LocalSym { 335; CHECK: Type: char16_t (0x7A) 336; CHECK: Flags [ (0x0) 337; CHECK: ] 338; CHECK: VarName: c16 339; CHECK: } 340; CHECK: LocalSym { 341; CHECK: Type: char32_t (0x7B) 342; CHECK: Flags [ (0x0) 343; CHECK: ] 344; CHECK: VarName: c32 345; CHECK: } 346; CHECK: ProcEnd { 347; CHECK: } 348; CHECK: ] 349; CHECK: ] 350 351; ASM: .section .debug$T,"dr" 352; ASM: .p2align 2 353; ASM: .long 4 # Debug section magic 354; ASM: # ArgList (0x1000) 355; ASM: .short 0x12 # Record length 356; ASM: .short 0x1201 # Record kind: LF_ARGLIST 357; ASM: .long 0x3 # NumArgs 358; ASM: .long 0x40 # Argument: float 359; ASM: .long 0x41 # Argument: double 360; ASM: .long 0x13 # Argument: __int64 361; ASM: # Procedure (0x1001) 362; ASM: .short 0xe # Record length 363; ASM: .short 0x1008 # Record kind: LF_PROCEDURE 364; ASM: .long 0x3 # ReturnType: void 365; ASM: .byte 0x0 # CallingConvention: NearC 366; ASM: .byte 0x0 # FunctionOptions 367; ASM: .short 0x3 # NumParameters 368; ASM: .long 0x1000 # ArgListType: (float, double, __int64) 369; ASM: # FuncId (0x1002) 370; ASM: .short 0xe # Record length 371; ASM: .short 0x1601 # Record kind: LF_FUNC_ID 372; ASM: .long 0x0 # ParentScope 373; ASM: .long 0x1001 # FunctionType: void (float, double, __int64) 374; ASM: .asciz "f" # Name 375; ASM: .byte 242 376; ASM: .byte 241 377; ASM: # Modifier (0x1003) 378; ASM: .short 0xa # Record length 379; ASM: .short 0x1001 # Record kind: LF_MODIFIER 380; ASM: .long 0x74 # ModifiedType: int 381; ASM: .short 0x1 # Modifiers ( Const (0x1) ) 382; ASM: .byte 242 383; ASM: .byte 241 384; ASM: # Pointer (0x1004) 385; ASM: .short 0xa # Record length 386; ASM: .short 0x1002 # Record kind: LF_POINTER 387; ASM: .long 0x1003 # PointeeType: const int 388; ASM: .long 0x1000c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8 ] 389; ASM: # Struct (0x1005) 390; ASM: .short 0x16 # Record length 391; ASM: .short 0x1505 # Record kind: LF_STRUCTURE 392; ASM: .short 0x0 # MemberCount 393; ASM: .short 0x80 # Properties ( ForwardReference (0x80) ) 394; ASM: .long 0x0 # FieldList 395; ASM: .long 0x0 # DerivedFrom 396; ASM: .long 0x0 # VShape 397; ASM: .short 0x0 # SizeOf 398; ASM: .asciz "A" # Name 399; ASM: # Pointer (0x1006) 400; ASM: .short 0x12 # Record length 401; ASM: .short 0x1002 # Record kind: LF_POINTER 402; ASM: .long 0x74 # PointeeType: int 403; ASM: .long 0x804c # Attrs: [ Type: Near64, Mode: PointerToDataMember, SizeOf: 4 ] 404; ASM: .long 0x1005 # ClassType: A 405; ASM: .short 0x4 # Representation: GeneralData 406; ASM: .byte 242 407; ASM: .byte 241 408; ASM: # Pointer (0x1007) 409; ASM: .short 0xa # Record length 410; ASM: .short 0x1002 # Record kind: LF_POINTER 411; ASM: .long 0x1005 # PointeeType: A 412; ASM: .long 0x1040c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8, isConst ] 413; ASM: # ArgList (0x1008) 414; ASM: .short 0x6 # Record length 415; ASM: .short 0x1201 # Record kind: LF_ARGLIST 416; ASM: .long 0x0 # NumArgs 417; ASM: # MemberFunction (0x1009) 418; ASM: .short 0x1a # Record length 419; ASM: .short 0x1009 # Record kind: LF_MFUNCTION 420; ASM: .long 0x3 # ReturnType: void 421; ASM: .long 0x1005 # ClassType: A 422; ASM: .long 0x1007 # ThisType: A* const 423; ASM: .byte 0x0 # CallingConvention: NearC 424; ASM: .byte 0x0 # FunctionOptions 425; ASM: .short 0x0 # NumParameters 426; ASM: .long 0x1008 # ArgListType: () 427; ASM: .long 0x0 # ThisAdjustment 428; ASM: # FieldList (0x100A) 429; ASM: .short 0x1e # Record length 430; ASM: .short 0x1203 # Record kind: LF_FIELDLIST 431; ASM: .short 0x150d # Member kind: DataMember ( LF_MEMBER ) 432; ASM: .short 0x3 # Attrs: Public 433; ASM: .long 0x74 # Type: int 434; ASM: .short 0x0 # FieldOffset 435; ASM: .asciz "a" # Name 436; ASM: .short 0x1511 # Member kind: OneMethod ( LF_ONEMETHOD ) 437; ASM: .short 0x3 # Attrs: Public 438; ASM: .long 0x1009 # Type: void A::() 439; ASM: .asciz "A::f" # Name 440; ASM: .byte 243 441; ASM: .byte 242 442; ASM: .byte 241 443; ASM: # Struct (0x100B) 444; ASM: .short 0x16 # Record length 445; ASM: .short 0x1505 # Record kind: LF_STRUCTURE 446; ASM: .short 0x2 # MemberCount 447; ASM: .short 0x0 # Properties 448; ASM: .long 0x100a # FieldList: <field list> 449; ASM: .long 0x0 # DerivedFrom 450; ASM: .long 0x0 # VShape 451; ASM: .short 0x4 # SizeOf 452; ASM: .asciz "A" # Name 453; ASM: # StringId (0x100C) 454; ASM: .short 0x1e # Record length 455; ASM: .short 0x1605 # Record kind: LF_STRING_ID 456; ASM: .long 0x0 # Id 457; ASM: .asciz "D:\\src\\llvm\\build\\t.cpp" # StringData 458; ASM: # UdtSourceLine (0x100D) 459; ASM: .short 0xe # Record length 460; ASM: .short 0x1606 # Record kind: LF_UDT_SRC_LINE 461; ASM: .long 0x100b # UDT: A 462; ASM: .long 0x100c # SourceFile: D:\src\llvm\build\t.cpp 463; ASM: .long 0x1 # LineNumber 464; ASM: # Pointer (0x100E) 465; ASM: .short 0x12 # Record length 466; ASM: .short 0x1002 # Record kind: LF_POINTER 467; ASM: .long 0x1009 # PointeeType: void A::() 468; ASM: .long 0x1006c # Attrs: [ Type: Near64, Mode: PointerToMemberFunction, SizeOf: 8 ] 469; ASM: .long 0x1005 # ClassType: A 470; ASM: .short 0x8 # Representation: GeneralFunction 471; ASM: .byte 242 472; ASM: .byte 241 473; ASM: # Modifier (0x100F) 474; ASM: .short 0xa # Record length 475; ASM: .short 0x1001 # Record kind: LF_MODIFIER 476; ASM: .long 0x3 # ModifiedType: void 477; ASM: .short 0x1 # Modifiers ( Const (0x1) ) 478; ASM: .byte 242 479; ASM: .byte 241 480; ASM: # Pointer (0x1010) 481; ASM: .short 0xa # Record length 482; ASM: .short 0x1002 # Record kind: LF_POINTER 483; ASM: .long 0x100f # PointeeType: const void 484; ASM: .long 0x1000c # Attrs: [ Type: Near64, Mode: Pointer, SizeOf: 8 ] 485; ASM: # Procedure (0x1011) 486; ASM: .short 0xe # Record length 487; ASM: .short 0x1008 # Record kind: LF_PROCEDURE 488; ASM: .long 0x3 # ReturnType: void 489; ASM: .byte 0x0 # CallingConvention: NearC 490; ASM: .byte 0x0 # FunctionOptions 491; ASM: .short 0x0 # NumParameters 492; ASM: .long 0x1008 # ArgListType: () 493; ASM: # FuncId (0x1012) 494; ASM: .short 0x16 # Record length 495; ASM: .short 0x1601 # Record kind: LF_FUNC_ID 496; ASM: .long 0x0 # ParentScope 497; ASM: .long 0x1011 # FunctionType: void () 498; ASM: .asciz "CharTypes" # Name 499; ASM: .byte 242 500; ASM: .byte 241 501; ASM: # StringId (0x1013) 502; ASM: .short 0x1a # Record length 503; ASM: .short 0x1605 # Record kind: LF_STRING_ID 504; ASM: .long 0x0 # Id 505; ASM: .asciz "D:\\src\\llvm\\build" # StringData 506; ASM: .byte 242 507; ASM: .byte 241 508; ASM: # StringId (0x1014) 509; ASM: .short 0xe # Record length 510; ASM: .short 0x1605 # Record kind: LF_STRING_ID 511; ASM: .long 0x0 # Id 512; ASM: .asciz "t.cpp" # StringData 513; ASM: .byte 242 514; ASM: .byte 241 515; ASM: # StringId (0x1015) 516; ASM: .short 0xa # Record length 517; ASM: .short 0x1605 # Record kind: LF_STRING_ID 518; ASM: .long 0x0 # Id 519; ASM: .byte 0 # StringData 520; ASM: .byte 243 521; ASM: .byte 242 522; ASM: .byte 241 523; ASM: # BuildInfo (0x1016) 524; ASM: .short 0x1a # Record length 525; ASM: .short 0x1603 # Record kind: LF_BUILDINFO 526; ASM: .short 0x5 # NumArgs 527; ASM: .long 0x1013 # Argument: D:\src\llvm\build 528; ASM: .long 0x1015 # Argument 529; ASM: .long 0x1014 # Argument: t.cpp 530; ASM: .long 0x1015 # Argument 531; ASM: .long 0x1015 # Argument 532; ASM: .byte 242 533; ASM: .byte 241 534 535; ModuleID = 't.cpp' 536source_filename = "t.cpp" 537target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128" 538target triple = "x86_64-pc-windows-msvc19.0.23918" 539 540%struct.A = type { i32 } 541 542; Function Attrs: uwtable 543define void @"\01?f@@YAXMN_J@Z"(float %p1, double %p2, i64 %p3) #0 !dbg !7 { 544entry: 545 %p3.addr = alloca i64, align 8 546 %p2.addr = alloca double, align 8 547 %p1.addr = alloca float, align 4 548 %v1 = alloca i32, align 4 549 %v2 = alloca ptr, align 8 550 %v21 = alloca ptr, align 8 551 %v3 = alloca ptr, align 8 552 %v4 = alloca i32, align 8 553 %v5 = alloca ptr, align 8 554 %l1 = alloca i32, align 4 555 %l2 = alloca i32, align 4 556 %l3 = alloca i32, align 4 557 %l4 = alloca i32, align 4 558 %v6 = alloca ptr, align 8 559 store i64 %p3, ptr %p3.addr, align 8 560 call void @llvm.dbg.declare(metadata ptr %p3.addr, metadata !13, metadata !14), !dbg !15 561 store double %p2, ptr %p2.addr, align 8 562 call void @llvm.dbg.declare(metadata ptr %p2.addr, metadata !16, metadata !14), !dbg !17 563 store float %p1, ptr %p1.addr, align 4 564 call void @llvm.dbg.declare(metadata ptr %p1.addr, metadata !18, metadata !14), !dbg !19 565 call void @llvm.dbg.declare(metadata ptr %v1, metadata !20, metadata !14), !dbg !22 566 %0 = load i64, ptr %p3.addr, align 8, !dbg !23 567 %conv = trunc i64 %0 to i32, !dbg !23 568 store i32 %conv, ptr %v1, align 4, !dbg !22 569 call void @llvm.dbg.declare(metadata ptr %v2, metadata !24, metadata !14), !dbg !26 570 store ptr %v1, ptr %v2, align 8, !dbg !26 571 call void @llvm.dbg.declare(metadata ptr %v21, metadata !27, metadata !14), !dbg !30 572 store ptr %v1, ptr %v21, align 8, !dbg !30 573 call void @llvm.dbg.declare(metadata ptr %v3, metadata !31, metadata !14), !dbg !33 574 %1 = bitcast ptr %v1 to ptr, !dbg !34 575 store ptr %1, ptr %v3, align 8, !dbg !33 576 call void @llvm.dbg.declare(metadata ptr %v4, metadata !35, metadata !14), !dbg !44 577 store i32 0, ptr %v4, align 8, !dbg !44 578 call void @llvm.dbg.declare(metadata ptr %v5, metadata !45, metadata !14), !dbg !47 579 store ptr @"\01?f@A@@QEAAXXZ", ptr %v5, align 8, !dbg !47 580 call void @llvm.dbg.declare(metadata ptr %l1, metadata !48, metadata !14), !dbg !50 581 store i32 0, ptr %l1, align 4, !dbg !50 582 call void @llvm.dbg.declare(metadata ptr %l2, metadata !51, metadata !14), !dbg !52 583 store i32 0, ptr %l2, align 4, !dbg !52 584 call void @llvm.dbg.declare(metadata ptr %l3, metadata !53, metadata !14), !dbg !55 585 store i32 0, ptr %l3, align 4, !dbg !55 586 call void @llvm.dbg.declare(metadata ptr %l4, metadata !56, metadata !14), !dbg !57 587 store i32 0, ptr %l4, align 4, !dbg !57 588 call void @llvm.dbg.declare(metadata ptr %v6, metadata !58, metadata !14), !dbg !61 589 %2 = bitcast ptr %v1 to ptr, !dbg !62 590 store ptr %2, ptr %v6, align 8, !dbg !61 591 %3 = load i32, ptr %l4, align 4, !dbg !63 592 %4 = load i32, ptr %l3, align 4, !dbg !64 593 %5 = load i32, ptr %l2, align 4, !dbg !65 594 %6 = load i32, ptr %l1, align 4, !dbg !66 595 %7 = load ptr, ptr %v3, align 8, !dbg !67 596 %8 = load ptr, ptr %v2, align 8, !dbg !68 597 %9 = load i32, ptr %v1, align 4, !dbg !69 598 call void (i32, ...) @"\01?usevars@@YAXHZZ"(i32 %9, ptr %8, ptr %7, i32 %6, i32 %5, i32 %4, i32 %3), !dbg !70 599 ret void, !dbg !71 600} 601 602; Function Attrs: nounwind readnone 603declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 604 605declare void @"\01?f@A@@QEAAXXZ"(ptr) #2 606 607declare void @"\01?usevars@@YAXHZZ"(i32, ...) #2 608 609; Function Attrs: nounwind uwtable 610define void @"\01?CharTypes@@YAXXZ"() #3 !dbg !72 { 611entry: 612 %w = alloca i16, align 2 613 %us = alloca i16, align 2 614 %c = alloca i8, align 1 615 %uc = alloca i8, align 1 616 %sc = alloca i8, align 1 617 %c16 = alloca i16, align 2 618 %c32 = alloca i32, align 4 619 call void @llvm.dbg.declare(metadata ptr %w, metadata !75, metadata !14), !dbg !77 620 call void @llvm.dbg.declare(metadata ptr %us, metadata !78, metadata !14), !dbg !80 621 call void @llvm.dbg.declare(metadata ptr %c, metadata !81, metadata !14), !dbg !83 622 call void @llvm.dbg.declare(metadata ptr %uc, metadata !84, metadata !14), !dbg !86 623 call void @llvm.dbg.declare(metadata ptr %sc, metadata !87, metadata !14), !dbg !89 624 call void @llvm.dbg.declare(metadata ptr %c16, metadata !90, metadata !14), !dbg !92 625 call void @llvm.dbg.declare(metadata ptr %c32, metadata !93, metadata !14), !dbg !95 626 ret void, !dbg !96 627} 628 629attributes #0 = { uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } 630attributes #1 = { nounwind readnone } 631attributes #2 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } 632attributes #3 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } 633 634!llvm.dbg.cu = !{!0} 635!llvm.module.flags = !{!3, !4, !5} 636!llvm.ident = !{!6} 637 638!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 639!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild") 640!2 = !{} 641!3 = !{i32 2, !"CodeView", i32 1} 642!4 = !{i32 2, !"Debug Info Version", i32 3} 643!5 = !{i32 1, !"PIC Level", i32 2} 644!6 = !{!"clang version 3.9.0 "} 645!7 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YAXMN_J@Z", scope: !1, file: !1, line: 6, type: !8, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) 646!8 = !DISubroutineType(types: !9) 647!9 = !{null, !10, !11, !12} 648!10 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float) 649!11 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float) 650!12 = !DIBasicType(name: "long long int", size: 64, align: 64, encoding: DW_ATE_signed) 651!13 = !DILocalVariable(name: "p3", arg: 3, scope: !7, file: !1, line: 6, type: !12) 652!14 = !DIExpression() 653!15 = !DILocation(line: 6, column: 39, scope: !7) 654!16 = !DILocalVariable(name: "p2", arg: 2, scope: !7, file: !1, line: 6, type: !11) 655!17 = !DILocation(line: 6, column: 25, scope: !7) 656!18 = !DILocalVariable(name: "p1", arg: 1, scope: !7, file: !1, line: 6, type: !10) 657!19 = !DILocation(line: 6, column: 14, scope: !7) 658!20 = !DILocalVariable(name: "v1", scope: !7, file: !1, line: 7, type: !21) 659!21 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 660!22 = !DILocation(line: 7, column: 7, scope: !7) 661!23 = !DILocation(line: 7, column: 12, scope: !7) 662!24 = !DILocalVariable(name: "v2", scope: !7, file: !1, line: 8, type: !25) 663!25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !21, size: 64, align: 64) 664!26 = !DILocation(line: 8, column: 8, scope: !7) 665!27 = !DILocalVariable(name: "v21", scope: !7, file: !1, line: 9, type: !28) 666!28 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !29, size: 64, align: 64) 667!29 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !21) 668!30 = !DILocation(line: 9, column: 14, scope: !7) 669!31 = !DILocalVariable(name: "v3", scope: !7, file: !1, line: 10, type: !32) 670!32 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64, align: 64) 671!33 = !DILocation(line: 10, column: 9, scope: !7) 672!34 = !DILocation(line: 10, column: 14, scope: !7) 673!35 = !DILocalVariable(name: "v4", scope: !7, file: !1, line: 11, type: !36) 674!36 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !21, size: 32, extraData: !37) 675!37 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !1, line: 1, size: 32, align: 32, elements: !38) 676!38 = !{!39, !40} 677!39 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !37, file: !1, line: 2, baseType: !21, size: 32, align: 32) 678!40 = !DISubprogram(name: "A::f", linkageName: "\01?f@A@@QEAAXXZ", scope: !37, file: !1, line: 3, type: !41, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false) 679!41 = !DISubroutineType(types: !42) 680!42 = !{null, !43} 681!43 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !37, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer) 682!44 = !DILocation(line: 11, column: 11, scope: !7) 683!45 = !DILocalVariable(name: "v5", scope: !7, file: !1, line: 12, type: !46) 684!46 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !41, size: 64, extraData: !37) 685!47 = !DILocation(line: 12, column: 13, scope: !7) 686!48 = !DILocalVariable(name: "l1", scope: !7, file: !1, line: 13, type: !49) 687!49 = !DIBasicType(name: "long", size: 32, align: 32, encoding: DW_ATE_signed) 688!50 = !DILocation(line: 13, column: 8, scope: !7) 689!51 = !DILocalVariable(name: "l2", scope: !7, file: !1, line: 14, type: !49) 690!52 = !DILocation(line: 14, column: 12, scope: !7) 691!53 = !DILocalVariable(name: "l3", scope: !7, file: !1, line: 15, type: !54) 692!54 = !DIBasicType(name: "unsigned long", size: 32, align: 32, encoding: DW_ATE_unsigned) 693!55 = !DILocation(line: 15, column: 17, scope: !7) 694!56 = !DILocalVariable(name: "l4", scope: !7, file: !1, line: 16, type: !54) 695!57 = !DILocation(line: 16, column: 21, scope: !7) 696!58 = !DILocalVariable(name: "v6", scope: !7, file: !1, line: 17, type: !59) 697!59 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !60, size: 64, align: 64) 698!60 = !DIDerivedType(tag: DW_TAG_const_type, baseType: null) 699!61 = !DILocation(line: 17, column: 15, scope: !7) 700!62 = !DILocation(line: 17, column: 20, scope: !7) 701!63 = !DILocation(line: 18, column: 35, scope: !7) 702!64 = !DILocation(line: 18, column: 31, scope: !7) 703!65 = !DILocation(line: 18, column: 27, scope: !7) 704!66 = !DILocation(line: 18, column: 23, scope: !7) 705!67 = !DILocation(line: 18, column: 19, scope: !7) 706!68 = !DILocation(line: 18, column: 15, scope: !7) 707!69 = !DILocation(line: 18, column: 11, scope: !7) 708!70 = !DILocation(line: 18, column: 3, scope: !7) 709!71 = !DILocation(line: 19, column: 1, scope: !7) 710!72 = distinct !DISubprogram(name: "CharTypes", linkageName: "\01?CharTypes@@YAXXZ", scope: !1, file: !1, line: 20, type: !73, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) 711!73 = !DISubroutineType(types: !74) 712!74 = !{null} 713!75 = !DILocalVariable(name: "w", scope: !72, file: !1, line: 21, type: !76) 714!76 = !DIBasicType(name: "wchar_t", size: 16, align: 16, encoding: DW_ATE_unsigned) 715!77 = !DILocation(line: 21, column: 18, scope: !72) 716!78 = !DILocalVariable(name: "us", scope: !72, file: !1, line: 22, type: !79) 717!79 = !DIBasicType(name: "unsigned short", size: 16, align: 16, encoding: DW_ATE_unsigned) 718!80 = !DILocation(line: 22, column: 18, scope: !72) 719!81 = !DILocalVariable(name: "c", scope: !72, file: !1, line: 23, type: !82) 720!82 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) 721!83 = !DILocation(line: 23, column: 8, scope: !72) 722!84 = !DILocalVariable(name: "uc", scope: !72, file: !1, line: 24, type: !85) 723!85 = !DIBasicType(name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) 724!86 = !DILocation(line: 24, column: 17, scope: !72) 725!87 = !DILocalVariable(name: "sc", scope: !72, file: !1, line: 25, type: !88) 726!88 = !DIBasicType(name: "signed char", size: 8, align: 8, encoding: DW_ATE_signed_char) 727!89 = !DILocation(line: 25, column: 15, scope: !72) 728!90 = !DILocalVariable(name: "c16", scope: !72, file: !1, line: 26, type: !91) 729!91 = !DIBasicType(name: "char16_t", size: 16, align: 16, encoding: DW_ATE_UTF) 730!92 = !DILocation(line: 26, column: 12, scope: !72) 731!93 = !DILocalVariable(name: "c32", scope: !72, file: !1, line: 27, type: !94) 732!94 = !DIBasicType(name: "char32_t", size: 32, align: 32, encoding: DW_ATE_UTF) 733!95 = !DILocation(line: 27, column: 12, scope: !72) 734!96 = !DILocation(line: 28, column: 1, scope: !72) 735