2014-11-12 20:21:20 +00:00
|
|
|
; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview-linetables | FileCheck %s
|
|
|
|
|
|
|
|
; This LL file was generated by running clang on the following code:
|
|
|
|
; D:\src.cpp:
|
|
|
|
; 1 namespace foo {
|
|
|
|
; 2 int bar(int x) {
|
|
|
|
; 3 return x * 2;
|
|
|
|
; 4 }
|
|
|
|
; 5 }
|
|
|
|
|
|
|
|
; CHECK: ProcStart {
|
|
|
|
; FIXME: The display name should in fact be "foo::bar", see PR21528
|
|
|
|
; CHECK-NEXT: DisplayName: ?bar@foo@@YAHH@Z
|
|
|
|
; CHECK-NEXT: Section: ?bar@foo@@YAHH@Z
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
define i32 @"\01?bar@foo@@YAHH@Z"(i32 %x) #0 {
|
|
|
|
entry:
|
|
|
|
%x.addr = alloca i32, align 4
|
|
|
|
store i32 %x, i32* %x.addr, align 4
|
|
|
|
%0 = load i32* %x.addr, align 4, !dbg !11
|
|
|
|
%mul = mul nsw i32 %0, 2, !dbg !11
|
|
|
|
ret i32 %mul, !dbg !11
|
|
|
|
}
|
|
|
|
|
|
|
|
attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
|
|
|
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
|
|
!llvm.module.flags = !{!8, !9}
|
|
|
|
!llvm.ident = !{!10}
|
|
|
|
|
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
|
|
|
!0 = !{!"0x11\004\00clang version 3.6.0 \000\00\000\00\002", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] [D:\/<stdin>] [DW_LANG_C_plus_plus]
|
|
|
|
!1 = !{!"<stdin>", !"D:\5C"}
|
|
|
|
!2 = !{}
|
|
|
|
!3 = !{!4}
|
|
|
|
!4 = !{!"0x2e\00bar\00bar\00\002\000\001\000\000\00256\000\002", !5, !6, !7, null, i32 (i32)* @"\01?bar@foo@@YAHH@Z", null, null, !2} ; [ DW_TAG_subprogram ] [line 2] [def] [bar]
|
|
|
|
!5 = !{!"src.cpp", !"D:\5C"}
|
|
|
|
!6 = !{!"0x29", !5} ; [ DW_TAG_file_type ] [D:\/src.cpp]
|
|
|
|
!7 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !2, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
|
|
!8 = !{i32 2, !"Dwarf Version", i32 4}
|
|
|
|
!9 = !{i32 2, !"Debug Info Version", i32 2}
|
|
|
|
!10 = !{!"clang version 3.6.0 "}
|
2015-01-14 22:27:36 +00:00
|
|
|
!11 = !MDLocation(line: 3, scope: !4)
|