diff options
Diffstat (limited to 'lib/BinaryFormat/Dwarf.cpp')
| -rw-r--r-- | lib/BinaryFormat/Dwarf.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/lib/BinaryFormat/Dwarf.cpp b/lib/BinaryFormat/Dwarf.cpp index 37c4579ef0f8..86e3b02577fd 100644 --- a/lib/BinaryFormat/Dwarf.cpp +++ b/lib/BinaryFormat/Dwarf.cpp @@ -575,3 +575,10 @@ bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version,    }    return ExtensionsOk;  } + +uint32_t llvm::dwarf::djbHash(StringRef Buffer) { +  uint32_t H = 5381; +  for (char C : Buffer.bytes()) +    H = ((H << 5) + H) + C; +  return H; +} | 
