[Lldb-commits] [PATCH] D70120: [lldb][NFC] Let CompilerType::DumpTypeValue take a option struct instead of a huge list of options

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 12 04:55:57 PST 2019


teemperor created this revision.
teemperor added reviewers: labath, davide.
Herald added subscribers: lldb-commits, JDevlieghere.
Herald added a project: LLDB.

This function has 8 parameters which makes its function calls hard to read. It also
doesn't help that half the parameters are just integers of some form. What's even worse is that
we fiddle around with all these signatures/invocations downstream in swift-lldb just because we
add one parameter there.

Let's just pass a struct here so that we can add the default values in a sensible way and actually
have some descriptive name beside the values we pass as parameters when we call this function.
Also moves the hidden documentation from the one function call to the struct so that it becomes
more obvious what's going on here.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D70120

Files:
  lldb/include/lldb/Symbol/ClangASTContext.h
  lldb/include/lldb/Symbol/CompilerType.h
  lldb/include/lldb/Symbol/TypeSystem.h
  lldb/source/DataFormatters/TypeFormat.cpp
  lldb/source/Symbol/ClangASTContext.cpp
  lldb/source/Symbol/CompilerType.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70120.228871.patch
Type: text/x-patch
Size: 11688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191112/160ab210/attachment-0001.bin>


More information about the lldb-commits mailing list