X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=runtime%2Flibprofile%2FPathProfiling.c;h=71ee944fc569ba2dcc001077f2c53744490cdb86;hb=1b0dc64919e947bb4f4677b138c734e33061f7c4;hp=3008db9c4a6070b7a65c5f56854bdbeb9f398125;hpb=3f5c8329098abbd885f69ff8a11af62561d9d41b;p=oota-llvm.git diff --git a/runtime/libprofile/PathProfiling.c b/runtime/libprofile/PathProfiling.c index 3008db9c4a6..71ee944fc56 100644 --- a/runtime/libprofile/PathProfiling.c +++ b/runtime/libprofile/PathProfiling.c @@ -15,12 +15,15 @@ #include "Profiling.h" #include "llvm/Analysis/ProfileInfoTypes.h" +#include "llvm/Support/DataTypes.h" #include +#if !defined(_MSC_VER) && !defined(__MINGW32__) #include +#else +#include +#endif #include #include -#include -#include #include /* note that this is used for functions with large path counts, @@ -104,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; } @@ -147,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; @@ -215,7 +218,7 @@ void llvm_decrement_path_count (uint32_t functionNumber, uint32_t pathNumber) { * +-----------------+-----------------+ * */ -static void pathProfAtExitHandler() { +static void pathProfAtExitHandler(void) { int outFile = getOutFile(); uint32_t i; uint32_t header[2] = { PathInfo, 0 };