clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
clang::AsmStmt Class Reference

#include <Stmt.h>

Inheritance diagram for clang::AsmStmt:
Inheritance graph
[legend]
Collaboration diagram for clang::AsmStmt:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ExprIterator inputs_iterator
typedef ConstExprIterator const_inputs_iterator
typedef llvm::iterator_range
< inputs_iterator
inputs_range
typedef llvm::iterator_range
< const_inputs_iterator
inputs_const_range
typedef ExprIterator outputs_iterator
typedef ConstExprIterator const_outputs_iterator
typedef llvm::iterator_range
< outputs_iterator
outputs_range
typedef llvm::iterator_range
< const_outputs_iterator
outputs_const_range

Public Member Functions

 AsmStmt (StmtClass SC, EmptyShell Empty)
 Build an empty inline-assembly statement.
SourceLocation getAsmLoc () const
void setAsmLoc (SourceLocation L)
bool isSimple () const
void setSimple (bool V)
bool isVolatile () const
void setVolatile (bool V)
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
std::string generateAsmString (const ASTContext &C) const
 Assemble final IR asm string.
unsigned getNumOutputs () const
StringRef getOutputConstraint (unsigned i) const
bool isOutputPlusConstraint (unsigned i) const
const ExprgetOutputExpr (unsigned i) const
unsigned getNumPlusOperands () const
unsigned getNumInputs () const
StringRef getInputConstraint (unsigned i) const
const ExprgetInputExpr (unsigned i) const
unsigned getNumClobbers () const
StringRef getClobber (unsigned i) const
inputs_iterator begin_inputs ()
inputs_iterator end_inputs ()
inputs_range inputs ()
const_inputs_iterator begin_inputs () const
const_inputs_iterator end_inputs () const
inputs_const_range inputs () const
outputs_iterator begin_outputs ()
outputs_iterator end_outputs ()
outputs_range outputs ()
const_outputs_iterator begin_outputs () const
const_outputs_iterator end_outputs () const
outputs_const_range outputs () const
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)

Protected Member Functions

 AsmStmt (StmtClass SC, SourceLocation asmloc, bool issimple, bool isvolatile, unsigned numoutputs, unsigned numinputs, unsigned numclobbers)

Protected Attributes

SourceLocation AsmLoc
bool IsSimple
 True if the assembly statement does not have any input or output operands.
bool IsVolatile
 If true, treat this inline assembly as having side effects. This assembly statement should not be optimized, deleted or moved.
unsigned NumOutputs
unsigned NumInputs
unsigned NumClobbers
Stmt ** Exprs

Friends

class ASTStmtReader

Detailed Description

AsmStmt is the base class for GCCAsmStmt and MSAsmStmt.

Definition at line 1393 of file Stmt.h.


Member Typedef Documentation

Definition at line 1484 of file Stmt.h.

Definition at line 1513 of file Stmt.h.

Definition at line 1486 of file Stmt.h.

Definition at line 1483 of file Stmt.h.

typedef llvm::iterator_range<inputs_iterator> clang::AsmStmt::inputs_range

Definition at line 1485 of file Stmt.h.

Definition at line 1515 of file Stmt.h.

Definition at line 1512 of file Stmt.h.

typedef llvm::iterator_range<outputs_iterator> clang::AsmStmt::outputs_range

Definition at line 1514 of file Stmt.h.


Constructor & Destructor Documentation

clang::AsmStmt::AsmStmt ( StmtClass  SC,
SourceLocation  asmloc,
bool  issimple,
bool  isvolatile,
unsigned  numoutputs,
unsigned  numinputs,
unsigned  numclobbers 
) [inline, protected]

Definition at line 1410 of file Stmt.h.

clang::AsmStmt::AsmStmt ( StmtClass  SC,
EmptyShell  Empty 
) [inline, explicit]

Build an empty inline-assembly statement.

Definition at line 1419 of file Stmt.h.


Member Function Documentation

Definition at line 1488 of file Stmt.h.

References Exprs, and NumOutputs.

Referenced by inputs().

Definition at line 1498 of file Stmt.h.

References Exprs, and NumOutputs.

Definition at line 1517 of file Stmt.h.

References Exprs.

Referenced by outputs().

Definition at line 1527 of file Stmt.h.

