LLVM  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
llvm::ConstantStruct Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantStruct:
Inheritance graph
[legend]
Collaboration diagram for llvm::ConstantStruct:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Constant)
 Transparently provide more efficient getOperand methods.
StructTypegetType () const
 getType() specialization - Reduce amount of casting...

Static Public Member Functions

static Constantget (StructType *T, ArrayRef< Constant * > V)
static Constantget (StructType *T,...) LLVM_END_WITH_NULL
static ConstantgetAnon (ArrayRef< Constant * > V, bool Packed=false)
 getAnon - Return an anonymous struct that has the specified elements.
static ConstantgetAnon (LLVMContext &Ctx, ArrayRef< Constant * > V, bool Packed=false)
static StructTypegetTypeForElements (ArrayRef< Constant * > V, bool Packed=false)
 getTypeForElements - Return an anonymous struct type to use for a constant with the specified set of elements.
static StructTypegetTypeForElements (LLVMContext &Ctx, ArrayRef< Constant * > V, bool Packed=false)
 getTypeForElements - This version of the method allows an empty list.
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

 ConstantStruct (StructType *T, ArrayRef< Constant * > Val)

Friends

struct ConstantAggrKeyType< ConstantStruct >
class Constant

Detailed Description

Definition at line 400 of file Constants.h.


Constructor & Destructor Documentation

ConstantStruct::ConstantStruct ( StructType T,
ArrayRef< Constant * >  Val 
) [protected]

Member Function Documentation

static bool llvm::ConstantStruct::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Constant.

Definition at line 445 of file Constants.h.

References llvm::Value::getValueID().

Transparently provide more efficient getOperand methods.

Constant * ConstantStruct::get ( StructType T,
ArrayRef< Constant * >  V 
) [static]
Constant * ConstantStruct::get ( StructType T,
  ... 
) [static]
static Constant* llvm::ConstantStruct::getAnon ( ArrayRef< Constant * >  V,
bool  Packed = false 
) [inline, static]

getAnon - Return an anonymous struct that has the specified elements.

If the struct is possibly empty, then you must specify a context.

Definition at line 418 of file Constants.h.

References llvm::codeview::Packed.

Referenced by createPrivateGlobalForSourceLoc(), llvm::SanitizerStatReport::finish(), and LLVMConstStructInContext().

static Constant* llvm::ConstantStruct::getAnon ( LLVMContext Ctx,
ArrayRef< Constant * >  V,
bool  Packed = false 
) [inline, static]

Definition at line 421 of file Constants.h.

References llvm::codeview::Packed.

getType() specialization - Reduce amount of casting...

Reimplemented from llvm::Value.

Definition at line 440 of file Constants.h.

References llvm::Value::getType().

Referenced by emitGlobalConstantStruct(), and getTypeForElements().

getTypeForElements - Return an anonymous struct type to use for a constant with the specified set of elements.

The list must not be empty.

Definition at line 974 of file Constants.cpp.

References llvm::ArrayRef< T >::empty(), and llvm::Value::getContext().

StructType * ConstantStruct::getTypeForElements ( LLVMContext Context,
ArrayRef< Constant * >  V,
bool  Packed = false 
) [static]

getTypeForElements - This version of the method allows an empty list.

getTypeForElements - Return an anonymous struct type to use for a constant with the specified set of elements.

The list must not be empty.

Definition at line 962 of file Constants.cpp.

References get(), getType(), and llvm::ArrayRef< T >::size().


Friends And Related Function Documentation

friend class Constant [friend]

Definition at line 404 of file Constants.h.

friend struct ConstantAggrKeyType< ConstantStruct > [friend]

Definition at line 401 of file Constants.h.


The documentation for this class was generated from the following files: