diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-19 23:37:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-19 23:37:23 +0000 |
commit | a70ed4f7f6e87aa3a9c8d0e21b5bd92eeab3b521 (patch) | |
tree | 502627278cfd8c0fef0e70a0bf771c7af58e9489 /include/llvm/ADT | |
parent | 2a19e973cf0c15c4744b0d54bb5f4f2ced979570 (diff) | |
download | external_llvm-a70ed4f7f6e87aa3a9c8d0e21b5bd92eeab3b521.zip external_llvm-a70ed4f7f6e87aa3a9c8d0e21b5bd92eeab3b521.tar.gz external_llvm-a70ed4f7f6e87aa3a9c8d0e21b5bd92eeab3b521.tar.bz2 |
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/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/Twine.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/ADT/Twine.h b/include/llvm/ADT/Twine.h index 2c6ba0b..88fde0a 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 /// @{ |