[IR] Clarify that Value::getName() is not actually cheap.

It involves a hashtable lookup when the Value has a name.

llvm-svn: 290695
This commit is contained in:
Justin Lebar 2016-12-29 00:30:42 +00:00
parent c9e0a153cf
commit 23a53501a4
1 changed files with 3 additions and 2 deletions

View File

@ -245,8 +245,9 @@ private:
public:
/// \brief 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 guaranteed to return the same reference as long as the value is not
/// modified. If the value has a name, this does a hashtable lookup, so it's
/// not free.
StringRef getName() const;
/// \brief Change the name of the value.