alexfh added inline comments.

================
Comment at: clang-tools-extra/trunk/clangd/index/Index.h:71
+  // via llvm::StringRef.
+  const char *FileURI = "";
 };
----------------
If the users of the SymbolLocation have a way to get a common "context", you 
could keep a list of filenames in this context and just store an index into 
this list (which could be even shorter). If the structure is used where no 
context is available, you could still keep a list of StringRefs somewhere 
(probably close to where the string data pointed by the StringRefs lives) and 
keep a `StringRef *` here. At a cost of one indirection you'd avoid calling 
strlen.

Not sure what trade-off is better for this particular use case though.


Repository:
  rL LLVM

https://reviews.llvm.org/D53427



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to