diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2022-12-17 17:32:51 +0000 |
---|---|---|
committer | Michael Buch <michaelbuch12@gmail.com> | 2023-01-27 02:24:35 +0000 |
commit | a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35 (patch) | |
tree | e9b18c7f50e6bcb4c21605ccf99275a2902e1de2 /llvm/lib/CodeGen/StackProtector.cpp | |
parent | 29ecf0e62cd7899dee84732a31875179ec4d5a80 (diff) | |
download | llvm-a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35.zip llvm-a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35.tar.gz llvm-a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35.tar.bz2 |
[lldb][TypeSystemClang][NFC] Make TemplateParameterInfos members private
This patch makes the members of `TemplateParameterInfos` only accessible
via public APIs. The motivation for this is that
`TemplateParameterInfos` attempts to maintain two vectors in tandem
(`args` for the template arguments and `names` for the corresponding
name). Working with this structure as it's currently designed makes
it easy to run into out-of-bounds accesses later down the line.
This patch proposes to introduce a new
`TemplateParameterInfos::InsertArg` which is the only way to
set the `TemplateArgument` and name of an entry and since we
require both to be specified we maintain the vectors in sync
out-of-the-box.
To avoid adding non-const getters just for unit-tests a new
`TemplateParameterInfosManipulatorForTests` is introduced
that can be used to control internal state from tests.
Diffstat (limited to 'llvm/lib/CodeGen/StackProtector.cpp')
0 files changed, 0 insertions, 0 deletions