From c1c3262b63b1d5fbba6a7ad188f4e47d92c7840e Mon Sep 17 00:00:00 2001 From: rdivacky Date: Thu, 15 Jul 2010 17:06:11 +0000 Subject: Update LLVM to r108428. --- docs/ProgrammersManual.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'docs/ProgrammersManual.html') diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index ed6a2b7..9992cd9 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -457,8 +457,8 @@ StringMap class which is used extensively in LLVM and Clang.

may have embedded null characters. Therefore, they cannot simply take a const char *, and taking a const std::string& requires clients to perform a heap allocation which is usually unnecessary. Instead, -many LLVM APIs use a const StringRef& or a const -Twine& for passing strings efficiently.

+many LLVM APIs use a StringRef or a const Twine& for +passing strings efficiently.

@@ -477,19 +477,17 @@ on std:string, but does not require heap allocation.

an std::string, or explicitly with a character pointer and length. For example, the StringRef find function is declared as:

-
- iterator find(const StringRef &Key); -
+
+  iterator find(StringRef Key);
+

and clients can call it using any one of:

-
-
+
   Map.find("foo");                 // Lookup "foo"
   Map.find(std::string("bar"));    // Lookup "bar"
   Map.find(StringRef("\0baz", 4)); // Lookup "\0baz"
 
-

Similarly, APIs which need to return a string may return a StringRef instance, which can be used directly or converted to an std::string @@ -499,7 +497,8 @@ for more information.

You should rarely use the StringRef class directly, because it contains pointers to external memory it is not generally safe to store an instance of the -class (unless you know that the external storage will not be freed).

+class (unless you know that the external storage will not be freed). StringRef is +small and pervasive enough in LLVM that it should always be passed by value.

@@ -3943,7 +3942,7 @@ arguments. An argument has a pointer to the parent Function.

Dinakar Dhurjati and Chris Lattner
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-05-07 02:28:04 +0200 (Fri, 07 May 2010) $ + Last modified: $Date: 2010-07-15 00:38:02 +0200 (Thu, 15 Jul 2010) $ -- cgit v1.1