aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/libclang/LibclangTest.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2016-08-18 18:30:54 +0000
committerPete Cooper <peter_cooper@apple.com>2016-08-18 18:30:54 +0000
commita8db71e8407922ab7e2e8279e59749d8ce222e0d (patch)
tree998f2dbb444ef4766f0f9d46dc2402a0879d6d8d /clang/unittests/libclang/LibclangTest.cpp
parentc33b837af399c75bc1dec0aaa1d5b3944964b1c6 (diff)
downloadllvm-a8db71e8407922ab7e2e8279e59749d8ce222e0d.zip
llvm-a8db71e8407922ab7e2e8279e59749d8ce222e0d.tar.gz
llvm-a8db71e8407922ab7e2e8279e59749d8ce222e0d.tar.bz2
Add a version of Intrinsic::getName which is more efficient when there are no overloads.
When running 'opt -O2 verify-uselistorder-nodbg.lto.bc', there are 33m allocations. 8.2m come from std::string allocations in Intrinsic::getName(). Turns out this method only returns a std::string because it needs to handle overloads, but that is not the common case. This adds an overload of getName which just returns a StringRef when there are no overloads and so saves on the allocations. llvm-svn: 279113
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
0 files changed, 0 insertions, 0 deletions