From 07252fd463d2378383ae035e45f6ed3c12959efe Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Thu, 29 May 2008 22:58:33 +0000 Subject: [PATCH] add doxygen comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51712 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/OperandTraits.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/llvm/OperandTraits.h b/include/llvm/OperandTraits.h index 3811927e57b..028d124e463 100644 --- a/include/llvm/OperandTraits.h +++ b/include/llvm/OperandTraits.h @@ -23,6 +23,10 @@ namespace llvm { // 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 struct FixedNumOperandTraits { static Use *op_begin(User* U) { @@ -62,6 +66,10 @@ struct OptionalOperandTraits : FixedNumOperandTraits { // 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 struct VariadicOperandTraits { static Use *op_begin(User* U) { @@ -80,6 +88,16 @@ struct VariadicOperandTraits { // 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 struct HungoffOperandTraits { static Use *op_begin(User* U) {