class GCCAsmStmt

Declaration

class GCCAsmStmt : public AsmStmt { /* full declaration omitted */ };

Description

This represents a GCC inline-assembly statement extension.

Declared at: clang/include/clang/AST/Stmt.h:3034

Inherits from: AsmStmt

Member Variables

private clang::SourceLocation RParenLoc
private clang::StringLiteral* AsmStr
private clang::StringLiteral** Constraints = nullptr
private clang::StringLiteral** Clobbers = nullptr
private clang::IdentifierInfo** Names = nullptr
private unsigned int NumLabels = 0

Inherited from AsmStmt:

protected AsmLoc
protected IsSimple
protected IsVolatile
protected NumOutputs
protected NumInputs
protected NumClobbers
protected Exprs = nullptr

Inherited from Stmt:

protected

Method Overview

  • public unsigned int AnalyzeAsmString(SmallVectorImpl<clang::GCCAsmStmt::AsmStringPiece> & Pieces, const clang::ASTContext & C, unsigned int & DiagOffs) const
  • public GCCAsmStmt(clang::Stmt::EmptyShell Empty)
  • public GCCAsmStmt(const clang::ASTContext & C, clang::SourceLocation asmloc, bool issimple, bool isvolatile, unsigned int numoutputs, unsigned int numinputs, clang::IdentifierInfo ** names, clang::StringLiteral ** constraints, clang::Expr ** exprs, clang::StringLiteral * asmstr, unsigned int numclobbers, clang::StringLiteral ** clobbers, unsigned int numlabels, clang::SourceLocation rparenloc)
  • public clang::GCCAsmStmt::const_labels_iterator begin_labels() const
  • public clang::GCCAsmStmt::labels_iterator begin_labels()
  • public static bool classof(const clang::Stmt * T)
  • public clang::GCCAsmStmt::const_labels_iterator end_labels() const
  • public clang::GCCAsmStmt::labels_iterator end_labels()
  • public std::string generateAsmString(const clang::ASTContext & C) const
  • public clang::StringLiteral * getAsmString()
  • public const clang::StringLiteral * getAsmString() const
  • public clang::SourceLocation getBeginLoc() const
  • public llvm::StringRef getClobber(unsigned int i) const
  • public clang::StringLiteral * getClobberStringLiteral(unsigned int i)
  • public const clang::StringLiteral * getClobberStringLiteral(unsigned int i) const
  • public clang::SourceLocation getEndLoc() const
  • public llvm::StringRef getInputConstraint(unsigned int i) const
  • public const clang::StringLiteral * getInputConstraintLiteral(unsigned int i) const
  • public clang::StringLiteral * getInputConstraintLiteral(unsigned int i)
  • public clang::Expr * getInputExpr(unsigned int i)
  • public const clang::Expr * getInputExpr(unsigned int i) const
  • public clang::IdentifierInfo * getInputIdentifier(unsigned int i) const
  • public llvm::StringRef getInputName(unsigned int i) const
  • public clang::AddrLabelExpr * getLabelExpr(unsigned int i) const
  • public clang::IdentifierInfo * getLabelIdentifier(unsigned int i) const
  • public llvm::StringRef getLabelName(unsigned int i) const
  • public int getNamedOperand(llvm::StringRef SymbolicName) const
  • public unsigned int getNumLabels() const
  • public llvm::StringRef getOutputConstraint(unsigned int i) const
  • public clang::StringLiteral * getOutputConstraintLiteral(unsigned int i)
  • public const clang::StringLiteral * getOutputConstraintLiteral(unsigned int i) const
  • public const clang::Expr * getOutputExpr(unsigned int i) const
  • public clang::Expr * getOutputExpr(unsigned int i)
  • public clang::IdentifierInfo * getOutputIdentifier(unsigned int i) const
  • public llvm::StringRef getOutputName(unsigned int i) const
  • public clang::SourceLocation getRParenLoc() const
  • public bool isAsmGoto() const
  • public clang::GCCAsmStmt::labels_const_range labels() const
  • public clang::GCCAsmStmt::labels_range labels()
  • public void setAsmString(clang::StringLiteral * E)
  • public void setInputExpr(unsigned int i, clang::Expr * E)
  • private void setOutputsAndInputsAndClobbers(const clang::ASTContext & C, clang::IdentifierInfo ** Names, clang::StringLiteral ** Constraints, clang::Stmt ** Exprs, unsigned int NumOutputs, unsigned int NumInputs, unsigned int NumLabels, clang::StringLiteral ** Clobbers, unsigned int NumClobbers)
  • public void setRParenLoc(clang::SourceLocation L)

