[all-commits] [llvm/llvm-project] d84117: [lldb][TypeSystemClang][NFC] Factor out l/r-value ...

Michael Buch via All-commits all-commits at lists.llvm.org
Fri Mar 3 09:45:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d84117d0ef5fe818990ec2a5199f4b8ceee927b5
      https://github.com/llvm/llvm-project/commit/d84117d0ef5fe818990ec2a5199f4b8ceee927b5
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

  Log Message:
  -----------
  [lldb][TypeSystemClang][NFC] Factor out l/r-value reference logic for IsXXXType APIs

This will be useful as we add more `IsXXXType` APIs for different
function types.

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


  Commit: b642fd5ee250247ccefb38099169b4ee8ac4112b
      https://github.com/llvm/llvm-project/commit/b642fd5ee250247ccefb38099169b4ee8ac4112b
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    M lldb/test/API/functionalities/data-formatter/data-formatter-cpp/main.cpp

  Log Message:
  -----------
  [lldb][TypeSystemClang] Format pointers to member functions as eFormatHex

Before this patch, LLDB used to format pointers to members, such as,
```
void (Foo::*pointer_to_member_func)() = &Foo::member_func;
```
as `eFormatBytes`. E.g.,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00
```

This patch makes sure we format pointers to member functions the same
way we do regular function pointers.

After this patch we format member pointers as:
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```

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


  Commit: 6bd46e713c6d8deda7bdae8b1efadb99c88b4443
      https://github.com/llvm/llvm-project/commit/6bd46e713c6d8deda7bdae8b1efadb99c88b4443
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-03-03 (Fri, 03 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Symbol/CompilerType.h
    M lldb/include/lldb/Symbol/TypeSystem.h
    M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
    M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
    M lldb/source/Symbol/CompilerType.cpp
    M lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py

  Log Message:
  -----------
  [lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for member-function pointers

With this patch member-function pointers are formatted using
`CXXFunctionPointerSummaryProvider`.

This turns,
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94
```
into
```
(lldb) v pointer_to_member_func
(void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3)
```

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


Compare: https://github.com/llvm/llvm-project/compare/4d909c556e2c...6bd46e713c6d


More information about the All-commits mailing list