summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-04-21 21:15:35 +0000
committerLang Hames <lhames@gmail.com>2015-04-21 21:15:35 +0000
commitbd4f417d4da6da9d2dcfa83bc386918fd5d1fbcd (patch)
tree058d0b129b14e6b79f03d11260a490aa81ffc949 /llvm
parentb4e7a4a40cb582a4e572fa86f0680e1f155c85a4 (diff)
downloadbcm5719-llvm-bd4f417d4da6da9d2dcfa83bc386918fd5d1fbcd.tar.gz
bcm5719-llvm-bd4f417d4da6da9d2dcfa83bc386918fd5d1fbcd.zip
Update comment. NFC.
llvm-svn: 235417
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/IR/TypeBuilder.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/include/llvm/IR/TypeBuilder.h b/llvm/include/llvm/IR/TypeBuilder.h
index 5a29e1e1085..d2c6f00079d 100644
--- a/llvm/include/llvm/IR/TypeBuilder.h
+++ b/llvm/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<types::i<8>(MyType*), true>::get(), ...)
/// 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,
/// write:
///
+/// \code{.cpp}
+///
/// namespace llvm {
/// template<bool xcompile> class TypeBuilder<MyType, xcompile> {
/// public:
@@ -57,7 +63,7 @@ namespace llvm {
/// TypeBuilder<types::i<32>, xcompile>::get(Context),
/// TypeBuilder<types::i<32>*, xcompile>::get(Context),
/// TypeBuilder<types::i<8>*[], 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.
OpenPOWER on IntegriCloud