[PATCH] D113462: [llvm] Fix small typos in Programmer's Manual and Chrono.h.

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 19:37:01 PST 2021


noajshu created this revision.
noajshu edited the summary of this revision.
noajshu retitled this revision from "[llvm] Fix small typo in Programmer's Manual." to "[llvm] NFC Fix small typo in Programmer's Manual.".
noajshu retitled this revision from "[llvm] NFC Fix small typo in Programmer's Manual." to "[llvm] Fix small typo in Programmer's Manual.".
noajshu updated this revision to Diff 394727.
noajshu retitled this revision from "[llvm] Fix small typo in Programmer's Manual." to "[llvm] Fix small typos in Programmer's Manual and Chrono.h.".
noajshu edited the summary of this revision.
noajshu added a reviewer: phosek.
noajshu added a comment.
Herald added a subscriber: dexonsmith.
noajshu published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Also fix some typos in Chrono.h


The Programmer's Manual guidance on the StringRef class (https://llvm.org/docs/ProgrammersManual.html#the-stringref-class) refers to `iterator StringRef::find(StringRef Key)` which does not exist. Based on context this is surely a small typo meant to be `iterator StringMap::find(StringRef Key)`.

This also corrects some small typos in the comments of llvm/include/llvm/Support/Chrono.h


https://reviews.llvm.org/D113462

Files:
  llvm/docs/ProgrammersManual.rst
  llvm/include/llvm/Support/Chrono.h


Index: llvm/include/llvm/Support/Chrono.h
===================================================================
--- llvm/include/llvm/Support/Chrono.h
+++ llvm/include/llvm/Support/Chrono.h
@@ -22,13 +22,13 @@
 namespace sys {
 
 /// A time point on the system clock. This is provided for two reasons:
-/// - to insulate us agains subtle differences in behavoir to differences in
-///   system clock precision (which is implementation-defined and differs between
-///   platforms).
+/// - to insulate us against subtle differences in behavior to differences in
+///   system clock precision (which is implementation-defined and differs
+///   between platforms).
 /// - to shorten the type name
-/// The default precision is nanoseconds. If need a specific precision specify
-/// it explicitly. If unsure, use the default. If you need a time point on a
-/// clock other than the system_clock, use std::chrono directly.
+/// The default precision is nanoseconds. If you need a specific precision
+/// specify it explicitly. If unsure, use the default. If you need a time point
+/// on a clock other than the system_clock, use std::chrono directly.
 template <typename D = std::chrono::nanoseconds>
 using TimePoint = std::chrono::time_point<std::chrono::system_clock, D>;
 
Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -214,7 +214,7 @@
 
 It can be implicitly constructed using a C style null-terminated string, an
 ``std::string``, or explicitly with a character pointer and length.  For
-example, the ``StringRef`` find function is declared as:
+example, the ``StringMap`` find function is declared as:
 
 .. code-block:: c++
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113462.394727.patch
Type: text/x-patch
Size: 1764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/d62bd8be/attachment.bin>


More information about the llvm-commits mailing list