aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-27 22:39:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-27 22:39:14 +0000
commit3d2a56d38758943ee8070cacfd9e29754bdb59b3 (patch)
tree6898b43ea7a94f7a76fa66da913e317dea3031b2 /include
parent8fa3338ed2400c1352b137613d2c2c70d1ead695 (diff)
downloadexternal_llvm-3d2a56d38758943ee8070cacfd9e29754bdb59b3.zip
external_llvm-3d2a56d38758943ee8070cacfd9e29754bdb59b3.tar.gz
external_llvm-3d2a56d38758943ee8070cacfd9e29754bdb59b3.tar.bz2
Add a comment on Value explaining the current getName() behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Value.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Value.h b/include/llvm/Value.h
index 7965ca5..cc70ce1 100644
--- a/include/llvm/Value.h
+++ b/include/llvm/Value.h
@@ -114,6 +114,12 @@ public:
/// getName() - Return a constant reference to the value's name. This is cheap
/// and guaranteed to return the same reference as long as the value is not
/// modified.
+ ///
+ /// This is currently guaranteed to return a StringRef for which data() points
+ /// to a valid null terminated string. This usage is deprecated, however, and
+ /// clients should not rely on it. If such behavior is needed, clients should
+ /// use getNameStr() or switch to an interface that does not depend on null
+ /// termination.
StringRef getName() const;
/// getNameStr() - Return the name of the specified value, *constructing a