[llvm-commits] [llvm] r77269 - /llvm/trunk/include/llvm/Value.h
Daniel Dunbar
daniel at zuster.org
Mon Jul 27 15:39:14 PDT 2009
Author: ddunbar
Date: Mon Jul 27 17:39:14 2009
New Revision: 77269
URL: http://llvm.org/viewvc/llvm-project?rev=77269&view=rev
Log:
Add a comment on Value explaining the current getName() behavior.
Modified:
llvm/trunk/include/llvm/Value.h
Modified: llvm/trunk/include/llvm/Value.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=77269&r1=77268&r2=77269&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Value.h (original)
+++ llvm/trunk/include/llvm/Value.h Mon Jul 27 17:39:14 2009
@@ -114,6 +114,12 @@
/// 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
More information about the llvm-commits
mailing list