Skip to content

Commit 1939a0f

Browse files
committed
Minor ReleaseNotes fixes
1 parent 0bf4795 commit 1939a0f

File tree

3 files changed

+58
-59
lines changed

3 files changed

+58
-59
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -511,39 +511,39 @@ Static Analyzer
511511
Undefined Behavior Sanitizer (UBSan)
512512
------------------------------------
513513

514-
- * The ``pointer-overflow`` check was extended added to catch the cases where
515-
a non-zero offset is applied to a null pointer, or the result of
516-
applying the offset is a null pointer.
517-
518-
.. code-block:: c++
519-
520-
#include <cstdint> // for intptr_t
521-
522-
static char *getelementpointer_inbounds(char *base, unsigned long offset) {
523-
// Potentially UB.
524-
return base + offset;
525-
}
526-
527-
char *getelementpointer_unsafe(char *base, unsigned long offset) {
528-
// Always apply offset. UB if base is ``nullptr`` and ``offset`` is not
529-
// zero, or if ``base`` is non-``nullptr`` and ``offset`` is
530-
// ``-reinterpret_cast<intptr_t>(base)``.
531-
return getelementpointer_inbounds(base, offset);
532-
}
533-
534-
char *getelementpointer_safe(char *base, unsigned long offset) {
535-
// Cast pointer to integer, perform usual arithmetic addition,
536-
// and cast to pointer. This is legal.
537-
char *computed =
538-
reinterpret_cast<char *>(reinterpret_cast<intptr_t>(base) + offset);
539-
// If either the pointer becomes non-``nullptr``, or becomes
540-
// ``nullptr``, we must use ``computed`` result.
541-
if (((base == nullptr) && (computed != nullptr)) ||
542-
((base != nullptr) && (computed == nullptr)))
543-
return computed;
544-
// Else we can use ``getelementpointer_inbounds()``.
545-
return getelementpointer_inbounds(base, offset);
546-
}
514+
* The ``pointer-overflow`` check was extended added to catch the cases where
515+
a non-zero offset is applied to a null pointer, or the result of
516+
applying the offset is a null pointer.
517+
518+
.. code-block:: c++
519+
520+
#include <cstdint> // for intptr_t
521+
522+
static char *getelementpointer_inbounds(char *base, unsigned long offset) {
523+
// Potentially UB.
524+
return base + offset;
525+
}
526+
527+
char *getelementpointer_unsafe(char *base, unsigned long offset) {
528+
// Always apply offset. UB if base is ``nullptr`` and ``offset`` is not
529+
// zero, or if ``base`` is non-``nullptr`` and ``offset`` is
530+
// ``-reinterpret_cast<intptr_t>(base)``.
531+
return getelementpointer_inbounds(base, offset);
532+
}
533+
534+
char *getelementpointer_safe(char *base, unsigned long offset) {
535+
// Cast pointer to integer, perform usual arithmetic addition,
536+
// and cast to pointer. This is legal.
537+
char *computed =
538+
reinterpret_cast<char *>(reinterpret_cast<intptr_t>(base) + offset);
539+
// If either the pointer becomes non-``nullptr``, or becomes
540+
// ``nullptr``, we must use ``computed`` result.
541+
if (((base == nullptr) && (computed != nullptr)) ||
542+
((base != nullptr) && (computed == nullptr)))
543+
return computed;
544+
// Else we can use ``getelementpointer_inbounds()``.
545+
return getelementpointer_inbounds(base, offset);
546+
}
547547
548548

549549
Additional Information

lld/docs/ReleaseNotes.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,31 +92,31 @@ MinGW Improvements
9292

9393
* Allow using custom .edata sections from input object files (for use
9494
by Wine)
95-
(`dadc6f248868 <https://reviews.llvm.org/rGdadc6f248868>`)
95+
(`dadc6f248868 <https://reviews.llvm.org/rGdadc6f248868>`_)
9696

9797
* Don't implicitly create import libraries unless requested
98-
(`6540e55067e3 <https://reviews.llvm.org/rG6540e55067e3>`)
98+
(`6540e55067e3 <https://reviews.llvm.org/rG6540e55067e3>`_)
9999

100100
* Support merging multiple resource object files
101-
(`3d3a9b3b413d <https://reviews.llvm.org/rG3d3a9b3b413d>`)
101+
(`3d3a9b3b413d <https://reviews.llvm.org/rG3d3a9b3b413d>`_)
102102
and properly handle the default manifest object files that GCC can pass
103-
(`d581dd501381 <https://reviews.llvm.org/rGd581dd501381>`)
103+
(`d581dd501381 <https://reviews.llvm.org/rGd581dd501381>`_)
104104

105105
* Demangle itanium symbol names in warnings/error messages
106-
(`a66fc1c99f3e <https://reviews.llvm.org/rGa66fc1c99f3e>`)
106+
(`a66fc1c99f3e <https://reviews.llvm.org/rGa66fc1c99f3e>`_)
107107

