]> granicus.if.org Git - clang/commitdiff
Driver: Add tests for -fprofile-arcs and -fno-profile-arcs
authorJustin Bogner <mail@justinbogner.com>
Thu, 7 Aug 2014 03:58:32 +0000 (03:58 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 7 Aug 2014 03:58:32 +0000 (03:58 +0000)
I tried to be lazy and get away with no test in r215051, but Chad
caught me :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215053 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/clang_f_opts.c

index c12c8aff9038986614f77c56014da45bb4b38eae..1a616a8651f607b332bc346e8401a7203067aff3 100644 (file)
 // RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
 // CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
 
+// RUN: %clang -### -S -fprofile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-ARCS %s
+// RUN: %clang -### -S -fno-profile-arcs -fprofile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-ARCS %s
+// RUN: %clang -### -S -fno-profile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-ARCS %s
+// RUN: %clang -### -S -fprofile-arcs -fno-profile-arcs %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-ARCS %s
+// CHECK-PROFILE-ARCS: "-femit-coverage-data"
+// CHECK-NO-PROFILE-ARCS-NOT: "-femit-coverage-data"
+
 // RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
 // RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
 // RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s