References Exprs.

Reimplemented from clang::Stmt.

Reimplemented in clang::MSAsmStmt.

Definition at line 1537 of file Stmt.h.

References Exprs, NumInputs, and NumOutputs.

static bool clang::AsmStmt::classof ( const Stmt T) [inline, static]

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 1476 of file Stmt.h.

References clang::Stmt::getStmtClass().

Definition at line 1492 of file Stmt.h.

References Exprs, NumInputs, and NumOutputs.

Referenced by inputs().

Definition at line 1502 of file Stmt.h.

References Exprs, NumInputs, and NumOutputs.

Definition at line 1520 of file Stmt.h.

References Exprs, and NumOutputs.

Referenced by outputs().

Definition at line 1530 of file Stmt.h.

References Exprs, and NumOutputs.

std::string AsmStmt::generateAsmString ( const ASTContext C) const

Assemble final IR asm string.

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 322 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

Definition at line 1422 of file Stmt.h.

References AsmLoc.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

StringRef AsmStmt::getClobber ( unsigned  i) const

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 362 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

StringRef AsmStmt::getInputConstraint ( unsigned  i) const

getInputConstraint - Return the specified input constraint. Unlike output constraints, these can be empty.

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 346 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

const Expr * AsmStmt::getInputExpr ( unsigned  i) const

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 354 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

Reimplemented from clang::Stmt.

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 1432 of file Stmt.h.

Reimplemented from clang::Stmt.

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 1431 of file Stmt.h.

Definition at line 1473 of file Stmt.h.

References NumClobbers.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

getNumPlusOperands - Return the number of output operands that have a "+" constraint.

Definition at line 372 of file Stmt.cpp.

References getNumOutputs(), and isOutputPlusConstraint().

Referenced by clang::GCCAsmStmt::AnalyzeAsmString().

StringRef AsmStmt::getOutputConstraint ( unsigned  i) const

getOutputConstraint - Return the constraint string for the specified output operand. All output constraints are known to be non-empty (either '=' or '+').

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 330 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt(), and isOutputPlusConstraint().

const Expr * AsmStmt::getOutputExpr ( unsigned  i) const

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 338 of file Stmt.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

Definition at line 1496 of file Stmt.h.

References begin_inputs(), and end_inputs().

Definition at line 1506 of file Stmt.h.

References begin_inputs(), and end_inputs().

isOutputPlusConstraint - Return true if the specified output constraint is a "+" constraint (which is both an input and an output) or false if it is an "=" constraint (just an output).

Definition at line 1451 of file Stmt.h.

References getOutputConstraint().

Referenced by getNumPlusOperands().

bool clang::AsmStmt::isSimple ( ) const [inline]

Definition at line 1425 of file Stmt.h.

References IsSimple.

Referenced by clang::GCCAsmStmt::AnalyzeAsmString().

bool clang::AsmStmt::isVolatile ( ) const [inline]

Definition at line 1428 of file Stmt.h.

References IsVolatile.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

Definition at line 1523 of file Stmt.h.

References begin_outputs(), and end_outputs().

Referenced by clang::ento::ExprEngine::VisitGCCAsmStmt().

Definition at line 1533 of file Stmt.h.

References begin_outputs(), and end_outputs().

Definition at line 1423 of file Stmt.h.

References AsmLoc.

void clang::AsmStmt::setSimple ( bool  V) [inline]

Definition at line 1426 of file Stmt.h.

References IsSimple.

void clang::AsmStmt::setVolatile ( bool  V) [inline]

Definition at line 1429 of file Stmt.h.

References IsVolatile.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Reimplemented in clang::MSAsmStmt, and clang::GCCAsmStmt.

Definition at line 1415 of file Stmt.h.


Member Data Documentation

Stmt** clang::AsmStmt::Exprs [protected]

True if the assembly statement does not have any input or output operands.

Definition at line 1398 of file Stmt.h.

Referenced by isSimple(), and setSimple().

If true, treat this inline assembly as having side effects. This assembly statement should not be optimized, deleted or moved.

Definition at line 1402 of file Stmt.h.

Referenced by isVolatile(), and setVolatile().

Definition at line 1406 of file Stmt.h.

Referenced by clang::MSAsmStmt::getClobbers(), and getNumClobbers().


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