[llvm-commits] [llvm] r51712 - /llvm/trunk/include/llvm/OperandTraits.h
Gabor Greif
ggreif at gmail.com
Thu May 29 15:58:33 PDT 2008
Author: ggreif
Date: Thu May 29 17:58:33 2008
New Revision: 51712
URL: http://llvm.org/viewvc/llvm-project?rev=51712&view=rev
Log:
add doxygen comments
Modified:
llvm/trunk/include/llvm/OperandTraits.h
Modified: llvm/trunk/include/llvm/OperandTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/OperandTraits.h?rev=51712&r1=51711&r2=51712&view=diff
==============================================================================
--- llvm/trunk/include/llvm/OperandTraits.h (original)
+++ llvm/trunk/include/llvm/OperandTraits.h Thu May 29 17:58:33 2008
@@ -23,6 +23,10 @@
// FixedNumOperands Trait Class
//===----------------------------------------------------------------------===//
+/// FixedNumOperandTraits - determine the allocation regime of the Use array
+/// when it is a prefix to the User object, and the number of Use objects is
+/// known at compile time.
+
template <unsigned ARITY>
struct FixedNumOperandTraits {
static Use *op_begin(User* U) {
@@ -62,6 +66,10 @@
// VariadicOperand Trait Class
//===----------------------------------------------------------------------===//
+/// VariadicOperandTraits - determine the allocation regime of the Use array
+/// when it is a prefix to the User object, and the number of Use objects is
+/// only known at allocation time.
+
template <unsigned MINARITY = 0>
struct VariadicOperandTraits {
static Use *op_begin(User* U) {
@@ -80,6 +88,16 @@
// HungoffOperand Trait Class
//===----------------------------------------------------------------------===//
+/// HungoffOperandTraits - determine the allocation regime of the Use array
+/// when it is not a prefix to the User object, but allocated at an unrelated
+/// heap address.
+/// Assumes that the User subclass that is determined by this traits class
+/// has an OperandList member of type User::op_iterator. [Note: this is now
+/// trivially satisfied, because User has that member for historic reasons.]
+///
+/// This is the traits class that is needed when the Use array must be
+/// resizable.
+
template <unsigned MINARITY = 1>
struct HungoffOperandTraits {
static Use *op_begin(User* U) {
More information about the llvm-commits
mailing list