summaryrefslogtreecommitdiffstats
path: root/runtime
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
commit3f5c8329098abbd885f69ff8a11af62561d9d41b (patch)
treee570d4ac5ccd9f87940efb2387d0bc11e9138f8a /runtime
parentd5089a9794b46918128c2fec1b5ec1d20f7572fa (diff)
downloadexternal_llvm-3f5c8329098abbd885f69ff8a11af62561d9d41b.zip
external_llvm-3f5c8329098abbd885f69ff8a11af62561d9d41b.tar.gz
external_llvm-3f5c8329098abbd885f69ff8a11af62561d9d41b.tar.bz2
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
Diffstat (limited to 'runtime')
-rw-r--r--runtime/libprofile/PathProfiling.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/libprofile/PathProfiling.c b/runtime/libprofile/PathProfiling.c
index 29671f5..3008db9 100644
--- a/runtime/libprofile/PathProfiling.c
+++ b/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);