diff options
author | Justin Bogner <mail@justinbogner.com> | 2015-05-05 21:46:14 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2015-05-05 21:46:14 +0000 |
commit | f3509fceef370bbd35e0b69f8204835fe10f33e4 (patch) | |
tree | e676d49e4a41c63de990b84ec8731b543e7c34ac /test/CoverageMapping | |
parent | af013aa9b1bed19e4fc0d503bc157405a0138dfe (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CoverageMapping')
-rw-r--r-- | test/CoverageMapping/block-storage-starts-region.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CoverageMapping/block-storage-starts-region.m b/test/CoverageMapping/block-storage-starts-region.m new file mode 100644 index 0000000000..7997c8d4d2 --- /dev/null +++ b/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() {} |