[llvm] r177002 - Refactor GCOV's six constructor arguments into a struct with a getter that

David Blaikie dblaikie at gmail.com
Tue Mar 19 12:45:20 PDT 2013


On Tue, Mar 19, 2013 at 11:46 AM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Matt Beaumont-Gay wrote:
>>
>> On Wed, Mar 13, 2013 at 10:13 PM, Nick Lewycky<nicholas at mxc.ca>  wrote:
>>>
>>> Added: llvm/trunk/test/Transforms/GCOVProfiling/version.ll
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GCOVProfiling/version.ll?rev=177002&view=auto
>>>
>>> ==============================================================================
>>> --- llvm/trunk/test/Transforms/GCOVProfiling/version.ll (added)
>>> +++ llvm/trunk/test/Transforms/GCOVProfiling/version.ll Thu Mar 14
>>> 00:13:26 2013
>>> @@ -0,0 +1,27 @@
>>> +; RUN: echo '!9 = metadata !{metadata !"%s", metadata !0}'>  %t1
>>> +; RUN: cat %s %t1>  %t2
>>> +; RUN: opt -insert-gcov-profiling -disable-output<  %t2
>>
>>
>> Does opt expect its working directory to be writable?
>
>
> Yup. It's going to write to the directory specified by the metadata emitted
> in the first echo line. I guess what I really want is the basename of %t.
> Hrm.
>
>
>  I'm guessing
>>
>> that's what "LLVM ERROR: IO failure on output stream." is trying to
>> tell me when I run this test on a read-only filesystem.
>> (linkagename.ll has the same problem.)
>>
>>> +; RUN: head -c12 version.gcno | grep '^oncg\*204MVLL$'
>>> +; RUN: rm version.gcno
>>> +; RUN: not opt -insert-gcov-profiling -default-gcov-version=asdfasdf
>>> -disable-output<  %t2
>>> +; RUN: opt -insert-gcov-profiling -default-gcov-version=407*
>>> -disable-output<  %t2
>>> +; RUN: head -c12 version.gcno | grep '^oncg\*704MVLL$'
>>> +; RUN: rm version.gcno
>>> +
>>> +define void @test() {
>>> +  ret void, !dbg !8
>>> +}
>>> +
>>> +!llvm.gcov = !{!9}
>>> +!llvm.dbg.cu = !{!0}
>>> +
>>> +!0 = metadata !{metadata !"%s/version", metadata !1}
>>> +!1 = metadata !{i32 786449, i32 0, i32 4, metadata !2, metadata !"clang
>>> version 3.3 (trunk 176994)", i1 false, metadata !"", i32 0, metadata !3,
>>> metadata !3, metadata !4, metadata !3, metadata !""} ; [ DW_TAG_compile_unit
>>> ] [./version] [DW_LANG_C_plus_plus]
>>> +!2 = metadata !{i32 786473, metadata !"version", metadata
>>> !"/usr/local/google/home/nlewycky"} ; [ DW_TAG_file_type ]
>>
>>
>> Side note: really, your homedir?
>
>
> *shrug* I built a .ll file with debug info? I can strip out the directory if
> you want, but I didn't bother since it doesn't matter for this test.

Yep - this is pretty pervasive across the debug info tests. You can
see who wrote them all if you're so inclined :)

>
> Nick
>
>
>>
>>> +!3 = metadata !{i32 0}
>>> +!4 = metadata !{metadata !5}
>>> +!5 = metadata !{i32 786478, i32 0, metadata !6, metadata !"test",
>>> metadata !"test", metadata !"", metadata !6, i32 1, metadata !7, i1 false,
>>> i1 true, i32 0, i32 0, null, i32 256, i1 false, void ()* @test, null, null,
>>> metadata !3, i32 1} ; [ DW_TAG_subprogram ] [line 1] [def] [test]
>>> +!6 = metadata !{i32 786473, metadata !"<stdin>", metadata !"."} ; [
>>> DW_TAG_file_type ]
>>> +!7 = metadata !{i32 786453, i32 0, metadata !"", i32 0, i32 0, i64 0,
>>> i64 0, i64 0, i32 0, null, metadata !3, i32 0, i32 0} ; [
>>> DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
>>> +!8= metadata !{i32 1, i32 0, metadata !5, null}
>>> +;; !9 is added through the echo line at the top.
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list