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

#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
 
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. More...
 
bool IsVolatile
 If true, treat this inline assembly as having side effects. This assembly statement should not be optimized, deleted or moved. 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 1399 of file Stmt.h.

Member Typedef Documentation

Definition at line 1490 of file Stmt.h.

Definition at line 1519 of file Stmt.h.

Definition at line 1492 of file Stmt.h.

Definition at line 1489 of file Stmt.h.

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

Definition at line 1491 of file Stmt.h.

Definition at line 1521 of file Stmt.h.

Definition at line 1518 of file Stmt.h.

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

Definition at line 1520 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 1416 of file Stmt.h.

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

Build an empty inline-assembly statement.

Definition at line 1425 of file Stmt.h.

Member Function Documentation

inputs_iterator clang::AsmStmt::begin_inputs ( )
inline

Definition at line 1494 of file Stmt.h.

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

Definition at line 1504 of file Stmt.h.

outputs_iterator clang::AsmStmt::begin_outputs ( )
inline

Definition at line 1523 of file Stmt.h.

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

Definition at line 1533 of file Stmt.h.

child_range clang::AsmStmt::children ( )
inline

Definition at line 1543 of file Stmt.h.

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

Definition at line 1482 of file Stmt.h.

inputs_iterator clang::AsmStmt::end_inputs ( )
inline

Definition at line 1498 of file Stmt.h.

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

Definition at line 1508 of file Stmt.h.

outputs_iterator clang::AsmStmt::end_outputs ( )
inline

Definition at line 1526 of file Stmt.h.

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

Definition at line 1536 of file Stmt.h.

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

Assemble final IR asm string.

Definition at line 328 of file Stmt.cpp.

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

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

Definition at line 1428 of file Stmt.h.

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

StringRef AsmStmt::getClobber ( unsigned  i) const

Definition at line 368 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 352 of file Stmt.cpp.

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

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

Definition at line 360 of file Stmt.cpp.

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

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

Definition at line 1438 of file Stmt.h.

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

Definition at line 1437 of file Stmt.h.

unsigned clang::AsmStmt::getNumClobbers ( ) const
inline

Definition at line 1479 of file Stmt.h.

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

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 378 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 336 of file Stmt.cpp.

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

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

Definition at line 344 of file Stmt.cpp.

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

inputs_range clang::AsmStmt::inputs ( )
inline

Definition at line 1502 of file Stmt.h.

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

Definition at line 1512 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 1457 of file Stmt.h.

Referenced by getNumPlusOperands().

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

Definition at line 1431 of file Stmt.h.

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

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

Definition at line 1434 of file Stmt.h.

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

outputs_range clang::AsmStmt::outputs ( )
inline

Definition at line 1529 of file Stmt.h.

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

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

Definition at line 1539 of file Stmt.h.

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

Definition at line 1429 of file Stmt.h.

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

Definition at line 1432 of file Stmt.h.

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

Definition at line 1435 of file Stmt.h.

Friends And Related Function Documentation

friend class ASTStmtReader
friend

Definition at line 1421 of file Stmt.h.

Member Data Documentation

SourceLocation clang::AsmStmt::AsmLoc
protected

Definition at line 1401 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 1404 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 1408 of file Stmt.h.

unsigned clang::AsmStmt::NumClobbers
protected

Definition at line 1412 of file Stmt.h.

unsigned clang::AsmStmt::NumInputs
protected

Definition at line 1411 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: