summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-05-05 21:46:14 +0000
committerJustin Bogner <mail@justinbogner.com>2015-05-05 21:46:14 +0000
commit6d721fa28c868eaaf06ab417131c10d13c3ed10f (patch)
treeec77e26f2457f68a1d6f9a20ebfc2a1f2d2743e6 /clang/test
parent801caff64d2f3eea7b97270855d765c34e102c19 (diff)
downloadbcm5719-llvm-6d721fa28c868eaaf06ab417131c10d13c3ed10f.tar.gz
bcm5719-llvm-6d721fa28c868eaaf06ab417131c10d13c3ed10f.zip
InstrProf: Don't start or end coverage regions inside of system macros
It doesn't make much sense to try to show coverage inside system macros, and source locations in builtins confuses the coverage mapping. Just avoid doing this. Fixes an assert that fired when a __block storage specifier starts a region. llvm-svn: 236547
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CoverageMapping/block-storage-starts-region.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CoverageMapping/block-storage-starts-region.m b/clang/test/CoverageMapping/block-storage-starts-region.m
new file mode 100644
index 00000000000..7997c8d4d29
--- /dev/null
+++ b/clang/test/CoverageMapping/block-storage-starts-region.m
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -triple x86_64-apple-darwin -fobjc-runtime=macosx-10.10.0 -fblocks -fobjc-arc %s | FileCheck %s
+
+@interface Foo
+@end
+
+// CHECK-LABEL: doSomething:
+void doSomething() { // CHECK: File 0, [[@LINE]]:20 -> {{[0-9:]+}} = #0
+ return;
+ __block Foo *f; // CHECK: File 0, [[@LINE]]:3 -> {{[0-9:]+}} = 0
+}
+
+int main() {}
OpenPOWER on IntegriCloud