[PATCH] D24834: Convert option tables to use llvm::ArrayRefs
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 10:21:59 PDT 2016
zturner created this revision.
zturner added a reviewer: clayborg.
zturner added a subscriber: llvm-commits.
This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup::GetDefinitions()` to return an `llvm::ArrayRef<OptionDefinition>` instead of a `const OptionDefinition*`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it deletes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length.
The bulk of this CL is relocating the options table from one point in the file to another. This is because I removed the `static OptionDefinition g_option_table` from each of the classes. By raising them to the file statics instead of class statics, it should give them internal linkage, speeding up link times and possibly having positive effect on binary size. But it also means they have to appear above the option definition class instead of below, since there is no declaration.
https://reviews.llvm.org/D24834
Files:
include/lldb/Interpreter/OptionGroupArchitecture.h
include/lldb/Interpreter/OptionGroupBoolean.h
include/lldb/Interpreter/OptionGroupFile.h
include/lldb/Interpreter/OptionGroupFormat.h
include/lldb/Interpreter/OptionGroupOutputFile.h
include/lldb/Interpreter/OptionGroupPlatform.h
include/lldb/Interpreter/OptionGroupString.h
include/lldb/Interpreter/OptionGroupUInt64.h
include/lldb/Interpreter/OptionGroupUUID.h
include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
include/lldb/Interpreter/OptionGroupVariable.h
include/lldb/Interpreter/OptionGroupWatchpoint.h
include/lldb/Interpreter/Options.h
include/lldb/Target/Platform.h
include/lldb/Target/Process.h
source/Commands/CommandObjectArgs.cpp
source/Commands/CommandObjectArgs.h
source/Commands/CommandObjectBreakpoint.cpp
source/Commands/CommandObjectBreakpointCommand.cpp
source/Commands/CommandObjectCommands.cpp
source/Commands/CommandObjectDisassemble.cpp
source/Commands/CommandObjectDisassemble.h
source/Commands/CommandObjectExpression.cpp
source/Commands/CommandObjectExpression.h
source/Commands/CommandObjectFrame.cpp
source/Commands/CommandObjectHelp.cpp
source/Commands/CommandObjectHelp.h
source/Commands/CommandObjectLog.cpp
source/Commands/CommandObjectMemory.cpp
source/Commands/CommandObjectPlatform.cpp
source/Commands/CommandObjectProcess.cpp
source/Commands/CommandObjectRegister.cpp
source/Commands/CommandObjectSettings.cpp
source/Commands/CommandObjectSource.cpp
source/Commands/CommandObjectTarget.cpp
source/Commands/CommandObjectThread.cpp
source/Commands/CommandObjectType.cpp
source/Commands/CommandObjectWatchpoint.cpp
source/Commands/CommandObjectWatchpointCommand.cpp
source/Interpreter/Args.cpp
source/Interpreter/OptionGroupArchitecture.cpp
source/Interpreter/OptionGroupFormat.cpp
source/Interpreter/OptionGroupOutputFile.cpp
source/Interpreter/OptionGroupPlatform.cpp
source/Interpreter/OptionGroupUUID.cpp
source/Interpreter/OptionGroupValueObjectDisplay.cpp
source/Interpreter/OptionGroupVariable.cpp
source/Interpreter/OptionGroupWatchpoint.cpp
source/Interpreter/Options.cpp
source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
source/Target/Platform.cpp
source/Target/Process.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24834.72190.patch
Type: text/x-patch
Size: 288356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160922/1f4d0dc1/attachment-0001.bin>
More information about the llvm-commits
mailing list