diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index e2525ae84e0..253e8363610 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -117,6 +117,7 @@ with another Value
+
+
In generating IR, you may need some complex types. If you know these types
+statically, you can use TypeBuilder<...>::get(), defined
+in llvm/Support/TypeBuilder.h, to retrieve them. TypeBuilder
+has two forms depending on whether you're building types for cross-compilation
+or native library use. TypeBuilder<T, true> requires
+that T be independent of the host environment, meaning that it's built
+out of types from
+the llvm::types
+namespace and pointers, functions, arrays, etc. built of
+those. TypeBuilder<T, false> additionally allows native C types
+whose size may depend on the host compiler. For example,
+
+
+
+FunctionType *ft = TypeBuilder<types::i<8>(types::i<32>*), true>::get();
+
+
+
+
is easier to read and write than the equivalent
+
+
+
+std::vector params;
+params.push_back(PointerType::getUnqual(Type::Int32Ty));
+FunctionType *ft = FunctionType::get(Type::Int8Ty, params, false);
+
+
+
+
See the class
+comment for more details.
+
+
+
Advanced Topics
diff --git a/include/llvm/Support/TypeBuilder.h b/include/llvm/Support/TypeBuilder.h
index df8bc5ea4ba..c8ffb938c60 100644
--- a/include/llvm/Support/TypeBuilder.h
+++ b/include/llvm/Support/TypeBuilder.h
@@ -40,21 +40,21 @@ namespace llvm {
/// int8 AFunction(struct MyType *value);
///
/// You'll want to use
-/// Function::Create(TypeBuilder
(MyType*)>::get(), ...)
+/// 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:
+/// complain that TypeBuilder::get() doesn't exist. To fix this,
+/// write:
///
/// namespace llvm {
-/// using types::i;
/// template class TypeBuilder {
/// public:
/// static const StructType *get() {
/// // Using the static result variable ensures that the type is
/// // only looked up once.
/// static const StructType *const result = StructType::get(
-/// TypeBuilder, xcompile>::get(),
-/// TypeBuilder*, xcompile>::get(),
-/// TypeBuilder*[], xcompile>::get(),
+/// TypeBuilder, xcompile>::get(),
+/// TypeBuilder*, xcompile>::get(),
+/// TypeBuilder*[], xcompile>::get(),
/// NULL);
/// return result;
/// }