Skip to content

Commit

Permalink
PathProfiling.c: Get rid of using "inline". We may expect compiler sh…
Browse files Browse the repository at this point in the history
…all optimize out "static" scope w/o "inline".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144080 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Nov 8, 2011
1 parent bd3c5ec commit d63e7bf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions runtime/libprofile/PathProfiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
#include <stdlib.h>
#include <stdio.h>

/* Must use __inline in Microsoft C */
#if defined(_MSC_VER)
#define __inline__ __inline
#endif

/* note that this is used for functions with large path counts,
but it is unlikely those paths will ALL be executed */
#define ARBITRARY_HASH_BIN_COUNT 100
Expand Down Expand Up @@ -112,7 +107,7 @@ void writeArrayTable(uint32_t fNumber, ftEntry_t* ft, uint32_t* funcCount) {
}
}

static __inline__ uint32_t hash (uint32_t key) {
static uint32_t hash (uint32_t key) {
/* this may benefit from a proper hash function */
return key%ARBITRARY_HASH_BIN_COUNT;
}
Expand Down Expand Up @@ -155,7 +150,7 @@ void writeHashTable(uint32_t functionNumber, pathHashTable_t* hashTable) {
}

/* Return a pointer to this path's specific path counter */
static __inline__ uint32_t* getPathCounter(uint32_t functionNumber,
static uint32_t* getPathCounter(uint32_t functionNumber,
uint32_t pathNumber) {
pathHashTable_t* hashTable;
pathHashEntry_t* hashEntry;
Expand Down

0 comments on commit d63e7bf

Please sign in to comment.