Ticket #51524: patch-src-snowleopard-HeaderMap.diff

File patch-src-snowleopard-HeaderMap.diff, 588 bytes (added by kenneth.f.cunningham@…, 8 years ago)
  • tools/clang/lib/Lex/HeaderMap.cpp

    old new  
    2626#include <memory>
    2727using namespace clang;
    2828
     29static size_t
     30strnlen(const char *s, size_t maxlen)
     31{
     32        size_t len;
     33
     34        for (len = 0; len < maxlen; len++, s++) {
     35                if (!*s)
     36                        break;
     37        }
     38        return (len);
     39}
     40
     41
    2942/// HashHMapKey - This is the 'well known' hash function required by the file
    3043/// format, used to look up keys in the hash table.  The hash table uses simple
    3144/// linear probing based on this function.