108108
* Print source locations for undefined references and duplicate symbols,
109109
if possible
110-
(`1d06d48bb346 <https://reviews.llvm.org/rG1d06d48bb346>`)
110+
(`1d06d48bb346 <https://reviews.llvm.org/rG1d06d48bb346>`_)
111111
and
112-
(`b38f577c015c <https://reviews.llvm.org/rGb38f577c015c>`)
112+
(`b38f577c015c <https://reviews.llvm.org/rGb38f577c015c>`_)
113113

114114
* Look for more filename patterns when resolving ``-l`` options
115-
(`0226c35262df <https://reviews.llvm.org/rG0226c35262df>`)
115+
(`0226c35262df <https://reviews.llvm.org/rG0226c35262df>`_)
116116

117117
* Don't error out on duplicate absolute symbols with the same value
118118
(which can happen for the default-null symbol for weak symbols)
119-
(`1737cc750c46 <https://reviews.llvm.org/rG1737cc750c46>`)
119+
(`1737cc750c46 <https://reviews.llvm.org/rG1737cc750c46>`_)
120120

121121

122122
WebAssembly Improvements

llvm/docs/ReleaseNotes.rst

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Non-comprehensive list of changes in this release
6565
with optimizations enabled.
6666

6767
* ``Callbacks`` have been added to ``CommandLine Options``. These can
68-
be used to validate of selectively enable other options.
68+
be used to validate or selectively enable other options.
6969

7070
* The function attributes ``no-frame-pointer-elim`` and
7171
``no-frame-pointer-elim-non-leaf`` have been replaced by ``frame-pointer``,
@@ -77,7 +77,7 @@ Non-comprehensive list of changes in this release
7777
`D59918 <https://reviews.llvm.org/D59918>`_, `LLVM-Dev talk <https://youtu.be/CzWkc_JcfS0>`_).
7878
In this release, 19 different attributes are inferred, including 12 LLVM IR
7979
attributes and 7 "abstract" attributes, such as liveness. The Attributor is
80-
still under heavy development and disabled by default, to enable an early run
80+
still under heavy development and disabled by default; to enable an early run
8181
pass ``-mllvm -attributor-disable=false`` to an invocation of clang.
8282

8383
* New matrix math intrinsics have been added to LLVM
@@ -154,33 +154,33 @@ Changes to the PowerPC Target
154154

155155
Optimization:
156156

157-
* Improved register pressure estimates in the loop vectorizer based on type
157+
* Improved register pressure estimates in the loop vectorizer based on type
158158

159-
* Improved the PowerPC cost model for the vectorizer
159+
* Improved the PowerPC cost model for the vectorizer
160160

161-
* Enabled vectorization of math routines on PowerPC using MASSV (Mathematical Acceleration SubSystem) library
161+
* Enabled vectorization of math routines on PowerPC using MASSV (Mathematical Acceleration SubSystem) library
162162

163-
compiler-rt:
163+
copiler-rt:
164164

165-
* Added/improved conversion functions from IBM long double to 128-bit integers
165+
* Added/improved conversion functions from IBM long double to 128-bit integers
166166

167167
Codegen:
168168

169-
* Optimized memory access instructions in loops (pertaining to update-form instructions and address computation)
169+
* Optimized memory access instructions in loops (pertaining to update-form instructions and address computation)
170170

171-
* Added options to disable hoisting instructions to hotter blocks based on statically or profile-based block hotness estimates
171+
* Added options to disable hoisting instructions to hotter blocks based on statically or profile-based block hotness estimates
172172

173-
* Code generation improvements (particularly with floating point and vector code as well as handling condition registers)
173+
* Code generation improvements (particularly with floating point and vector code as well as handling condition registers)
174174

175-
* Various infrastructural improvements, code refactoring, and bug fixes
175+
* Various infrastructural improvements, code refactoring, and bug fixes
176176

177-
* Optimized handling of control flow based on multiple comparison of same values
177+
* Optimized handling of control flow based on multiple comparison of same values
178178

179179
Tools:
180180

181-
* llvm-readobj supports displaying file header, section headers, symbol table and relocation entries for XCOFF object files
181+
* llvm-readobj supports displaying file header, section headers, symbol table and relocation entries for XCOFF object files
182182

183-
* llvm-objdump supports disassembling physical sections for XCOFF object files
183+
* llvm-objdump supports disassembling physical sections for XCOFF object files
184184

185185

186186
Changes to the SystemZ Target
@@ -203,9 +203,7 @@ Changes to the SystemZ Target
203203
Changes to the X86 Target
204204
-------------------------
205205

206-
During this release ...
207-
208-
* Less than 128 bit vector types, v2i32, v4i16, v2i16, v8i8, v4i8, and v2i8, are
206+
* Less-than-128-bit vector types, v2i32, v4i16, v2i16, v8i8, v4i8, and v2i8, are
209207
now stored in the lower bits of an xmm register and the upper bits are
210208
undefined. Previously the elements were spread apart with undefined bits in
211209
between them.
@@ -287,6 +285,7 @@ New Features:
287285
than the ABI register names.
288286

289287
Improvements:
288+
290289
* Trap and Debugtrap now lower to RISC-V-specific trap instructions.
291290

292291
* LLVM IR Inline assembly now supports using ABI register names and using

0 commit comments

Comments
 (0)