From f3aa9e0fdd86adbb477654e47d40a9ab0563d5bb Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 21 Apr 2015 21:15:35 +0000 Subject: [PATCH] Update comment. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235417 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/TypeBuilder.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/llvm/IR/TypeBuilder.h b/include/llvm/IR/TypeBuilder.h index 5a29e1e1085..d2c6f00079d 100644 --- a/include/llvm/IR/TypeBuilder.h +++ b/include/llvm/IR/TypeBuilder.h @@ -34,6 +34,8 @@ namespace llvm { /// you'll need to specialize it. For example, say you want to call a /// function defined externally as: /// +/// \code{.cpp} +/// /// struct MyType { /// int32 a; /// int32 *b; @@ -41,12 +43,16 @@ namespace llvm { /// }; /// int8 AFunction(struct MyType *value); /// +/// \endcode +/// /// You'll want to use /// Function::Create(TypeBuilder(MyType*), true>::get(), ...) /// to declare the function, but when you first try this, your compiler will /// complain that TypeBuilder::get() doesn't exist. To fix this, /// write: /// +/// \code{.cpp} +/// /// namespace llvm { /// template class TypeBuilder { /// public: @@ -57,7 +63,7 @@ namespace llvm { /// TypeBuilder, xcompile>::get(Context), /// TypeBuilder*, xcompile>::get(Context), /// TypeBuilder*[], xcompile>::get(Context), -/// NULL); +/// nullptr); /// } /// /// // You may find this a convenient place to put some constants @@ -71,6 +77,8 @@ namespace llvm { /// } /// } // namespace llvm /// +/// \endcode +/// /// 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 /// recurse, or do something similarly undesirable. -- 2.11.0