[all-commits] [llvm/llvm-project] 51f6ca: [demangler][NFC] Rename SwapAndRestore to ScopedOv...

Nathan Sidwell via All-commits all-commits at lists.llvm.org
Wed Apr 6 12:55:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51f6caf2fbb5118569f2de33a85ffcc52568e0a7
      https://github.com/llvm/llvm-project/commit/51f6caf2fbb5118569f2de33a85ffcc52568e0a7
  Author: Nathan Sidwell <nathan at acm.org>
  Date:   2022-04-06 (Wed, 06 Apr 2022)

  Changed paths:
    M libcxxabi/src/demangle/ItaniumDemangle.h
    M libcxxabi/src/demangle/Utility.h
    M llvm/include/llvm/Demangle/ItaniumDemangle.h
    M llvm/include/llvm/Demangle/Utility.h
    M llvm/lib/Demangle/RustDemangle.cpp

  Log Message:
  -----------
  [demangler][NFC] Rename SwapAndRestore to ScopedOverride

The demangler has a utility class 'SwapAndRestore'. That name is
confusing. It's not swapping anything, and the restore part happens at
the object's destruction. What it's actually doing is allowing a
override of some value that is dynamically accessible within the
lifetime of a lexical scope. Thus rename it to ScopedOverride, and
tweak it's member variable names.

Reviewed By: dblaikie

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




More information about the All-commits mailing list