LLVM API Documentation

Functions | Variables
DataLayout.cpp File Reference
#include "llvm/IR/DataLayout.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cstdlib>
Include dependency graph for DataLayout.cpp:

Go to the source code of this file.

Functions

static std::pair< StringRef,
StringRef
split (StringRef Str, char Separator)
 Checked version of split, to ensure mandatory subparts.
static unsigned getInt (StringRef R)
 Get an unsigned integer, including error checks.
static unsigned inBytes (unsigned Bits)
 Convert bits into bytes. Assert if not a byte width multiple.

Variables

static const LayoutAlignElem DefaultAlignments []

Function Documentation

static unsigned getInt ( StringRef  R) [static]

Get an unsigned integer, including error checks.

Definition at line 206 of file DataLayout.cpp.

References llvm::StringRef::getAsInteger(), and llvm::report_fatal_error().

static unsigned inBytes ( unsigned  Bits) [static]

Convert bits into bytes. Assert if not a byte width multiple.

Definition at line 215 of file DataLayout.cpp.

static std::pair<StringRef, StringRef> split ( StringRef  Str,
char  Separator 
) [static]

Checked version of split, to ensure mandatory subparts.

Definition at line 197 of file DataLayout.cpp.

References llvm::StringRef::empty(), Split(), and llvm::StringRef::split().


Variable Documentation

Initial value:
 {
  { INTEGER_ALIGN, 1, 1, 1 },    
  { INTEGER_ALIGN, 8, 1, 1 },    
  { INTEGER_ALIGN, 16, 2, 2 },   
  { INTEGER_ALIGN, 32, 4, 4 },   
  { INTEGER_ALIGN, 64, 4, 8 },   
  { FLOAT_ALIGN, 16, 2, 2 },     
  { FLOAT_ALIGN, 32, 4, 4 },     
  { FLOAT_ALIGN, 64, 8, 8 },     
  { FLOAT_ALIGN, 128, 16, 16 },  
  { VECTOR_ALIGN, 64, 8, 8 },    
  { VECTOR_ALIGN, 128, 16, 16 }, 
  { AGGREGATE_ALIGN, 0, 0, 8 }   
}

Definition at line 163 of file DataLayout.cpp.

Referenced by llvm::DataLayout::getStringRepresentation(), and llvm::DataLayout::reset().