Changeset View
Changeset View
Standalone View
Standalone View
test/Transforms/GCOVProfiling/function-numbering.ll
; Test that GCOV instrumentation numbers functions correctly when some | ; Test that GCOV instrumentation numbers functions correctly when some | ||||
; functions aren't emitted. | ; functions aren't emitted. | ||||
; Inject metadata to set the .gcno file location | ; Inject metadata to set the .gcno file location | ||||
; RUN: echo '!14 = !{!"%/T/function-numbering.ll", !0}' > %t1 | ; RUN: rm -rf %t && mkdir -p %t | ||||
; RUN: cat %s %t1 > %t2 | ; RUN: echo '!14 = !{!"%/t/function-numbering.ll", !0}' > %t/1 | ||||
; RUN: cat %s %t/1 > %t/2 | |||||
; RUN: opt -insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s | |||||
; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s | |||||
; RUNN: rm %t/function-numbering.gcno | |||||
; RUN: opt -insert-gcov-profiling -S < %t2 | FileCheck --check-prefix GCDA %s | ; RUN: opt -passes=insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s | ||||
; RUN: llvm-cov gcov -n -dump %T/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s | ; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s | ||||
; RUNN: rm %T/function-numbering.gcno | |||||
; RUN: opt -passes=insert-gcov-profiling -S < %t2 | FileCheck --check-prefix GCDA %s | |||||
; RUN: llvm-cov gcov -n -dump %T/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s | |||||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||||
target triple = "x86_64-apple-macosx10.10.0" | target triple = "x86_64-apple-macosx10.10.0" | ||||
; GCDA: @[[FOO:[0-9]+]] = private unnamed_addr constant [4 x i8] c"foo\00" | ; GCDA: @[[FOO:[0-9]+]] = private unnamed_addr constant [4 x i8] c"foo\00" | ||||
; GCDA-NOT: @{{[0-9]+}} = private unnamed_addr constant .* c"bar\00" | ; GCDA-NOT: @{{[0-9]+}} = private unnamed_addr constant .* c"bar\00" | ||||
; GCDA: @[[BAZ:[0-9]+]] = private unnamed_addr constant [4 x i8] c"baz\00" | ; GCDA: @[[BAZ:[0-9]+]] = private unnamed_addr constant [4 x i8] c"baz\00" | ||||
; GCDA: define internal void @__llvm_gcov_writeout() | ; GCDA: define internal void @__llvm_gcov_writeout() | ||||
Show All 38 Lines |