File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ int __llvm_orderfile_dump(void);
55
55
56
56
#else
57
57
#define __llvm_profile_reset_counters ()
58
- #define __llvm_profile_dump ()
59
- #define __llvm_orderfile_dump ()
58
+ #define __llvm_profile_dump () (0)
59
+ #define __llvm_orderfile_dump () (0)
60
60
#endif
61
61
62
62
#ifdef __cplusplus
Original file line number Diff line number Diff line change 12
12
#include "InstrProfilingPort.h"
13
13
#include <stdio.h>
14
14
15
+ // Make sure __LLVM_INSTR_PROFILE_GENERATE is always defined before
16
+ // including instr_prof_interface.h so the interface functions are
17
+ // declared correctly for the runtime. Additionally, make sure
18
+ // that __LLVM_INSTR_PROFILE_GENERATE is undefined only when it is
19
+ // not explicitly defined somewhere else.
20
+ #ifndef __LLVM_INSTR_PROFILE_GENERATE
15
21
#define __LLVM_INSTR_PROFILE_GENERATE
16
22
#include "profile/instr_prof_interface.h"
23
+ #undef __LLVM_INSTR_PROFILE_GENERATE
24
+ #else
25
+ #include "profile/instr_prof_interface.h"
26
+ #endif
17
27
18
28
#define INSTR_PROF_VISIBILITY COMPILER_RT_VISIBILITY
19
29
#include "profile/InstrProfData.inc"
Original file line number Diff line number Diff line change 1
- // RUN: %clang_profgen %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN
1
+ // RUN: %clang_profgen %s --target=ppc64le-unknown-linux-gnu -S \
2
+ // RUN: -emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN
2
3
// RUN: %clang_profgen -o %t %s
3
4
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
4
5
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
5
- // RUN: %clang_profuse=%t.profdata %s -S -emit-llvm -o - | FileCheck %s --check-prefix=PROFUSE
6
+ // RUN: %clang_profuse=%t.profdata %s --target=ppc64le-unknown-linux-gnu -S \
7
+ // RUN: -emit-llvm -o - | FileCheck %s --check-prefix=PROFUSE
6
8
#include "profile/instr_prof_interface.h"
7
9
8
10
__attribute__((noinline )) int bar () { return 4 ; }
You can’t perform that action at this time.
0 commit comments