aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Program.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-08-18 22:39:38 -0700
committerGitHub <noreply@github.com>2025-08-18 22:39:38 -0700
commitd82617d2e8b3d97ef0898cb6d2c893f8e7bd01b3 (patch)
treea792305df4263a09e137ac385fe5c6937dcf873f /clang/lib/AST/ByteCode/Program.cpp
parent6c3a0ab51abda947c6b087d9dde92cef6dff8fe6 (diff)
downloadllvm-d82617d2e8b3d97ef0898cb6d2c893f8e7bd01b3.zip
llvm-d82617d2e8b3d97ef0898cb6d2c893f8e7bd01b3.tar.gz
llvm-d82617d2e8b3d97ef0898cb6d2c893f8e7bd01b3.tar.bz2
[ADT] Refactor SmallPtrSetImplBase::swap (NFC) (#154261)
SmallPtrSetImplBase::swap needs to deal with four cases depending on whether LHS is small and whether RHS is small. Now, the code to swap small LHS and large RHS is symmetric with the code to swap large LHS and small RHS. This patch rearranges code so that we first take care of the case where both LHS and RHS are small. Then we compute references SmallSide and LargeSide and actually swap the two instances. This refactoing saves about 11 lines of code. Note that SmallDenseMap::swap also uses a similar trick.
Diffstat (limited to 'clang/lib/AST/ByteCode/Program.cpp')
0 files changed, 0 insertions, 0 deletions