summaryrefslogtreecommitdiffstats
path: root/llvm/runtime/libprofile/PathProfiling.c
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-04-27 03:22:17 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-04-27 03:22:17 +0000
commit6fac9bcf670216338acc2941da490cf4232fc228 (patch)
treecec9f05f93a768477888a1e85bf015f892bf3a0d /llvm/runtime/libprofile/PathProfiling.c
parentbcc69141463827adfec45cdd177fe39b8b289713 (diff)
downloadbcm5719-llvm-6fac9bcf670216338acc2941da490cf4232fc228.tar.gz
bcm5719-llvm-6fac9bcf670216338acc2941da490cf4232fc228.zip
Use static inline to do the right thing when built in C99 mode. Of course,
C89 doesn't have an inline keyword. llvm-svn: 130279
Diffstat (limited to 'llvm/runtime/libprofile/PathProfiling.c')
-rw-r--r--llvm/runtime/libprofile/PathProfiling.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/runtime/libprofile/PathProfiling.c b/llvm/runtime/libprofile/PathProfiling.c
index 29671f53d6f..3008db9c4a6 100644
--- a/llvm/runtime/libprofile/PathProfiling.c
+++ b/llvm/runtime/libprofile/PathProfiling.c
@@ -104,7 +104,7 @@ void writeArrayTable(uint32_t fNumber, ftEntry_t* ft, uint32_t* funcCount) {
}
}
-inline uint32_t hash (uint32_t key) {
+static inline uint32_t hash (uint32_t key) {
/* this may benefit from a proper hash function */
return key%ARBITRARY_HASH_BIN_COUNT;
}
@@ -147,7 +147,8 @@ void writeHashTable(uint32_t functionNumber, pathHashTable_t* hashTable) {
}
/* Return a pointer to this path's specific path counter */
-inline uint32_t* getPathCounter(uint32_t functionNumber, uint32_t pathNumber) {
+static inline uint32_t* getPathCounter(uint32_t functionNumber,
+ uint32_t pathNumber) {
pathHashTable_t* hashTable;
pathHashEntry_t* hashEntry;
uint32_t index = hash(pathNumber);
OpenPOWER on IntegriCloud