[PATCH] D27037: Introduce StringRefZ class to represent null-terminated string.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 00:17:06 PST 2016


ruiu created this revision.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.

StringRefZ is a class to represent a null-terminated string. String
length is computed lazily, so it more efficient than StringRef to
represent strings in string table.

The main purpose of defining that new class is to merge functions
that only differ in string types; we have many constructors that takes
`const char *` or `StringRef`. With StringRefZ, we can merge them.


https://reviews.llvm.org/D27037

Files:
  ELF/InputFiles.cpp
  ELF/LTO.cpp
  ELF/Strings.cpp
  ELF/Strings.h
  ELF/SymbolTable.cpp
  ELF/SymbolTable.h
  ELF/Symbols.cpp
  ELF/Symbols.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27037.79035.patch
Type: text/x-patch
Size: 16256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161123/ef68e633/attachment.bin>


More information about the llvm-commits mailing list