[all-commits] [llvm/llvm-project] 40d774: [lldb/Utility] Simplify Scalar::PromoteToMaxType

Pavel Labath via All-commits all-commits at lists.llvm.org
Fri Aug 14 02:09:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 40d774265b08fbfd0f3e2ffa79ce7feddbd060bc
      https://github.com/llvm/llvm-project/commit/40d774265b08fbfd0f3e2ffa79ce7feddbd060bc
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-08-14 (Fri, 14 Aug 2020)

  Changed paths:
    M lldb/include/lldb/Utility/Scalar.h
    M lldb/source/Utility/Scalar.cpp

  Log Message:
  -----------
  [lldb/Utility] Simplify Scalar::PromoteToMaxType

The function had very complicated signature, because it was trying to
avoid making unnecessary copies of the Scalar object. However, this
class is not hot enough to worry about these kinds of optimizations. My
making copies unconditionally, we can simplify the function and all of
its call sites.

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




More information about the All-commits mailing list