clang  3.9.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
clang::AsmStmt Class Reference

AsmStmt is the base class for GCCAsmStmt and MSAsmStmt. More...

#include <Stmt.h>

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

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. More...
 
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. More...
 
unsigned getNumOutputs () const
 
StringRef getOutputConstraint (unsigned i) const
 getOutputConstraint - Return the constraint string for the specified output operand. More...
 
bool isOutputPlusConstraint (unsigned i) const
 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). More...
 
const ExprgetOutputExpr (unsigned i) const
 
unsigned getNumPlusOperands () const
 getNumPlusOperands - Return the number of output operands that have a "+" constraint. More...
 
unsigned getNumInputs () const
 
StringRef getInputConstraint (unsigned i) const
 getInputConstraint - Return the specified input constraint. More...
 
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. More...
 
bool IsVolatile
 If true, treat this inline assembly as having side effects. More...
 
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 1414 of file Stmt.h.

Member Typedef Documentation

typedef ConstExprIterator clang::AsmStmt::const_inputs_iterator

Definition at line 1505 of file Stmt.h.

typedef ConstExprIterator clang::AsmStmt::const_outputs_iterator

Definition at line 1534 of file Stmt.h.

Definition at line 1507 of file Stmt.h.

typedef ExprIterator clang::AsmStmt::inputs_iterator

Definition at line 1504 of file Stmt.h.

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

Definition at line 1506 of file Stmt.h.

Definition at line 1536 of file Stmt.h.

typedef ExprIterator clang::AsmStmt::outputs_iterator

Definition at line 1533 of file Stmt.h.

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

Definition at line 1535 of file Stmt.h.

Constructor & Destructor Documentation

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

Definition at line 1431 of file Stmt.h.

clang::AsmStmt::AsmStmt ( StmtClass  SC,
EmptyShell  Empty 
)
inlineexplicit

Build an empty inline-assembly statement.

Definition at line 1440 of file Stmt.h.

Member Function Documentation

inputs_iterator clang::AsmStmt::begin_inputs ( )
inline

Definition at line 1509 of file Stmt.h.

Referenced by clang::ASTNodeImporter::VisitGCCAsmStmt().

const_inputs_iterator clang::AsmStmt::begin_inputs ( ) const
inline

Definition at line 1519 of file Stmt.h.

outputs_iterator clang::AsmStmt::begin_outputs ( )
inline

Definition at line 1538 of file Stmt.h.

Referenced by clang::ASTNodeImporter::VisitGCCAsmStmt().

const_outputs_iterator clang::AsmStmt::begin_outputs ( ) const
inline

Definition at line 1548 of file Stmt.h.

child_range clang::AsmStmt::children ( )
inline

Definition at line 1558 of file Stmt.h.

static bool clang::AsmStmt::classof ( const Stmt T)
inlinestatic

Definition at line 1497 of file Stmt.h.

inputs_iterator clang::AsmStmt::end_inputs ( )
inline

Definition at line 1513 of file Stmt.h.

Referenced by clang::ASTNodeImporter::VisitGCCAsmStmt().

const_inputs_iterator clang::AsmStmt::end_inputs ( ) const
inline

Definition at line 1523 of file Stmt.h.

outputs_iterator clang::AsmStmt::end_outputs ( )
inline

Definition at line 1541 of file Stmt.h.

Referenced by clang::ASTNodeImporter::VisitGCCAsmStmt().

const_outputs_iterator clang::AsmStmt::end_outputs ( ) const
inline

Definition at line 1551 of file Stmt.h.

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

Assemble final IR asm string.

Definition at line 330 of file Stmt.cpp.

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

SourceLocation clang::AsmStmt::getAsmLoc ( ) const
inline
StringRef AsmStmt::getClobber ( unsigned  i) const

Definition at line 370 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.

Definition at line 354 of file Stmt.cpp.

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

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

Definition at line 362 of file Stmt.cpp.

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

SourceLocation clang::AsmStmt::getLocEnd ( ) const
inline

Definition at line 1453 of file Stmt.h.

SourceLocation clang::AsmStmt::getLocStart ( ) const
inline

Definition at line 1452 of file Stmt.h.

unsigned clang::AsmStmt::getNumClobbers ( ) const
inline
unsigned clang::AsmStmt::getNumInputs ( ) const
inline
unsigned clang::AsmStmt::getNumOutputs ( ) const
inline
unsigned AsmStmt::getNumPlusOperands ( ) const

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

Definition at line 380 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 '+').

Definition at line 338 of file Stmt.cpp.

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

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

Definition at line 346 of file Stmt.cpp.

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

inputs_range clang::AsmStmt::inputs ( )
inline

Definition at line 1517 of file Stmt.h.

inputs_const_range clang::AsmStmt::inputs ( ) const
inline

Definition at line 1527 of file Stmt.h.

bool clang::AsmStmt::isOutputPlusConstraint ( unsigned  i) const
inline

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 1472 of file Stmt.h.

Referenced by getNumPlusOperands().

bool clang::AsmStmt::isSimple ( ) const
inline
bool clang::AsmStmt::isVolatile ( ) const
inline
outputs_range clang::AsmStmt::outputs ( )
inline

Definition at line 1544 of file Stmt.h.

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

outputs_const_range clang::AsmStmt::outputs ( ) const
inline

Definition at line 1554 of file Stmt.h.

void clang::AsmStmt::setAsmLoc ( SourceLocation  L)
inline

Definition at line 1444 of file Stmt.h.

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

Definition at line 1447 of file Stmt.h.

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

Definition at line 1450 of file Stmt.h.

Friends And Related Function Documentation

friend class ASTStmtReader
friend

Definition at line 1436 of file Stmt.h.

Member Data Documentation

SourceLocation clang::AsmStmt::AsmLoc
protected

Definition at line 1416 of file Stmt.h.

Stmt** clang::AsmStmt::Exprs
protected
bool clang::AsmStmt::IsSimple
protected

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

Definition at line 1419 of file Stmt.h.

bool clang::AsmStmt::IsVolatile
protected

If true, treat this inline assembly as having side effects.

This assembly statement should not be optimized, deleted or moved.

Definition at line 1423 of file Stmt.h.

unsigned clang::AsmStmt::NumClobbers
protected

Definition at line 1427 of file Stmt.h.

unsigned clang::AsmStmt::NumInputs
protected

Definition at line 1426 of file Stmt.h.

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

unsigned clang::AsmStmt::NumOutputs
protected

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