LLVM  mainline
Public Types | Public Member Functions | Static Public Member Functions | Friends
llvm::MDString Class Reference

A single uniqued string. More...

#include <Metadata.h>

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

List of all members.

Public Types

typedef StringRef::iterator iterator

Public Member Functions

StringRef getString () const
unsigned getLength () const
iterator begin () const
 Pointer to the first byte of the string.
iterator end () const
 Pointer to one byte past the end of the string.
const unsigned char * bytes_begin () const
const unsigned char * bytes_end () const

Static Public Member Functions

static MDStringget (LLVMContext &Context, StringRef Str)
static MDStringget (LLVMContext &Context, const char *Str)
static bool classof (const Metadata *MD)
 Methods for support type inquiry through isa, cast, and dyn_cast.

Friends

class StringMapEntry< MDString >

Detailed Description

A single uniqued string.

These are used to efficiently contain a byte sequence for metadata. MDString is always unnamed.

Definition at line 496 of file Metadata.h.


Member Typedef Documentation

Definition at line 517 of file Metadata.h.


Member Function Documentation

iterator llvm::MDString::begin ( ) const [inline]

Pointer to the first byte of the string.

Definition at line 520 of file Metadata.h.

References llvm::StringRef::begin(), and getString().

const unsigned char* llvm::MDString::bytes_begin ( ) const [inline]

Definition at line 525 of file Metadata.h.

References llvm::StringRef::bytes_begin(), and getString().

Referenced by WriteModuleMetadata().

const unsigned char* llvm::MDString::bytes_end ( ) const [inline]

Definition at line 526 of file Metadata.h.

References llvm::StringRef::bytes_end(), and getString().

Referenced by WriteModuleMetadata().

static bool llvm::MDString::classof ( const Metadata MD) [inline, static]

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

Definition at line 529 of file Metadata.h.

References llvm::Metadata::getMetadataID(), and llvm::Metadata::MDStringKind.

iterator llvm::MDString::end ( ) const [inline]

Pointer to one byte past the end of the string.

Definition at line 523 of file Metadata.h.

References llvm::StringRef::end(), and getString().

MDString * MDString::get ( LLVMContext Context,
StringRef  Str 
) [static]
static MDString* llvm::MDString::get ( LLVMContext Context,
const char *  Str 
) [inline, static]

Definition at line 509 of file Metadata.h.

unsigned llvm::MDString::getLength ( ) const [inline]

Definition at line 515 of file Metadata.h.

References getString(), and llvm::StringRef::size().


Friends And Related Function Documentation

friend class StringMapEntry< MDString > [friend]

Definition at line 497 of file Metadata.h.


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