mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-20 19:18:20 +00:00
Update comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,6 +34,8 @@ namespace llvm {
|
|||||||
/// you'll need to specialize it. For example, say you want to call a
|
/// you'll need to specialize it. For example, say you want to call a
|
||||||
/// function defined externally as:
|
/// function defined externally as:
|
||||||
///
|
///
|
||||||
|
/// \code{.cpp}
|
||||||
|
///
|
||||||
/// struct MyType {
|
/// struct MyType {
|
||||||
/// int32 a;
|
/// int32 a;
|
||||||
/// int32 *b;
|
/// int32 *b;
|
||||||
@@ -41,12 +43,16 @@ namespace llvm {
|
|||||||
/// };
|
/// };
|
||||||
/// int8 AFunction(struct MyType *value);
|
/// int8 AFunction(struct MyType *value);
|
||||||
///
|
///
|
||||||
|
/// \endcode
|
||||||
|
///
|
||||||
/// You'll want to use
|
/// You'll want to use
|
||||||
/// Function::Create(TypeBuilder<types::i<8>(MyType*), true>::get(), ...)
|
/// Function::Create(TypeBuilder<types::i<8>(MyType*), true>::get(), ...)
|
||||||
/// to declare the function, but when you first try this, your compiler will
|
/// to declare the function, but when you first try this, your compiler will
|
||||||
/// complain that TypeBuilder<MyType, true>::get() doesn't exist. To fix this,
|
/// complain that TypeBuilder<MyType, true>::get() doesn't exist. To fix this,
|
||||||
/// write:
|
/// write:
|
||||||
///
|
///
|
||||||
|
/// \code{.cpp}
|
||||||
|
///
|
||||||
/// namespace llvm {
|
/// namespace llvm {
|
||||||
/// template<bool xcompile> class TypeBuilder<MyType, xcompile> {
|
/// template<bool xcompile> class TypeBuilder<MyType, xcompile> {
|
||||||
/// public:
|
/// public:
|
||||||
@@ -57,7 +63,7 @@ namespace llvm {
|
|||||||
/// TypeBuilder<types::i<32>, xcompile>::get(Context),
|
/// TypeBuilder<types::i<32>, xcompile>::get(Context),
|
||||||
/// TypeBuilder<types::i<32>*, xcompile>::get(Context),
|
/// TypeBuilder<types::i<32>*, xcompile>::get(Context),
|
||||||
/// TypeBuilder<types::i<8>*[], xcompile>::get(Context),
|
/// TypeBuilder<types::i<8>*[], xcompile>::get(Context),
|
||||||
/// NULL);
|
/// nullptr);
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// // You may find this a convenient place to put some constants
|
/// // You may find this a convenient place to put some constants
|
||||||
@@ -71,6 +77,8 @@ namespace llvm {
|
|||||||
/// }
|
/// }
|
||||||
/// } // namespace llvm
|
/// } // namespace llvm
|
||||||
///
|
///
|
||||||
|
/// \endcode
|
||||||
|
///
|
||||||
/// TypeBuilder cannot handle recursive types or types you only know at runtime.
|
/// TypeBuilder cannot handle recursive types or types you only know at runtime.
|
||||||
/// If you try to give it a recursive type, it will deadlock, infinitely
|
/// If you try to give it a recursive type, it will deadlock, infinitely
|
||||||
/// recurse, or do something similarly undesirable.
|
/// recurse, or do something similarly undesirable.
|
||||||
|
|||||||
Reference in New Issue
Block a user