diff --git a/llvm/include/llvm/ADT/APFixedPoint.h b/llvm/include/llvm/ADT/APFixedPoint.h --- a/llvm/include/llvm/ADT/APFixedPoint.h +++ b/llvm/include/llvm/ADT/APFixedPoint.h @@ -5,12 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// +/// /// \file /// Defines the fixed point number interface. /// This is a class for abstracting various operations performed on fixed point /// types. -// +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_APFIXEDPOINT_H diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h --- a/llvm/include/llvm/ADT/APFloat.h +++ b/llvm/include/llvm/ADT/APFloat.h @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// /// /// \file -/// \brief /// This file declares a class to represent arbitrary precision floating point /// values and provide a variety of arithmetic operations on them. /// diff --git a/llvm/include/llvm/ADT/APSInt.h b/llvm/include/llvm/ADT/APSInt.h --- a/llvm/include/llvm/ADT/APSInt.h +++ b/llvm/include/llvm/ADT/APSInt.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the APSInt class, which is a simple class that -// represents an arbitrary sized integer that knows its signedness. -// +/// +/// \file +/// This file implements the APSInt class, which is a simple class that +/// represents an arbitrary sized integer that knows its signedness. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_APSINT_H diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h --- a/llvm/include/llvm/ADT/Any.h +++ b/llvm/include/llvm/ADT/Any.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file provides Any, a non-template class modeled in the spirit of -// std::any. The idea is to provide a type-safe replacement for C's void*. -// It can hold a value of any copy-constructible copy-assignable type -// +/// +/// \file +/// This file provides Any, a non-template class modeled in the spirit of +/// std::any. The idea is to provide a type-safe replacement for C's void*. +/// It can hold a value of any copy-constructible copy-assignable type +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_ANY_H diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h --- a/llvm/include/llvm/ADT/BitVector.h +++ b/llvm/include/llvm/ADT/BitVector.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the BitVector class. -// +/// +/// \file +/// This file implements the BitVector class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_BITVECTOR_H diff --git a/llvm/include/llvm/ADT/BreadthFirstIterator.h b/llvm/include/llvm/ADT/BreadthFirstIterator.h --- a/llvm/include/llvm/ADT/BreadthFirstIterator.h +++ b/llvm/include/llvm/ADT/BreadthFirstIterator.h @@ -5,13 +5,14 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file builds on the ADT/GraphTraits.h file to build a generic breadth -// first graph iterator. This file exposes the following functions/types: -// -// bf_begin/bf_end/bf_iterator -// * Normal breadth-first iteration - visit a graph level-by-level. -// +/// +/// \file +/// This file builds on the ADT/GraphTraits.h file to build a generic breadth +/// first graph iterator. This file exposes the following functions/types: +/// +/// bf_begin/bf_end/bf_iterator +/// * Normal breadth-first iteration - visit a graph level-by-level. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_BREADTHFIRSTITERATOR_H diff --git a/llvm/include/llvm/ADT/CachedHashString.h b/llvm/include/llvm/ADT/CachedHashString.h --- a/llvm/include/llvm/ADT/CachedHashString.h +++ b/llvm/include/llvm/ADT/CachedHashString.h @@ -5,15 +5,16 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines CachedHashString and CachedHashStringRef. These are owning -// and not-owning string types that store their hash in addition to their string -// data. -// -// Unlike std::string, CachedHashString can be used in DenseSet/DenseMap -// (because, unlike std::string, CachedHashString lets us have empty and -// tombstone values). -// +/// +/// \file +/// This file defines CachedHashString and CachedHashStringRef. These are +/// owning and not-owning string types that store their hash in addition to +/// their string data. +/// +/// Unlike std::string, CachedHashString can be used in DenseSet/DenseMap +/// (because, unlike std::string, CachedHashString lets us have empty and +/// tombstone values). +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_CACHEDHASHSTRING_H diff --git a/llvm/include/llvm/ADT/CoalescingBitVector.h b/llvm/include/llvm/ADT/CoalescingBitVector.h --- a/llvm/include/llvm/ADT/CoalescingBitVector.h +++ b/llvm/include/llvm/ADT/CoalescingBitVector.h @@ -6,7 +6,8 @@ // //===----------------------------------------------------------------------===// /// -/// \file A bitvector that uses an IntervalMap to coalesce adjacent elements +/// \file +/// A bitvector that uses an IntervalMap to coalesce adjacent elements /// into intervals. /// //===----------------------------------------------------------------------===// diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h --- a/llvm/include/llvm/ADT/DenseMap.h +++ b/llvm/include/llvm/ADT/DenseMap.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the DenseMap class. -// +/// +/// \file +/// This file defines the DenseMap class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DENSEMAP_H diff --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h --- a/llvm/include/llvm/ADT/DenseMapInfo.h +++ b/llvm/include/llvm/ADT/DenseMapInfo.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines DenseMapInfo traits for DenseMap. -// +/// +/// \file +/// This file defines DenseMapInfo traits for DenseMap. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DENSEMAPINFO_H diff --git a/llvm/include/llvm/ADT/DenseSet.h b/llvm/include/llvm/ADT/DenseSet.h --- a/llvm/include/llvm/ADT/DenseSet.h +++ b/llvm/include/llvm/ADT/DenseSet.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the DenseSet and SmallDenseSet classes. -// +/// +/// \file +/// This file defines the DenseSet and SmallDenseSet classes. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DENSESET_H diff --git a/llvm/include/llvm/ADT/DepthFirstIterator.h b/llvm/include/llvm/ADT/DepthFirstIterator.h --- a/llvm/include/llvm/ADT/DepthFirstIterator.h +++ b/llvm/include/llvm/ADT/DepthFirstIterator.h @@ -5,28 +5,29 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file builds on the ADT/GraphTraits.h file to build generic depth -// first graph iterator. This file exposes the following functions/types: -// -// df_begin/df_end/df_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// -// idf_begin/idf_end/idf_iterator -// * Depth-first iteration on the 'inverse' graph. -// -// df_ext_begin/df_ext_end/df_ext_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// -// idf_ext_begin/idf_ext_end/idf_ext_iterator -// * Depth-first iteration on the 'inverse' graph. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// +/// +/// \file +/// This file builds on the ADT/GraphTraits.h file to build generic depth +/// first graph iterator. This file exposes the following functions/types: +/// +/// df_begin/df_end/df_iterator +/// * Normal depth-first iteration - visit a node and then all of its children. +/// +/// idf_begin/idf_end/idf_iterator +/// * Depth-first iteration on the 'inverse' graph. +/// +/// df_ext_begin/df_ext_end/df_ext_iterator +/// * Normal depth-first iteration - visit a node and then all of its children. +/// This iterator stores the 'visited' set in an external set, which allows +/// it to be more efficient, and allows external clients to use the set for +/// other purposes. +/// +/// idf_ext_begin/idf_ext_end/idf_ext_iterator +/// * Depth-first iteration on the 'inverse' graph. +/// This iterator stores the 'visited' set in an external set, which allows +/// it to be more efficient, and allows external clients to use the set for +/// other purposes. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DEPTHFIRSTITERATOR_H diff --git a/llvm/include/llvm/ADT/DirectedGraph.h b/llvm/include/llvm/ADT/DirectedGraph.h --- a/llvm/include/llvm/ADT/DirectedGraph.h +++ b/llvm/include/llvm/ADT/DirectedGraph.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the interface and a base class implementation for a -// directed graph. -// +/// +/// \file +/// This file defines the interface and a base class implementation for a +/// directed graph. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_DIRECTEDGRAPH_H diff --git a/llvm/include/llvm/ADT/EnumeratedArray.h b/llvm/include/llvm/ADT/EnumeratedArray.h --- a/llvm/include/llvm/ADT/EnumeratedArray.h +++ b/llvm/include/llvm/ADT/EnumeratedArray.h @@ -5,9 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines an array type that can be indexed using scoped enum values. -// +/// +/// \file +/// This file defines an array type that can be indexed using scoped enum +/// values. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_ENUMERATEDARRAY_H diff --git a/llvm/include/llvm/ADT/EpochTracker.h b/llvm/include/llvm/ADT/EpochTracker.h --- a/llvm/include/llvm/ADT/EpochTracker.h +++ b/llvm/include/llvm/ADT/EpochTracker.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the DebugEpochBase and DebugEpochBase::HandleBase classes. -// These can be used to write iterators that are fail-fast when LLVM is built -// with asserts enabled. -// +/// +/// \file +/// This file defines the DebugEpochBase and DebugEpochBase::HandleBase classes. +/// These can be used to write iterators that are fail-fast when LLVM is built +/// with asserts enabled. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_EPOCHTRACKER_H diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h --- a/llvm/include/llvm/ADT/EquivalenceClasses.h +++ b/llvm/include/llvm/ADT/EquivalenceClasses.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// Generic implementation of equivalence classes through the use Tarjan's -// efficient union-find algorithm. -// +/// +/// \file +/// Generic implementation of equivalence classes through the use Tarjan's +/// efficient union-find algorithm. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_EQUIVALENCECLASSES_H diff --git a/llvm/include/llvm/ADT/FloatingPointMode.h b/llvm/include/llvm/ADT/FloatingPointMode.h --- a/llvm/include/llvm/ADT/FloatingPointMode.h +++ b/llvm/include/llvm/ADT/FloatingPointMode.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// Utilities for dealing with flags related to floating point mode controls. -// +/// +/// \file +/// Utilities for dealing with flags related to floating point mode controls. +/// //===----------------------------------------------------------------------===/ #ifndef LLVM_ADT_FLOATINGPOINTMODE_H diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h --- a/llvm/include/llvm/ADT/FoldingSet.h +++ b/llvm/include/llvm/ADT/FoldingSet.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines a hash set that can be used to remove duplication of nodes -// in a graph. This code was originally created by Chris Lattner for use with -// SelectionDAGCSEMap, but was isolated to provide use across the llvm code set. -// +/// +/// \file +/// This file defines a hash set that can be used to remove duplication of nodes +/// in a graph. This code was originally created by Chris Lattner for use with +/// SelectionDAGCSEMap, but was isolated to provide use across the llvm code set. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_FOLDINGSET_H diff --git a/llvm/include/llvm/ADT/GenericCycleImpl.h b/llvm/include/llvm/ADT/GenericCycleImpl.h --- a/llvm/include/llvm/ADT/GenericCycleImpl.h +++ b/llvm/include/llvm/ADT/GenericCycleImpl.h @@ -5,18 +5,18 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This template implementation resides in a separate file so that it -// does not get injected into every .cpp file that includes the -// generic header. -// -// DO NOT INCLUDE THIS FILE WHEN MERELY USING CYCLEINFO. -// -// This file should only be included by files that implement a -// specialization of the relevant templates. Currently these are: -// - CycleAnalysis.cpp -// - MachineCycleAnalysis.cpp -// +/// +/// This template implementation resides in a separate file so that it +/// does not get injected into every .cpp file that includes the +/// generic header. +/// +/// DO NOT INCLUDE THIS FILE WHEN MERELY USING CYCLEINFO. +/// +/// This file should only be included by files that implement a +/// specialization of the relevant templates. Currently these are: +/// - CycleAnalysis.cpp +/// - MachineCycleAnalysis.cpp +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_GENERICCYCLEIMPL_H diff --git a/llvm/include/llvm/ADT/GenericCycleInfo.h b/llvm/include/llvm/ADT/GenericCycleInfo.h --- a/llvm/include/llvm/ADT/GenericCycleInfo.h +++ b/llvm/include/llvm/ADT/GenericCycleInfo.h @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// +/// /// \file /// \brief Find all cycles in a control-flow graph, including irreducible loops. /// @@ -22,7 +22,7 @@ /// unique cycle C which is a superset of L. /// - In the absence of irreducible control flow, the cycles are /// exactly the natural loops in the program. -// +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_GENERICCYCLEINFO_H diff --git a/llvm/include/llvm/ADT/GraphTraits.h b/llvm/include/llvm/ADT/GraphTraits.h --- a/llvm/include/llvm/ADT/GraphTraits.h +++ b/llvm/include/llvm/ADT/GraphTraits.h @@ -5,13 +5,15 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the little GraphTraits template class that should be -// specialized by classes that want to be iteratable by generic graph iterators. -// -// This file also defines the marker class Inverse that is used to iterate over -// graphs in a graph defined, inverse ordering... -// +/// +/// \file +/// This file defines the little GraphTraits template class that should be +/// specialized by classes that want to be iteratable by generic graph +/// iterators. +/// +/// This file also defines the marker class Inverse that is used to iterate over +/// graphs in a graph defined, inverse ordering... +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_GRAPHTRAITS_H diff --git a/llvm/include/llvm/ADT/ImmutableList.h b/llvm/include/llvm/ADT/ImmutableList.h --- a/llvm/include/llvm/ADT/ImmutableList.h +++ b/llvm/include/llvm/ADT/ImmutableList.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the ImmutableList class. -// +/// +/// \file +/// This file defines the ImmutableList class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_IMMUTABLELIST_H diff --git a/llvm/include/llvm/ADT/ImmutableMap.h b/llvm/include/llvm/ADT/ImmutableMap.h --- a/llvm/include/llvm/ADT/ImmutableMap.h +++ b/llvm/include/llvm/ADT/ImmutableMap.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the ImmutableMap class. -// +/// +/// \file +/// This file defines the ImmutableMap class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_IMMUTABLEMAP_H diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ b/llvm/include/llvm/ADT/ImmutableSet.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the ImutAVLTree and ImmutableSet classes. -// +/// +/// \file +/// This file defines the ImutAVLTree and ImmutableSet classes. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_IMMUTABLESET_H diff --git a/llvm/include/llvm/ADT/IndexedMap.h b/llvm/include/llvm/ADT/IndexedMap.h --- a/llvm/include/llvm/ADT/IndexedMap.h +++ b/llvm/include/llvm/ADT/IndexedMap.h @@ -5,15 +5,16 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements an indexed map. The index map template takes two -// types. The first is the mapped type and the second is a functor -// that maps its argument to a size_t. On instantiation a "null" value -// can be provided to be used as a "does not exist" indicator in the -// map. A member function grow() is provided that given the value of -// the maximally indexed key (the argument of the functor) makes sure -// the map has enough space for it. -// +/// +/// \file +/// This file implements an indexed map. The index map template takes two +/// types. The first is the mapped type and the second is a functor +/// that maps its argument to a size_t. On instantiation a "null" value +/// can be provided to be used as a "does not exist" indicator in the +/// map. A member function grow() is provided that given the value of +/// the maximally indexed key (the argument of the functor) makes sure +/// the map has enough space for it. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_INDEXEDMAP_H diff --git a/llvm/include/llvm/ADT/IntEqClasses.h b/llvm/include/llvm/ADT/IntEqClasses.h --- a/llvm/include/llvm/ADT/IntEqClasses.h +++ b/llvm/include/llvm/ADT/IntEqClasses.h @@ -5,16 +5,17 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// Equivalence classes for small integers. This is a mapping of the integers -// 0 .. N-1 into M equivalence classes numbered 0 .. M-1. -// -// Initially each integer has its own equivalence class. Classes are joined by -// passing a representative member of each class to join(). -// -// Once the classes are built, compress() will number them 0 .. M-1 and prevent -// further changes. -// +/// +/// \file +/// Equivalence classes for small integers. This is a mapping of the integers +/// 0 .. N-1 into M equivalence classes numbered 0 .. M-1. +/// +/// Initially each integer has its own equivalence class. Classes are joined by +/// passing a representative member of each class to join(). +/// +/// Once the classes are built, compress() will number them 0 .. M-1 and prevent +/// further changes. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_INTEQCLASSES_H diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h --- a/llvm/include/llvm/ADT/IntervalMap.h +++ b/llvm/include/llvm/ADT/IntervalMap.h @@ -5,30 +5,31 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements a coalescing interval map for small objects. -// -// KeyT objects are mapped to ValT objects. Intervals of keys that map to the -// same value are represented in a compressed form. -// -// Iterators provide ordered access to the compressed intervals rather than the -// individual keys, and insert and erase operations use key intervals as well. -// -// Like SmallVector, IntervalMap will store the first N intervals in the map -// object itself without any allocations. When space is exhausted it switches to -// a B+-tree representation with very small overhead for small key and value -// objects. -// -// A Traits class specifies how keys are compared. It also allows IntervalMap to -// work with both closed and half-open intervals. -// -// Keys and values are not stored next to each other in a std::pair, so we don't -// provide such a value_type. Dereferencing iterators only returns the mapped -// value. The interval bounds are accessible through the start() and stop() -// iterator methods. -// -// IntervalMap is optimized for small key and value objects, 4 or 8 bytes each -// is the optimal size. For large objects use std::map instead. +/// +/// \file +/// This file implements a coalescing interval map for small objects. +/// +/// KeyT objects are mapped to ValT objects. Intervals of keys that map to the +/// same value are represented in a compressed form. +/// +/// Iterators provide ordered access to the compressed intervals rather than the +/// individual keys, and insert and erase operations use key intervals as well. +/// +/// Like SmallVector, IntervalMap will store the first N intervals in the map +/// object itself without any allocations. When space is exhausted it switches to +/// a B+-tree representation with very small overhead for small key and value +/// objects. +/// +/// A Traits class specifies how keys are compared. It also allows IntervalMap to +/// work with both closed and half-open intervals. +/// +/// Keys and values are not stored next to each other in a std::pair, so we don't +/// provide such a value_type. Dereferencing iterators only returns the mapped +/// value. The interval bounds are accessible through the start() and stop() +/// iterator methods. +/// +/// IntervalMap is optimized for small key and value objects, 4 or 8 bytes each +/// is the optimal size. For large objects use std::map instead. // //===----------------------------------------------------------------------===// // diff --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h --- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -5,51 +5,53 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the RefCountedBase, ThreadSafeRefCountedBase, and -// IntrusiveRefCntPtr classes. -// -// IntrusiveRefCntPtr is a smart pointer to an object which maintains a -// reference count. (ThreadSafe)RefCountedBase is a mixin class that adds a -// refcount member variable and methods for updating the refcount. An object -// that inherits from (ThreadSafe)RefCountedBase deletes itself when its -// refcount hits zero. -// -// For example: -// -// class MyClass : public RefCountedBase {}; -// -// void foo() { -// // Constructing an IntrusiveRefCntPtr increases the pointee's refcount by -// // 1 (from 0 in this case). -// IntrusiveRefCntPtr Ptr1(new MyClass()); -// -// // Copying an IntrusiveRefCntPtr increases the pointee's refcount by 1. -// IntrusiveRefCntPtr Ptr2(Ptr1); -// -// // Constructing an IntrusiveRefCntPtr has no effect on the object's -// // refcount. After a move, the moved-from pointer is null. -// IntrusiveRefCntPtr Ptr3(std::move(Ptr1)); -// assert(Ptr1 == nullptr); -// -// // Clearing an IntrusiveRefCntPtr decreases the pointee's refcount by 1. -// Ptr2.reset(); -// -// // The object deletes itself when we return from the function, because -// // Ptr3's destructor decrements its refcount to 0. -// } -// -// You can use IntrusiveRefCntPtr with isa(), dyn_cast(), etc.: -// -// IntrusiveRefCntPtr Ptr(new MyClass()); -// OtherClass *Other = dyn_cast(Ptr); // Ptr.get() not required -// -// IntrusiveRefCntPtr works with any class that -// -// - inherits from (ThreadSafe)RefCountedBase, -// - has Retain() and Release() methods, or -// - specializes IntrusiveRefCntPtrInfo. -// +/// +/// \file +/// This file defines the RefCountedBase, ThreadSafeRefCountedBase, and +/// IntrusiveRefCntPtr classes. +/// +/// IntrusiveRefCntPtr is a smart pointer to an object which maintains a +/// reference count. (ThreadSafe)RefCountedBase is a mixin class that adds a +/// refcount member variable and methods for updating the refcount. An object +/// that inherits from (ThreadSafe)RefCountedBase deletes itself when its +/// refcount hits zero. +/// +/// For example: +/// +/// class MyClass : public RefCountedBase {}; +/// +/// void foo() { +/// // Constructing an IntrusiveRefCntPtr increases the pointee's refcount +/// by +/// // 1 (from 0 in this case). +/// IntrusiveRefCntPtr Ptr1(new MyClass()); +/// +/// // Copying an IntrusiveRefCntPtr increases the pointee's refcount by 1. +/// IntrusiveRefCntPtr Ptr2(Ptr1); +/// +/// // Constructing an IntrusiveRefCntPtr has no effect on the object's +/// // refcount. After a move, the moved-from pointer is null. +/// IntrusiveRefCntPtr Ptr3(std::move(Ptr1)); +/// assert(Ptr1 == nullptr); +/// +/// // Clearing an IntrusiveRefCntPtr decreases the pointee's refcount by 1. +/// Ptr2.reset(); +/// +/// // The object deletes itself when we return from the function, because +/// // Ptr3's destructor decrements its refcount to 0. +/// } +/// +/// You can use IntrusiveRefCntPtr with isa(), dyn_cast(), etc.: +/// +/// IntrusiveRefCntPtr Ptr(new MyClass()); +/// OtherClass *Other = dyn_cast(Ptr); // Ptr.get() not required +/// +/// IntrusiveRefCntPtr works with any class that +/// +/// - inherits from (ThreadSafe)RefCountedBase, +/// - has Retain() and Release() methods, or +/// - specializes IntrusiveRefCntPtrInfo. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_INTRUSIVEREFCNTPTR_H diff --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h --- a/llvm/include/llvm/ADT/MapVector.h +++ b/llvm/include/llvm/ADT/MapVector.h @@ -5,12 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements a map that provides insertion order iteration. The -// interface is purposefully minimal. The key is assumed to be cheap to copy -// and 2 copies are kept, one for indexing in a DenseMap, one for iteration in -// a std::vector. -// +/// +/// \file +/// This file implements a map that provides insertion order iteration. The +/// interface is purposefully minimal. The key is assumed to be cheap to copy +/// and 2 copies are kept, one for indexing in a DenseMap, one for iteration in +/// a std::vector. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_MAPVECTOR_H diff --git a/llvm/include/llvm/ADT/None.h b/llvm/include/llvm/ADT/None.h --- a/llvm/include/llvm/ADT/None.h +++ b/llvm/include/llvm/ADT/None.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file provides None, an enumerator for use in implicit constructors -// of various (usually templated) types to make such construction more -// terse. -// +/// +/// \file +/// This file provides None, an enumerator for use in implicit constructors +/// of various (usually templated) types to make such construction more +/// terse. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_NONE_H diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h --- a/llvm/include/llvm/ADT/Optional.h +++ b/llvm/include/llvm/ADT/Optional.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file provides Optional, a template class modeled in the spirit of -// OCaml's 'opt' variant. The idea is to strongly type whether or not -// a value can be optional. -// +/// +/// \file +/// This file provides Optional, a template class modeled in the spirit of +/// OCaml's 'opt' variant. The idea is to strongly type whether or not +/// a value can be optional. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_OPTIONAL_H diff --git a/llvm/include/llvm/ADT/PackedVector.h b/llvm/include/llvm/ADT/PackedVector.h --- a/llvm/include/llvm/ADT/PackedVector.h +++ b/llvm/include/llvm/ADT/PackedVector.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the PackedVector class. -// +/// +/// \file +/// This file implements the PackedVector class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_PACKEDVECTOR_H diff --git a/llvm/include/llvm/ADT/PointerIntPair.h b/llvm/include/llvm/ADT/PointerIntPair.h --- a/llvm/include/llvm/ADT/PointerIntPair.h +++ b/llvm/include/llvm/ADT/PointerIntPair.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the PointerIntPair class. -// +/// +/// \file +/// This file defines the PointerIntPair class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_POINTERINTPAIR_H diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h --- a/llvm/include/llvm/ADT/PointerUnion.h +++ b/llvm/include/llvm/ADT/PointerUnion.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the PointerUnion class, which is a discriminated union of -// pointer types. -// +/// +/// \file +/// This file defines the PointerUnion class, which is a discriminated union of +/// pointer types. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_POINTERUNION_H diff --git a/llvm/include/llvm/ADT/PostOrderIterator.h b/llvm/include/llvm/ADT/PostOrderIterator.h --- a/llvm/include/llvm/ADT/PostOrderIterator.h +++ b/llvm/include/llvm/ADT/PostOrderIterator.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file builds on the ADT/GraphTraits.h file to build a generic graph -// post order iterator. This should work over any graph type that has a -// GraphTraits specialization. -// +/// +/// \file +/// This file builds on the ADT/GraphTraits.h file to build a generic graph +/// post order iterator. This should work over any graph type that has a +/// GraphTraits specialization. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_POSTORDERITERATOR_H diff --git a/llvm/include/llvm/ADT/PriorityQueue.h b/llvm/include/llvm/ADT/PriorityQueue.h --- a/llvm/include/llvm/ADT/PriorityQueue.h +++ b/llvm/include/llvm/ADT/PriorityQueue.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the PriorityQueue class. -// +/// +/// \file +/// This file defines the PriorityQueue class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_PRIORITYQUEUE_H diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -5,12 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file contains some templates that are useful if you are working with the -// STL at all. -// -// No library is required when using these functions. -// +/// +/// \file +/// This file contains some templates that are useful if you are working with the +/// STL at all. +/// +/// No library is required when using these functions. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STLEXTRAS_H diff --git a/llvm/include/llvm/ADT/STLForwardCompat.h b/llvm/include/llvm/ADT/STLForwardCompat.h --- a/llvm/include/llvm/ADT/STLForwardCompat.h +++ b/llvm/include/llvm/ADT/STLForwardCompat.h @@ -5,12 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file contains library features backported from future STL versions. -// -// These should be replaced with their STL counterparts as the C++ version LLVM -// is compiled with is updated. -// +/// +/// \file +/// This file contains library features backported from future STL versions. +/// +/// These should be replaced with their STL counterparts as the C++ version LLVM +/// is compiled with is updated. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STLFORWARDCOMPAT_H diff --git a/llvm/include/llvm/ADT/ScopeExit.h b/llvm/include/llvm/ADT/ScopeExit.h --- a/llvm/include/llvm/ADT/ScopeExit.h +++ b/llvm/include/llvm/ADT/ScopeExit.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the make_scope_exit function, which executes user-defined -// cleanup logic at scope exit. -// +/// +/// \file +/// This file defines the make_scope_exit function, which executes user-defined +/// cleanup logic at scope exit. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SCOPEEXIT_H diff --git a/llvm/include/llvm/ADT/SetOperations.h b/llvm/include/llvm/ADT/SetOperations.h --- a/llvm/include/llvm/ADT/SetOperations.h +++ b/llvm/include/llvm/ADT/SetOperations.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines generic set operations that may be used on set's of -// different types, and different element types. -// +/// +/// \file +/// This file defines generic set operations that may be used on set's of +/// different types, and different element types. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SETOPERATIONS_H diff --git a/llvm/include/llvm/ADT/SetVector.h b/llvm/include/llvm/ADT/SetVector.h --- a/llvm/include/llvm/ADT/SetVector.h +++ b/llvm/include/llvm/ADT/SetVector.h @@ -5,15 +5,16 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements a set that has insertion order iteration -// characteristics. This is useful for keeping a set of things that need to be -// visited later but in a deterministic order (insertion order). The interface -// is purposefully minimal. -// -// This file defines SetVector and SmallSetVector, which performs no allocations -// if the SetVector has less than a certain number of elements. -// +/// +/// \file +/// This file implements a set that has insertion order iteration +/// characteristics. This is useful for keeping a set of things that need to be +/// visited later but in a deterministic order (insertion order). The interface +/// is purposefully minimal. +/// +/// This file defines SetVector and SmallSetVector, which performs no +/// allocations if the SetVector has less than a certain number of elements. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SETVECTOR_H diff --git a/llvm/include/llvm/ADT/SmallBitVector.h b/llvm/include/llvm/ADT/SmallBitVector.h --- a/llvm/include/llvm/ADT/SmallBitVector.h +++ b/llvm/include/llvm/ADT/SmallBitVector.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the SmallBitVector class. -// +/// +/// \file +/// This file implements the SmallBitVector class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SMALLBITVECTOR_H diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h --- a/llvm/include/llvm/ADT/SmallPtrSet.h +++ b/llvm/include/llvm/ADT/SmallPtrSet.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SmallPtrSet class. See the doxygen comment for -// SmallPtrSetImplBase for more details on the algorithm used. +/// +/// \file +/// This file defines the SmallPtrSet class. See the doxygen comment for +/// SmallPtrSetImplBase for more details on the algorithm used. // //===----------------------------------------------------------------------===// diff --git a/llvm/include/llvm/ADT/SmallSet.h b/llvm/include/llvm/ADT/SmallSet.h --- a/llvm/include/llvm/ADT/SmallSet.h +++ b/llvm/include/llvm/ADT/SmallSet.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SmallSet class. -// +/// +/// \file +/// This file defines the SmallSet class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SMALLSET_H diff --git a/llvm/include/llvm/ADT/SmallString.h b/llvm/include/llvm/ADT/SmallString.h --- a/llvm/include/llvm/ADT/SmallString.h +++ b/llvm/include/llvm/ADT/SmallString.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SmallString class. -// +/// +/// \file +/// This file defines the SmallString class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SMALLSTRING_H diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/include/llvm/ADT/SmallVector.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SmallVector class. -// +/// +/// /file +/// This file defines the SmallVector class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SMALLVECTOR_H diff --git a/llvm/include/llvm/ADT/SparseBitVector.h b/llvm/include/llvm/ADT/SparseBitVector.h --- a/llvm/include/llvm/ADT/SparseBitVector.h +++ b/llvm/include/llvm/ADT/SparseBitVector.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SparseBitVector class. See the doxygen comment for -// SparseBitVector for more details on the algorithm used. -// +/// +/// \file +/// This file defines the SparseBitVector class. See the doxygen comment for +/// SparseBitVector for more details on the algorithm used. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SPARSEBITVECTOR_H diff --git a/llvm/include/llvm/ADT/SparseMultiSet.h b/llvm/include/llvm/ADT/SparseMultiSet.h --- a/llvm/include/llvm/ADT/SparseMultiSet.h +++ b/llvm/include/llvm/ADT/SparseMultiSet.h @@ -5,16 +5,16 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SparseMultiSet class, which adds multiset behavior to -// the SparseSet. -// -// A sparse multiset holds a small number of objects identified by integer keys -// from a moderately sized universe. The sparse multiset uses more memory than -// other containers in order to provide faster operations. Any key can map to -// multiple values. A SparseMultiSetNode class is provided, which serves as a -// convenient base class for the contents of a SparseMultiSet. -// +/// +/// This file defines the SparseMultiSet class, which adds multiset behavior to +/// the SparseSet. +/// +/// A sparse multiset holds a small number of objects identified by integer keys +/// from a moderately sized universe. The sparse multiset uses more memory than +/// other containers in order to provide faster operations. Any key can map to +/// multiple values. A SparseMultiSetNode class is provided, which serves as a +/// convenient base class for the contents of a SparseMultiSet. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SPARSEMULTISET_H diff --git a/llvm/include/llvm/ADT/SparseSet.h b/llvm/include/llvm/ADT/SparseSet.h --- a/llvm/include/llvm/ADT/SparseSet.h +++ b/llvm/include/llvm/ADT/SparseSet.h @@ -5,15 +5,16 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the SparseSet class derived from the version described in -// Briggs, Torczon, "An efficient representation for sparse sets", ACM Letters -// on Programming Languages and Systems, Volume 2 Issue 1-4, March-Dec. 1993. -// -// A sparse set holds a small number of objects identified by integer keys from -// a moderately sized universe. The sparse set uses more memory than other -// containers in order to provide faster operations. -// +/// +/// \file +/// This file defines the SparseSet class derived from the version described in +/// Briggs, Torczon, "An efficient representation for sparse sets", ACM Letters +/// on Programming Languages and Systems, Volume 2 Issue 1-4, March-Dec. 1993. +/// +/// A sparse set holds a small number of objects identified by integer keys from +/// a moderately sized universe. The sparse set uses more memory than other +/// containers in order to provide faster operations. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SPARSESET_H diff --git a/llvm/include/llvm/ADT/Statistic.h b/llvm/include/llvm/ADT/Statistic.h --- a/llvm/include/llvm/ADT/Statistic.h +++ b/llvm/include/llvm/ADT/Statistic.h @@ -5,21 +5,22 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the 'Statistic' class, which is designed to be an easy way -// to expose various metrics from passes. These statistics are printed at the -// end of a run (from llvm_shutdown), when the -stats command line option is -// passed on the command line. -// -// This is useful for reporting information like the number of instructions -// simplified, optimized or removed by various transformations, like this: -// -// static Statistic NumInstsKilled("gcse", "Number of instructions killed"); -// -// Later, in the code: ++NumInstsKilled; -// -// NOTE: Statistics *must* be declared as global variables. -// +/// +/// \file +/// This file defines the 'Statistic' class, which is designed to be an easy way +/// to expose various metrics from passes. These statistics are printed at the +/// end of a run (from llvm_shutdown), when the -stats command line option is +/// passed on the command line. +/// +/// This is useful for reporting information like the number of instructions +/// simplified, optimized or removed by various transformations, like this: +/// +/// static Statistic NumInstsKilled("gcse", "Number of instructions killed"); +/// +/// Later, in the code: ++NumInstsKilled; +/// +/// NOTE: Statistics *must* be declared as global variables. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STATISTIC_H diff --git a/llvm/include/llvm/ADT/StringExtras.h b/llvm/include/llvm/ADT/StringExtras.h --- a/llvm/include/llvm/ADT/StringExtras.h +++ b/llvm/include/llvm/ADT/StringExtras.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file contains some functions that are useful when dealing with strings. -// +/// +/// \file +/// This file contains some functions that are useful when dealing with strings. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGEXTRAS_H diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h --- a/llvm/include/llvm/ADT/StringMap.h +++ b/llvm/include/llvm/ADT/StringMap.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the StringMap class. -// +/// +/// \file +/// This file defines the StringMap class. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGMAP_H diff --git a/llvm/include/llvm/ADT/StringMapEntry.h b/llvm/include/llvm/ADT/StringMapEntry.h --- a/llvm/include/llvm/ADT/StringMapEntry.h +++ b/llvm/include/llvm/ADT/StringMapEntry.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the StringMapEntry class - it is intended to be a low -// dependency implementation detail of StringMap that is more suitable for -// inclusion in public headers than StringMap.h itself is. -// +/// +/// \file +/// This file defines the StringMapEntry class - it is intended to be a low +/// dependency implementation detail of StringMap that is more suitable for +/// inclusion in public headers than StringMap.h itself is. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGMAPENTRY_H diff --git a/llvm/include/llvm/ADT/StringSet.h b/llvm/include/llvm/ADT/StringSet.h --- a/llvm/include/llvm/ADT/StringSet.h +++ b/llvm/include/llvm/ADT/StringSet.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// StringSet - A set-like wrapper for the StringMap. -// +/// +/// \file +/// StringSet - A set-like wrapper for the StringMap. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGSET_H diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h --- a/llvm/include/llvm/ADT/StringSwitch.h +++ b/llvm/include/llvm/ADT/StringSwitch.h @@ -4,10 +4,11 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception //===----------------------------------------------------------------------===/ -// -// This file implements the StringSwitch template, which mimics a switch() -// statement whose cases are string literals. -// +/// +/// \file +/// This file implements the StringSwitch template, which mimics a switch() +/// statement whose cases are string literals. +/// //===----------------------------------------------------------------------===/ #ifndef LLVM_ADT_STRINGSWITCH_H #define LLVM_ADT_STRINGSWITCH_H diff --git a/llvm/include/llvm/ADT/TypeSwitch.h b/llvm/include/llvm/ADT/TypeSwitch.h --- a/llvm/include/llvm/ADT/TypeSwitch.h +++ b/llvm/include/llvm/ADT/TypeSwitch.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the TypeSwitch template, which mimics a switch() -// statement whose cases are type names. -// +/// +/// \file +/// This file implements the TypeSwitch template, which mimics a switch() +/// statement whose cases are type names. +/// //===-----------------------------------------------------------------------===/ #ifndef LLVM_ADT_TYPESWITCH_H diff --git a/llvm/include/llvm/ADT/Waymarking.h b/llvm/include/llvm/ADT/Waymarking.h --- a/llvm/include/llvm/ADT/Waymarking.h +++ b/llvm/include/llvm/ADT/Waymarking.h @@ -5,105 +5,106 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// Utility to backtrace an array's head, from a pointer into it. For the -// backtrace to work, we use "Waymarks", which are special tags embedded into -// the array's elements. -// -// A Tag of n-bits (in size) is composed as follows: -// -// bits: | n-1 | n-2 ... 0 | -// .---------.------------------------------------. -// |Stop Mask|(2^(n-1))-ary numeric system - digit| -// '---------'------------------------------------' -// -// Backtracing is done as follows: -// Walk back (starting from a given pointer to an element into the array), until -// a tag with a "Stop Mask" is reached. Then start calculating the "Offset" from -// the array's head, by picking up digits along the way, until another stop is -// reached. The "Offset" is then subtracted from the current pointer, and the -// result is the array's head. -// A special case - if we first encounter a Tag with a Stop and a zero digit, -// then this is already the head. -// -// For example: -// In case of 2 bits: -// -// Tags: -// x0 - binary digit 0 -// x1 - binary digit 1 -// 1x - stop and calculate (s) -// -// Array: -// .---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---. -// head -> |s0 |s1 | 0 |s1 | 0 | 0 |s1 | 1 | 1 |s1 | 0 | 1 | 0 |s1 | 0 | 1 | -// '---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---' -// |-1 |-2 |-4 |-7 |-10 |-14 -// <_ | | | | | | -// <_____ | | | | | -// <_____________ | | | | -// <_________________________ | | | -// <_____________________________________ | | -// <_____________________________________________________ | -// -// -// In case of 3 bits: -// -// Tags: -// x00 - quaternary digit 0 -// x01 - quaternary digit 1 -// x10 - quaternary digit 2 -// x11 - quaternary digit 3 -// 1xy - stop and calculate (s) -// -// Array: -// .---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---. -// head -> |s0 |s1 |s2 |s3 | 0 |s1 | 2 |s1 | 0 |s2 | 2 |s2 | 0 |s3 | 2 |s3 | -// '---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---' -// |-1 |-2 |-3 |-4 |-6 |-8 |-10 |-12 |-14 |-16 -// <_ | | | | | | | | | | -// <_____ | | | | | | | | | -// <_________ | | | | | | | | -// <_____________ | | | | | | | -// <_____________________ | | | | | | -// <_____________________________ | | | | | -// <_____________________________________ | | | | -// <_____________________________________________ | | | -// <_____________________________________________________ | | -// <_____________________________________________________________ | -// -// -// The API introduce 2 functions: -// 1. fillWaymarks -// 2. followWaymarks -// -// Example: -// int N = 10; -// int M = 5; -// int **A = new int *[N + M]; // Define the array. -// for (int I = 0; I < N + M; ++I) -// A[I] = new int(I); -// -// fillWaymarks(A, A + N); // Set the waymarks for the first N elements -// // of the array. -// // Note that it must be done AFTER we fill -// // the array's elements. -// -// ... // Elements which are not in the range -// // [A, A+N) will not be marked, and we won't -// // be able to call followWaymarks on them. -// -// ... // Elements which will be changed after the -// // call to fillWaymarks, will have to be -// // retagged. -// -// fillWaymarks(A + N, A + N + M, N); // Set the waymarks of the remaining M -// // elements. -// ... -// int **It = A + N + 1; -// int **B = followWaymarks(It); // Find the head of the array containing It. -// assert(B == A); -// +/// +/// \file +/// Utility to backtrace an array's head, from a pointer into it. For the +/// backtrace to work, we use "Waymarks", which are special tags embedded into +/// the array's elements. +/// +/// A Tag of n-bits (in size) is composed as follows: +/// +/// bits: | n-1 | n-2 ... 0 | +/// .---------.------------------------------------. +/// |Stop Mask|(2^(n-1))-ary numeric system - digit| +/// '---------'------------------------------------' +/// +/// Backtracing is done as follows: +/// Walk back (starting from a given pointer to an element into the array), until +/// a tag with a "Stop Mask" is reached. Then start calculating the "Offset" from +/// the array's head, by picking up digits along the way, until another stop is +/// reached. The "Offset" is then subtracted from the current pointer, and the +/// result is the array's head. +/// A special case - if we first encounter a Tag with a Stop and a zero digit, +/// then this is already the head. +/// +/// For example: +/// In case of 2 bits: +/// +/// Tags: +/// x0 - binary digit 0 +/// x1 - binary digit 1 +/// 1x - stop and calculate (s) +/// +/// Array: +/// .---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---. +/// head -> |s0 |s1 | 0 |s1 | 0 | 0 |s1 | 1 | 1 |s1 | 0 | 1 | 0 |s1 | 0 | 1 | +/// '---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---' +/// |-1 |-2 |-4 |-7 |-10 |-14 +/// <_ | | | | | | +/// <_____ | | | | | +/// <_____________ | | | | +/// <_________________________ | | | +/// <_____________________________________ | | +/// <_____________________________________________________ | +/// +/// +/// In case of 3 bits: +/// +/// Tags: +/// x00 - quaternary digit 0 +/// x01 - quaternary digit 1 +/// x10 - quaternary digit 2 +/// x11 - quaternary digit 3 +/// 1xy - stop and calculate (s) +/// +/// Array: +/// .---.---.---.---.---.---.---.---.---.---.---.---.---.---.---.---. +/// head -> |s0 |s1 |s2 |s3 | 0 |s1 | 2 |s1 | 0 |s2 | 2 |s2 | 0 |s3 | 2 |s3 | +/// '---'---'---'---'---'---'---'---'---'---'---'---'---'---'---'---' +/// |-1 |-2 |-3 |-4 |-6 |-8 |-10 |-12 |-14 |-16 +/// <_ | | | | | | | | | | +/// <_____ | | | | | | | | | +/// <_________ | | | | | | | | +/// <_____________ | | | | | | | +/// <_____________________ | | | | | | +/// <_____________________________ | | | | | +/// <_____________________________________ | | | | +/// <_____________________________________________ | | | +/// <_____________________________________________________ | | +/// <_____________________________________________________________ | +/// +/// +/// The API introduce 2 functions: +/// 1. fillWaymarks +/// 2. followWaymarks +/// +/// Example: +/// int N = 10; +/// int M = 5; +/// int **A = new int *[N + M]; // Define the array. +/// for (int I = 0; I < N + M; ++I) +/// A[I] = new int(I); +/// +/// fillWaymarks(A, A + N); // Set the waymarks for the first N elements +/// // of the array. +/// // Note that it must be done AFTER we fill +/// // the array's elements. +/// +/// ... // Elements which are not in the range +/// // [A, A+N) will not be marked, and we won't +/// // be able to call followWaymarks on them. +/// +/// ... // Elements which will be changed after the +/// // call to fillWaymarks, will have to be +/// // retagged. +/// +/// fillWaymarks(A + N, A + N + M, N); // Set the waymarks of the remaining M +/// // elements. +/// ... +/// int **It = A + N + 1; +/// int **B = followWaymarks(It); // Find the head of the array containing It. +/// assert(B == A); +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_WAYMARKING_H diff --git a/llvm/include/llvm/ADT/bit.h b/llvm/include/llvm/ADT/bit.h --- a/llvm/include/llvm/ADT/bit.h +++ b/llvm/include/llvm/ADT/bit.h @@ -5,9 +5,10 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file implements the C++20 header. -// +/// +/// \file +/// This file implements the C++20 header. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_BIT_H diff --git a/llvm/include/llvm/ADT/edit_distance.h b/llvm/include/llvm/ADT/edit_distance.h --- a/llvm/include/llvm/ADT/edit_distance.h +++ b/llvm/include/llvm/ADT/edit_distance.h @@ -5,11 +5,12 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines a Levenshtein distance function that works for any two -// sequences, with each element of each sequence being analogous to a character -// in a string. -// +/// +/// \file +/// This file defines a Levenshtein distance function that works for any two +/// sequences, with each element of each sequence being analogous to a character +/// in a string. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_EDIT_DISTANCE_H diff --git a/llvm/include/llvm/ADT/ilist.h b/llvm/include/llvm/ADT/ilist.h --- a/llvm/include/llvm/ADT/ilist.h +++ b/llvm/include/llvm/ADT/ilist.h @@ -5,19 +5,20 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines classes to implement an intrusive doubly linked list class -// (i.e. each node of the list must contain a next and previous field for the -// list. -// -// The ilist class itself should be a plug in replacement for list. This list -// replacement does not provide a constant time size() method, so be careful to -// use empty() when you really want to know if it's empty. -// -// The ilist class is implemented as a circular list. The list itself contains -// a sentinel node, whose Next points at begin() and whose Prev points at -// rbegin(). The sentinel node itself serves as end() and rend(). -// +/// +/// \file +/// This file defines classes to implement an intrusive doubly linked list class +/// (i.e. each node of the list must contain a next and previous field for the +/// list. +/// +/// The ilist class itself should be a plug in replacement for list. This list +/// replacement does not provide a constant time size() method, so be careful to +/// use empty() when you really want to know if it's empty. +/// +/// The ilist class is implemented as a circular list. The list itself contains +/// a sentinel node, whose Next points at begin() and whose Prev points at +/// rbegin(). The sentinel node itself serves as end() and rend(). +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_ILIST_H diff --git a/llvm/include/llvm/ADT/ilist_node.h b/llvm/include/llvm/ADT/ilist_node.h --- a/llvm/include/llvm/ADT/ilist_node.h +++ b/llvm/include/llvm/ADT/ilist_node.h @@ -5,10 +5,11 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file defines the ilist_node class template, which is a convenient -// base class for creating classes that can be used with ilists. -// +/// +/// \file +/// This file defines the ilist_node class template, which is a convenient +/// base class for creating classes that can be used with ilists. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_ILIST_NODE_H