class StringInit

Declaration

class StringInit : public TypedInit { /* full declaration omitted */ };

Description

"foo" - Represent an initialization by a string value.

Declared at: llvm/include/llvm/TableGen/Record.h:638

Inherits from: TypedInit

Member Variables

private llvm::StringRef Value
private llvm::StringInit::StringFormat Format

Inherited from Init:

protected Opc

Method Overview

  • private StringInit(llvm::RecordKeeper & RK, llvm::StringRef V, llvm::StringInit::StringFormat Fmt)
  • public StringInit(const llvm::StringInit &)
  • public static bool classof(const llvm::Init * I)
  • public llvm::Init * convertInitializerTo(llvm::RecTy * Ty) const
  • public static llvm::StringInit::StringFormat determineFormat(llvm::StringInit::StringFormat Fmt1, llvm::StringInit::StringFormat Fmt2)
  • public static llvm::StringInit * get(llvm::RecordKeeper & RK, llvm::StringRef, llvm::StringInit::StringFormat Fmt = SF_String)
  • public std::string getAsString() const
  • public std::string getAsUnquotedString() const
  • public llvm::Init * getBit(unsigned int Bit) const
  • public llvm::StringInit::StringFormat getFormat() const
  • public llvm::StringRef getValue() const
  • public bool hasCodeFormat() const
  • public bool isConcrete() const

Inherited from TypedInit:

Inherited from Init:

Methods

StringInit(llvm::RecordKeeper& RK,
           llvm::StringRef V,
           llvm::StringInit::StringFormat Fmt)

Declared at: llvm/include/llvm/TableGen/Record.h:649

Parameters

llvm::RecordKeeper& RK
llvm::StringRef V
llvm::StringInit::StringFormat Fmt

StringInit(const llvm::StringInit&)

Declared at: llvm/include/llvm/TableGen/Record.h:653

Parameters

const llvm::StringInit&

static bool classof(const llvm::Init* I)

Declared at: llvm/include/llvm/TableGen/Record.h:656

Parameters

const llvm::Init* I

llvm::Init* convertInitializerTo(
    llvm::RecTy* Ty) const

Description

Convert to a value whose type is \p Ty, or return null if this is not possible. This can happen if the value's type is convertible to \p Ty, but there are unresolved references.

Declared at: llvm/include/llvm/TableGen/Record.h:671

Parameters

llvm::RecTy* Ty

static llvm::StringInit::StringFormat
determineFormat(
    llvm::StringInit::StringFormat Fmt1,
    llvm::StringInit::StringFormat Fmt2)

Declared at: llvm/include/llvm/TableGen/Record.h:663

Parameters

llvm::StringInit::StringFormat Fmt1
llvm::StringInit::StringFormat Fmt2

static llvm::StringInit* get(
    llvm::RecordKeeper& RK,
    llvm::StringRef,
    llvm::StringInit::StringFormat Fmt =
        SF_String)

Declared at: llvm/include/llvm/TableGen/Record.h:660

Parameters

llvm::RecordKeeper& RK
llvm::StringRef
llvm::StringInit::StringFormat Fmt = SF_String

std::string getAsString() const

Description

Convert this value to a literal form.

Declared at: llvm/include/llvm/TableGen/Record.h:675

std::string getAsUnquotedString() const

Description

Convert this value to a literal form, without adding quotes around a string.

Declared at: llvm/include/llvm/TableGen/Record.h:682

llvm::Init* getBit(unsigned int Bit) const

Description

Get the \p Init value of the specified bit.

Declared at: llvm/include/llvm/TableGen/Record.h:686

Parameters

unsigned int Bit

llvm::StringInit::StringFormat getFormat() const

Declared at: llvm/include/llvm/TableGen/Record.h:668

llvm::StringRef getValue() const

Declared at: llvm/include/llvm/TableGen/Record.h:667

bool hasCodeFormat() const

Declared at: llvm/include/llvm/TableGen/Record.h:669

bool isConcrete() const

Description

Is this a concrete and fully resolved value without any references or stuck operations? Unset values are concrete.

Declared at: llvm/include/llvm/TableGen/Record.h:673