diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-04-27 03:22:17 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-04-27 03:22:17 +0000 |
commit | 6fac9bcf670216338acc2941da490cf4232fc228 (patch) | |
tree | cec9f05f93a768477888a1e85bf015f892bf3a0d /llvm/runtime/libprofile/PathProfiling.c | |
parent | bcc69141463827adfec45cdd177fe39b8b289713 (diff) | |
download | bcm5719-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.c | 5 |
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); |