Commit f2306e3
committed
Remove the __CPROVER_HIDE label when inlining
Leaving this label in place will mark the function being inlined into as hidden,
which messes up, e.g., coverage instrumentation.
Consider hidden.c:
#include <string.h>
int foo() { char *a, *b; return memcmp(a, b, 1); }
int main() { foo(); return 0; }
goto-cc hidden.c
goto-instrument --add-library a.out b.out (add library function with hiding)
goto-analyzer --simplify c.out b.out (goto-analyzer does inlining)
cbmc --cover location c.out (will be missing any coverage targets in foo)
cbmc --cover location b.out (has coverage targets in foo)
With this patch, cbmc --cover location c.out also has coverage targets in foo.1 parent f1489fd commit f2306e3
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
288 | 295 | | |
289 | 296 | | |
290 | 297 | | |
| |||
0 commit comments