[llvm-commits] [llvm] r130279 - /llvm/trunk/runtime/libprofile/PathProfiling.c

Nick Lewycky nicholas at mxc.ca
Tue Apr 26 20:22:17 PDT 2011


Author: nicholas
Date: Tue Apr 26 22:22:17 2011
New Revision: 130279

URL: http://llvm.org/viewvc/llvm-project?rev=130279&view=rev
Log:
Use static inline to do the right thing when built in C99 mode. Of course,
C89 doesn't have an inline keyword.

Modified:
    llvm/trunk/runtime/libprofile/PathProfiling.c

Modified: llvm/trunk/runtime/libprofile/PathProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/PathProfiling.c?rev=130279&r1=130278&r2=130279&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/PathProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/PathProfiling.c Tue Apr 26 22:22:17 2011
@@ -104,7 +104,7 @@
   }
 }
 
-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 @@
 }
 
 /* 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);





More information about the llvm-commits mailing list