llvm.org GIT mirror llvm / 3f5c832
Use static inline to do the right thing when built in C99 mode. Of course, C89 doesn't have an inline keyword. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130279 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 9 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
103103 }
104104 }
105105
106 inline uint32_t hash (uint32_t key) {
106 static inline uint32_t hash (uint32_t key) {
107107 /* this may benefit from a proper hash function */
108108 return key%ARBITRARY_HASH_BIN_COUNT;
109109 }
146146 }
147147
148148 /* Return a pointer to this path's specific path counter */
149 inline uint32_t* getPathCounter(uint32_t functionNumber, uint32_t pathNumber) {
149 static inline uint32_t* getPathCounter(uint32_t functionNumber,
150 uint32_t pathNumber) {
150151 pathHashTable_t* hashTable;
151152 pathHashEntry_t* hashEntry;
152153 uint32_t index = hash(pathNumber);