Skip to content

Commit

Permalink
[test] NFC, add missing declarations and include to test files to avo…
Browse files Browse the repository at this point in the history
…id 'implicit-function-declaration' diagnostics in the tests
  • Loading branch information
hyp committed May 14, 2020
1 parent d2a26ad commit 10b4931
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 16 deletions.
Expand Up @@ -2,6 +2,10 @@

typedef int OSSpinLock;

void OSSpinlockLock(OSSpinLock *l);
void OSSpinlockTry(OSSpinLock *l);
void OSSpinlockUnlock(OSSpinLock *l);

@implementation Foo
- (void)f {
int i = 1;
Expand Down
@@ -1,3 +1,5 @@
extern void __gcov_flush();
extern int remove(const char *);
int main(void) {
__gcov_flush();

Expand Down
Expand Up @@ -3,19 +3,21 @@
// CHECK-NEXT: -: 0:Data:instrprof-gcov-__gcov_flush-multiple.gcda
// CHECK-NEXT: -: 0:Runs:1
// CHECK-NEXT: -: 0:Programs:1
// CHECK-NEXT: #####: 1:int main(void) {
// CHECK-NEXT: #####: 2: __gcov_flush();
// CHECK-NEXT: -: 3:
// CHECK-NEXT: #####: 4: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
// CHECK-NEXT: #####: 5: return 1;
// CHECK-NEXT: -: 6: }
// CHECK-NEXT: -: 7:
// CHECK-NEXT: #####: 8: __gcov_flush();
// CHECK-NEXT: #####: 9: __gcov_flush();
// CHECK-NEXT: -: 10:
// CHECK-NEXT: #####: 11: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
// CHECK-NEXT: #####: 12: return 1;
// CHECK-NEXT: -: 13: }
// CHECK-NEXT: -: 14:
// CHECK-NEXT: 1: 15: return 0;
// CHECK-NEXT: 1: 16:}
// CHECK-NEXT: -: 1:extern void __gcov_flush();
// CHECK-NEXT: -: 2:extern int remove(const char *);
// CHECK-NEXT: #####: 3:int main(void) {
// CHECK-NEXT: #####: 4: __gcov_flush();
// CHECK-NEXT: -: 5:
// CHECK-NEXT: #####: 6: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
// CHECK-NEXT: #####: 7: return 1;
// CHECK-NEXT: -: 8: }
// CHECK-NEXT: -: 9:
// CHECK-NEXT: #####: 10: __gcov_flush();
// CHECK-NEXT: #####: 11: __gcov_flush();
// CHECK-NEXT: -: 12:
// CHECK-NEXT: #####: 13: if (remove("instrprof-gcov-__gcov_flush-multiple.gcda") != 0) {
// CHECK-NEXT: #####: 14: return 1;
// CHECK-NEXT: -: 15: }
// CHECK-NEXT: -: 16:
// CHECK-NEXT: 1: 17: return 0;
// CHECK-NEXT: 1: 18:}
1 change: 1 addition & 0 deletions compiler-rt/test/profile/instrprof-value-prof.c
Expand Up @@ -27,6 +27,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct __llvm_profile_data __llvm_profile_data;
const __llvm_profile_data *__llvm_profile_begin_data(void);
const __llvm_profile_data *__llvm_profile_end_data(void);
Expand Down

0 comments on commit 10b4931

Please sign in to comment.