[PATCH] D17324: Add a test case in LLVM to ensure covmap section is not created allocatable

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 18:18:04 PST 2016


vsk added a comment.

Sorry for the delay.

In the future, please include pointers to any relevant commits or reviews in your diff description. It would make it easier to understand the situation.

For anyone following along, http://reviews.llvm.org/D16092 made the covmap section non-allocatable for ELF and http://reviews.llvm.org/D16118 added a test to compiler-rt.


================
Comment at: test/Instrumentation/InstrProfiling/X86/alloc.ll:3
@@ +2,3 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+
+ at __profn_foo = private constant [3 x i8] c"foo"
----------------
Is the following a sufficient test?

```
@a = internal constant i32 0, section "__llvm_covmap"
; CHECK: .section __llvm_covmap,""
```

================
Comment at: test/Instrumentation/InstrProfiling/X86/alloc.ll:3
@@ +2,3 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+
+ at __profn_foo = private constant [3 x i8] c"foo"
----------------
vsk wrote:
> Is the following a sufficient test?
> 
> ```
> @a = internal constant i32 0, section "__llvm_covmap"
> ; CHECK: .section __llvm_covmap,""
> ```
Instead of adding a new file, would it be possible to check the assembly output of `test/profile/Linux/coverage_test.cpp`?


http://reviews.llvm.org/D17324





More information about the llvm-commits mailing list