[Lldb-commits] [PATCH] D43647: Generate most of the target properties from a central specification.

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 22 15:48:16 PST 2018


aprantl created this revision.
aprantl added reviewers: jingham, jasonmolenda, clayborg.
Herald added a subscriber: llvm-commits.

I recently had to add a new property and was annoyed by how much repetitive code I needed to write manually.

This patch applies a common pattern used all over LLVM to auto-generate most of the definitions and accessors for target properties from a central definition file. The change is mostly NFC and should result in a small reduction of code size.

This is by no means done, and there are many other things that could be derived in a similar way, but I would like to get the discussion started before sinking too much time into this refactoring.

It does affect the realtive ordering of the properties though.

Let me know what you think!


Repository:
  rL LLVM

https://reviews.llvm.org/D43647

Files:
  include/lldb/Target/Properties.def
  include/lldb/Target/Target.h
  source/Target/Target.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43647.135532.patch
Type: text/x-patch
Size: 38435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180222/438bddd3/attachment-0001.bin>


More information about the lldb-commits mailing list