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
This commit is contained in:
Nick Lewycky 2011-04-27 03:22:17 +00:00
parent bcc6914146
commit 6fac9bcf67
1 changed files with 3 additions and 2 deletions

View File

@ -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);