-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix -flto and RTS coverage detection
Suppress a spurious clang warning
- Loading branch information
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ | |
extern "C" { | ||
#endif | ||
|
||
extern void sail_rts_set_coverage_file(char *output_file); | ||
extern void (*sail_rts_set_coverage_file)(const char *); | ||
|
||
static uint64_t g_elf_entry; | ||
uint64_t g_cycle_count = 0; | ||
|
@@ -725,11 +725,14 @@ int process_arguments(int argc, char *argv[]) | |
break; | ||
|
||
case 'c': | ||
if (&sail_rts_set_coverage_file) { | ||
#pragma clang diagnostic push | ||
#pragma clang diagnostic ignored "-Wtautological-pointer-compare" | ||
if (&sail_rts_set_coverage_file != NULL) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Alasdair
Author
Collaborator
|
||
sail_rts_set_coverage_file(optarg); | ||
} else { | ||
fprintf(stderr, "Ignoring flag -c %s. Requires the model to be compiled with coverage\n", optarg); | ||
} | ||
#pragma clang diagnostic pop | ||
break; | ||
|
||
case 'v': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is this address of operator needed? Surely you want to check the value of the pointer not the address (which only matters for weak symbols)?