Inherited from AsmStmt:

Inherited from Stmt:

Methods

unsigned int AnalyzeAsmString(
    SmallVectorImpl<
        clang::GCCAsmStmt::AsmStringPiece>&
        Pieces,
    const clang::ASTContext& C,
    unsigned int& DiagOffs) const

Description

AnalyzeAsmString - Analyze the asm string of the current asm, decomposing it into pieces. If the asm string is erroneous, emit errors and return true, otherwise return false. This handles canonicalization and translation of strings from GCC syntax to LLVM IR syntax, and handles / flattening of named references like %[foo] to Operand AsmStringPiece's.

Declared at: clang/include/clang/AST/Stmt.h:3116

Parameters

SmallVectorImpl< clang::GCCAsmStmt::AsmStringPiece>& Pieces
const clang::ASTContext& C
unsigned int& DiagOffs

GCCAsmStmt(clang::Stmt::EmptyShell Empty)

Description

Build an empty inline-assembly statement.

Declared at: clang/include/clang/AST/Stmt.h:3055

Parameters

clang::Stmt::EmptyShell Empty

GCCAsmStmt(const clang::ASTContext& C,
           clang::SourceLocation asmloc,
           bool issimple,
           bool isvolatile,
           unsigned int numoutputs,
           unsigned int numinputs,
           clang::IdentifierInfo** names,
           clang::StringLiteral** constraints,
           clang::Expr** exprs,
           clang::StringLiteral* asmstr,
           unsigned int numclobbers,
           clang::StringLiteral** clobbers,
           unsigned int numlabels,
           clang::SourceLocation rparenloc)

Declared at: clang/include/clang/AST/Stmt.h:3047

Parameters

const clang::ASTContext& C
clang::SourceLocation asmloc
bool issimple
bool isvolatile
unsigned int numoutputs
unsigned int numinputs
clang::IdentifierInfo** names
clang::StringLiteral** constraints
clang::Expr** exprs
clang::StringLiteral* asmstr
unsigned int numclobbers
clang::StringLiteral** clobbers
unsigned int numlabels
clang::SourceLocation rparenloc

clang::GCCAsmStmt::const_labels_iterator
begin_labels() const

Declared at: clang/include/clang/AST/Stmt.h:3210

clang::GCCAsmStmt::labels_iterator begin_labels()

Declared at: clang/include/clang/AST/Stmt.h:3198

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Stmt.h:3251

Parameters

const clang::Stmt* T

clang::GCCAsmStmt::const_labels_iterator
end_labels() const

Declared at: clang/include/clang/AST/Stmt.h:3214

clang::GCCAsmStmt::labels_iterator end_labels()

Declared at: clang/include/clang/AST/Stmt.h:3202

std::string generateAsmString(
    const clang::ASTContext& C) const

Description

Assemble final IR asm string.

Declared at: clang/include/clang/AST/Stmt.h:3120

Parameters

const clang::ASTContext& C

clang::StringLiteral* getAsmString()

Declared at: clang/include/clang/AST/Stmt.h:3063

const clang::StringLiteral* getAsmString() const

Declared at: clang/include/clang/AST/Stmt.h:3062

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Stmt.h:3248

