[all-commits] [llvm/llvm-project] dabe87: Cache the value for absolute path in FileSpec.

Greg Clayton via All-commits all-commits at lists.llvm.org
Fri Jul 22 14:05:08 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dabe877248b85b34878e75d5510339325ee087d0
      https://github.com/llvm/llvm-project/commit/dabe877248b85b34878e75d5510339325ee087d0
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2022-07-22 (Fri, 22 Jul 2022)

  Changed paths:
    M lldb/include/lldb/Utility/FileSpec.h
    M lldb/source/Utility/FileSpec.cpp
    M lldb/unittests/Utility/FileSpecTest.cpp

  Log Message:
  -----------
  Cache the value for absolute path in FileSpec.

Checking if a path is absolute can be expensive and currently the result is not cached in the FileSpec object. This patch adds caching and also code to clear the cache if the file is modified.

Differential Revision: https://reviews.llvm.org/D130396




More information about the All-commits mailing list