summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-19 23:37:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-19 23:37:23 +0000
commit5149932068f535e1ff13b91c9669f55718c60a07 (patch)
tree502627278cfd8c0fef0e70a0bf771c7af58e9489 /include
parent7a7be366a7434623cbd1b44d41e07da5f2b8bf27 (diff)
downloadllvm-5149932068f535e1ff13b91c9669f55718c60a07.tar.gz
llvm-5149932068f535e1ff13b91c9669f55718c60a07.tar.bz2
llvm-5149932068f535e1ff13b91c9669f55718c60a07.tar.xz
Add a fast path for setName("") on an unnamed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/Twine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/ADT/Twine.h b/include/llvm/ADT/Twine.h
index 2c6ba0bc23..88fde0a54a 100644
--- a/include/llvm/ADT/Twine.h
+++ b/include/llvm/ADT/Twine.h
@@ -321,6 +321,16 @@ namespace llvm {
}
/// @}
+ /// @name Predicate Operations
+ /// @{
+
+ /// isTriviallyEmpty - Check if this twine is trivially empty; a false
+ /// return value does not necessarily mean the twine is empty.
+ bool isTriviallyEmpty() const {
+ return isNullary();
+ }
+
+ /// @}
/// @name String Operations
/// @{