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

Greg Clayton via All-commits all-commits at lists.llvm.org
Thu Jul 28 13:32:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc0f452e85e572f1e824c1eb3cdaa060d326f0c3
      https://github.com/llvm/llvm-project/commit/dc0f452e85e572f1e824c1eb3cdaa060d326f0c3
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2022-07-28 (Thu, 28 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