|
clang
3.8.0
|
This represents a GCC inline-assembly statement extension. More...
#include <Stmt.h>
Classes | |
| class | AsmStringPiece |
| AsmStringPiece - this is part of a decomposed asm string specification (for use with the AnalyzeAsmString function below). More... | |
Public Member Functions | |
| GCCAsmStmt (const ASTContext &C, SourceLocation asmloc, bool issimple, bool isvolatile, unsigned numoutputs, unsigned numinputs, IdentifierInfo **names, StringLiteral **constraints, Expr **exprs, StringLiteral *asmstr, unsigned numclobbers, StringLiteral **clobbers, SourceLocation rparenloc) | |
| GCCAsmStmt (EmptyShell Empty) | |
| Build an empty inline-assembly statement. More... | |
| SourceLocation | getRParenLoc () const |
| void | setRParenLoc (SourceLocation L) |
| const StringLiteral * | getAsmString () const |
| StringLiteral * | getAsmString () |
| void | setAsmString (StringLiteral *E) |
| unsigned | AnalyzeAsmString (SmallVectorImpl< AsmStringPiece > &Pieces, const ASTContext &C, unsigned &DiagOffs) const |
| AnalyzeAsmString - Analyze the asm string of the current asm, decomposing it into pieces. More... | |
| std::string | generateAsmString (const ASTContext &C) const |
| Assemble final IR asm string. More... | |
| IdentifierInfo * | getOutputIdentifier (unsigned i) const |
| StringRef | getOutputName (unsigned i) const |
| StringRef | getOutputConstraint (unsigned i) const |
| getOutputConstraint - Return the constraint string for the specified output operand. More... | |
| const StringLiteral * | getOutputConstraintLiteral (unsigned i) const |
| StringLiteral * | getOutputConstraintLiteral (unsigned i) |
| Expr * | getOutputExpr (unsigned i) |
| const Expr * | getOutputExpr (unsigned i) const |
| IdentifierInfo * | getInputIdentifier (unsigned i) const |
| StringRef | getInputName (unsigned i) const |
| StringRef | getInputConstraint (unsigned i) const |
| getInputConstraint - Return the specified input constraint. More... | |
| const StringLiteral * | getInputConstraintLiteral (unsigned i) const |
| StringLiteral * | getInputConstraintLiteral (unsigned i) |
| Expr * | getInputExpr (unsigned i) |
| void | setInputExpr (unsigned i, Expr *E) |
| const Expr * | getInputExpr (unsigned i) const |
| int | getNamedOperand (StringRef SymbolicName) const |
| getNamedOperand - Given a symbolic operand reference like %[foo], translate this into a numeric value needed to reference the same operand. More... | |
| StringRef | getClobber (unsigned i) const |
| StringLiteral * | getClobberStringLiteral (unsigned i) |
| const StringLiteral * | getClobberStringLiteral (unsigned i) const |
| SourceLocation | getLocStart () const LLVM_READONLY |
| SourceLocation | getLocEnd () const LLVM_READONLY |
Public Member Functions inherited from clang::AsmStmt | |
| 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 Expr * | getOutputExpr (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 Expr * | getInputExpr (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) |
Static Public Member Functions inherited from clang::AsmStmt | |
| static bool | classof (const Stmt *T) |
Friends | |
| class | ASTStmtReader |
Additional Inherited Members | |
Public Types inherited from clang::AsmStmt | |
| 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 |
Protected Member Functions inherited from clang::AsmStmt | |
| AsmStmt (StmtClass SC, SourceLocation asmloc, bool issimple, bool isvolatile, unsigned numoutputs, unsigned numinputs, unsigned numclobbers) | |
Protected Attributes inherited from clang::AsmStmt | |
| 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 |
| GCCAsmStmt::GCCAsmStmt | ( | const ASTContext & | C, |
| SourceLocation | asmloc, | ||
| bool | issimple, | ||
| bool | isvolatile, | ||
| unsigned | numoutputs, | ||
| unsigned | numinputs, | ||
| IdentifierInfo ** | names, | ||
| StringLiteral ** | constraints, | ||
| Expr ** | exprs, | ||
| StringLiteral * | asmstr, | ||
| unsigned | numclobbers, | ||
| StringLiteral ** | clobbers, | ||
| SourceLocation | rparenloc | ||
| ) |
Definition at line 684 of file Stmt.cpp.
References AttributeLangSupport::C, and clang::AsmStmt::NumInputs.
|
inlineexplicit |
| unsigned GCCAsmStmt::AnalyzeAsmString | ( | SmallVectorImpl< AsmStringPiece > & | Pieces, |
| const ASTContext & | C, | ||
| unsigned & | DiagOffs | ||
| ) | const |
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
If the asm string is erroneous, emit errors and return true, otherwise return false.
Definition at line 475 of file Stmt.cpp.
References getAsmString(), clang::ASTContext::getLangOpts(), clang::StringLiteral::getLocationOfByte(), getNamedOperand(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::AsmStmt::getNumPlusOperands(), clang::ASTContext::getSourceManager(), clang::StringLiteral::getString(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasNoAsmVariants(), clang::isDigit(), clang::isLetter(), clang::AsmStmt::isSimple(), clang::Result, and SM.
Referenced by clang::Sema::ActOnGCCAsmStmt(), and generateAsmString().
| std::string GCCAsmStmt::generateAsmString | ( | const ASTContext & | C | ) | const |
Assemble final IR asm string.
Assemble final IR asm string (GCC-style).
Definition at line 643 of file Stmt.cpp.
References AnalyzeAsmString(), and clang::getModifier().
|
inline |
Definition at line 1570 of file Stmt.h.
Referenced by AnalyzeAsmString().
|
inline |
| StringRef GCCAsmStmt::getClobber | ( | unsigned | i | ) | const |
Definition at line 393 of file Stmt.cpp.
References getClobberStringLiteral(), and clang::StringLiteral::getString().
|
inline |
Definition at line 1707 of file Stmt.h.
Referenced by getClobber().
|
inline |
| StringRef GCCAsmStmt::getInputConstraint | ( | unsigned | i | ) | const |
getInputConstraint - Return the specified input constraint.
Unlike output constraints, these can be empty.
Definition at line 417 of file Stmt.cpp.
References getInputConstraintLiteral(), and clang::StringLiteral::getString().
|
inline |
Definition at line 1674 of file Stmt.h.
Referenced by getInputConstraint().
|
inline |
Definition at line 408 of file Stmt.cpp.
References clang::AsmStmt::Exprs, and clang::AsmStmt::NumOutputs.
Referenced by clang::Sema::ActOnGCCAsmStmt().
|
inline |
|
inline |
Definition at line 1665 of file Stmt.h.
Referenced by getNamedOperand().
|
inline |
|
inline |
| int GCCAsmStmt::getNamedOperand | ( | StringRef | SymbolicName | ) | const |
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.
Definition at line 455 of file Stmt.cpp.
References getInputName(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), and getOutputName().
Referenced by AnalyzeAsmString().
| StringRef GCCAsmStmt::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 404 of file Stmt.cpp.
References getOutputConstraintLiteral(), and clang::StringLiteral::getString().
|
inline |
Definition at line 1646 of file Stmt.h.
Referenced by getOutputConstraint().
|
inline |
Definition at line 397 of file Stmt.cpp.
References clang::AsmStmt::Exprs.
Referenced by clang::Sema::ActOnGCCAsmStmt().
|
inline |
|
inline |
Definition at line 1637 of file Stmt.h.
Referenced by getNamedOperand().
|
inline |
|
inline |
Definition at line 411 of file Stmt.cpp.
References E, clang::AsmStmt::Exprs, and clang::AsmStmt::NumOutputs.
Referenced by clang::Sema::ActOnGCCAsmStmt().
|
inline |
|
friend |
1.8.6