llvm::StringRef getClobber(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3241

Parameters

unsigned int i

clang::StringLiteral* getClobberStringLiteral(
    unsigned int i)

Declared at: clang/include/clang/AST/Stmt.h:3243

Parameters

unsigned int i

const clang::StringLiteral*
getClobberStringLiteral(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3244

Parameters

unsigned int i

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Stmt.h:3249

llvm::StringRef getInputConstraint(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3161

Parameters

unsigned int i

const clang::StringLiteral*
getInputConstraintLiteral(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3163

Parameters

unsigned int i

clang::StringLiteral* getInputConstraintLiteral(
    unsigned int i)

Declared at: clang/include/clang/AST/Stmt.h:3166

Parameters

unsigned int i

clang::Expr* getInputExpr(unsigned int i)

Declared at: clang/include/clang/AST/Stmt.h:3170

Parameters

unsigned int i

const clang::Expr* getInputExpr(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3173

Parameters

unsigned int i

clang::IdentifierInfo* getInputIdentifier(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3150

Parameters

unsigned int i

llvm::StringRef getInputName(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3154

Parameters

unsigned int i

clang::AddrLabelExpr* getLabelExpr(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3191

Parameters

unsigned int i

clang::IdentifierInfo* getLabelIdentifier(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3187

Parameters

unsigned int i

llvm::StringRef getLabelName(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3192

Parameters

unsigned int i

int getNamedOperand(
    llvm::StringRef SymbolicName) const

Description

getNamedOperand - Given a symbolic operand reference like %[foo], translate this into a numeric value needed to reference the same operand. This returns -1 if the operand name is invalid.

Declared at: clang/include/clang/AST/Stmt.h:3239

Parameters

llvm::StringRef SymbolicName

unsigned int getNumLabels() const

Declared at: clang/include/clang/AST/Stmt.h:3183

llvm::StringRef getOutputConstraint(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3133

Parameters

unsigned int i

clang::StringLiteral* getOutputConstraintLiteral(
    unsigned int i)

Declared at: clang/include/clang/AST/Stmt.h:3138

Parameters

unsigned int i

const clang::StringLiteral*
getOutputConstraintLiteral(unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3135

Parameters

unsigned int i

const clang::Expr* getOutputExpr(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3144

Parameters

unsigned int i

clang::Expr* getOutputExpr(unsigned int i)

Declared at: clang/include/clang/AST/Stmt.h:3142

Parameters

unsigned int i

clang::IdentifierInfo* getOutputIdentifier(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3124

Parameters

unsigned int i

llvm::StringRef getOutputName(
    unsigned int i) const

Declared at: clang/include/clang/AST/Stmt.h:3126

Parameters

unsigned int i

clang::SourceLocation getRParenLoc() const

Declared at: clang/include/clang/AST/Stmt.h:3057

bool isAsmGoto() const

Declared at: clang/include/clang/AST/Stmt.h:3179

clang::GCCAsmStmt::labels_const_range labels()
    const

Declared at: clang/include/clang/AST/Stmt.h:3218

clang::GCCAsmStmt::labels_range labels()

Declared at: clang/include/clang/AST/Stmt.h:3206

void setAsmString(clang::StringLiteral* E)

Declared at: clang/include/clang/AST/Stmt.h:3064

Parameters

clang::StringLiteral* E

void setInputExpr(unsigned int i, clang::Expr* E)

Declared at: clang/include/clang/AST/Stmt.h:3171

Parameters

unsigned int i
clang::Expr* E

void setOutputsAndInputsAndClobbers(
    const clang::ASTContext& C,
    clang::IdentifierInfo** Names,
    clang::StringLiteral** Constraints,
    clang::Stmt** Exprs,
    unsigned int NumOutputs,
    unsigned int NumInputs,
    unsigned int NumLabels,
    clang::StringLiteral** Clobbers,
    unsigned int NumClobbers)

Declared at: clang/include/clang/AST/Stmt.h:3223

Parameters

const clang::ASTContext& C
clang::IdentifierInfo** Names
clang::StringLiteral** Constraints
clang::Stmt** Exprs
unsigned int NumOutputs
unsigned int NumInputs
unsigned int NumLabels
clang::StringLiteral** Clobbers
unsigned int NumClobbers

void setRParenLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Stmt.h:3058

Parameters

clang::SourceLocation L