aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorSean Silva <silvasean@google.com>2020-12-03 10:38:37 -0800
committerSean Silva <silvasean@google.com>2020-12-03 17:21:44 -0800
commitae9fd5578e8ab59bcffe1fd2b6a91531dff5bde6 (patch)
treeb1d00e8f7dac6ee86949f82fbae44e98150f3d05 /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent2f0de582949d1c9b5beff591b3735b6c02c45033 (diff)
downloadllvm-ae9fd5578e8ab59bcffe1fd2b6a91531dff5bde6.zip
llvm-ae9fd5578e8ab59bcffe1fd2b6a91531dff5bde6.tar.gz
llvm-ae9fd5578e8ab59bcffe1fd2b6a91531dff5bde6.tar.bz2
[SmallVector] Allow SmallVector<T>
This patch adds a capability to SmallVector to decide a number of inlined elements automatically. The policy is: - A minimum of 1 inlined elements, with more as long as sizeof(SmallVector<T>) <= 64. - If sizeof(T) is "too big", then trigger a static_assert: this dodges the more pathological cases This is expected to systematically improve SmallVector use in the LLVM codebase, which has historically been plagued by semi-arbitrary / cargo culted N parameters, often leading to bad outcomes due to excessive sizeof(SmallVector<T, N>). This default also makes programming more convenient by avoiding edit/rebuild cycles due to forgetting to type the N parameter. Differential Revision: https://reviews.llvm.org/D92522
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions