clang API Documentation
#include <Stmt.h>
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 682 of file Stmt.cpp.
References AttributeLangSupport::C, and clang::AsmStmt::NumInputs.
clang::GCCAsmStmt::GCCAsmStmt | ( | EmptyShell | Empty | ) | [inline, explicit] |
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
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.
Definition at line 467 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(), and SM.
Referenced by clang::Sema::ActOnGCCAsmStmt(), and generateAsmString().
static bool clang::GCCAsmStmt::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::AsmStmt.
Definition at line 1716 of file Stmt.h.
References clang::Stmt::getStmtClass().
std::string GCCAsmStmt::generateAsmString | ( | const ASTContext & | C | ) | const |
Assemble final IR asm string.
Assemble final IR asm string (GCC-style).
Reimplemented from clang::AsmStmt.
Definition at line 635 of file Stmt.cpp.
References AnalyzeAsmString().
const StringLiteral* clang::GCCAsmStmt::getAsmString | ( | ) | const [inline] |
Definition at line 1571 of file Stmt.h.
Referenced by AnalyzeAsmString().
StringLiteral* clang::GCCAsmStmt::getAsmString | ( | ) | [inline] |
StringRef GCCAsmStmt::getClobber | ( | unsigned | i | ) | const |
Reimplemented from clang::AsmStmt.
Definition at line 385 of file Stmt.cpp.
References getClobberStringLiteral(), and clang::StringLiteral::getString().
StringLiteral* clang::GCCAsmStmt::getClobberStringLiteral | ( | unsigned | i | ) | [inline] |
Definition at line 1708 of file Stmt.h.
Referenced by getClobber().
const StringLiteral* clang::GCCAsmStmt::getClobberStringLiteral | ( | unsigned | i | ) | const [inline] |
StringRef GCCAsmStmt::getInputConstraint | ( | unsigned | i | ) | const |
getInputConstraint - Return the specified input constraint. Unlike output constraints, these can be empty.
Reimplemented from clang::AsmStmt.
Definition at line 409 of file Stmt.cpp.
References getInputConstraintLiteral(), and clang::StringLiteral::getString().
const StringLiteral* clang::GCCAsmStmt::getInputConstraintLiteral | ( | unsigned | i | ) | const [inline] |
Definition at line 1675 of file Stmt.h.
References clang::AsmStmt::NumOutputs.
Referenced by getInputConstraint().
StringLiteral* clang::GCCAsmStmt::getInputConstraintLiteral | ( | unsigned | i | ) | [inline] |
Definition at line 1678 of file Stmt.h.
References clang::AsmStmt::NumOutputs.
Expr * GCCAsmStmt::getInputExpr | ( | unsigned | i | ) |
Definition at line 400 of file Stmt.cpp.
References clang::AsmStmt::Exprs, and clang::AsmStmt::NumOutputs.
Referenced by getInputExpr().
const Expr* clang::GCCAsmStmt::getInputExpr | ( | unsigned | i | ) | const [inline] |
Reimplemented from clang::AsmStmt.
Definition at line 1685 of file Stmt.h.
References getInputExpr().
IdentifierInfo* clang::GCCAsmStmt::getInputIdentifier | ( | unsigned | i | ) | const [inline] |
Definition at line 1662 of file Stmt.h.
References clang::AsmStmt::NumOutputs.
Referenced by getInputName().
StringRef clang::GCCAsmStmt::getInputName | ( | unsigned | i | ) | const [inline] |
Definition at line 1666 of file Stmt.h.
References getInputIdentifier().
Referenced by getNamedOperand().
SourceLocation clang::GCCAsmStmt::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::AsmStmt.
SourceLocation clang::GCCAsmStmt::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::AsmStmt.
Definition at line 1713 of file Stmt.h.
References clang::AsmStmt::AsmLoc.
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 447 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 '+').
Reimplemented from clang::AsmStmt.
Definition at line 396 of file Stmt.cpp.
References getOutputConstraintLiteral(), and clang::StringLiteral::getString().
const StringLiteral* clang::GCCAsmStmt::getOutputConstraintLiteral | ( | unsigned | i | ) | const [inline] |
Definition at line 1647 of file Stmt.h.
Referenced by getOutputConstraint().
StringLiteral* clang::GCCAsmStmt::getOutputConstraintLiteral | ( | unsigned | i | ) | [inline] |
Definition at line 389 of file Stmt.cpp.
References clang::AsmStmt::Exprs.
Referenced by getOutputExpr().
const Expr* clang::GCCAsmStmt::getOutputExpr | ( | unsigned | i | ) | const [inline] |
Reimplemented from clang::AsmStmt.
Definition at line 1656 of file Stmt.h.
References getOutputExpr().
IdentifierInfo* clang::GCCAsmStmt::getOutputIdentifier | ( | unsigned | i | ) | const [inline] |
Definition at line 1634 of file Stmt.h.
Referenced by getOutputName().
StringRef clang::GCCAsmStmt::getOutputName | ( | unsigned | i | ) | const [inline] |
Definition at line 1638 of file Stmt.h.
References getOutputIdentifier().
Referenced by getNamedOperand().
SourceLocation clang::GCCAsmStmt::getRParenLoc | ( | ) | const [inline] |
void clang::GCCAsmStmt::setAsmString | ( | StringLiteral * | E | ) | [inline] |
void GCCAsmStmt::setInputExpr | ( | unsigned | i, |
Expr * | E | ||
) |
Definition at line 403 of file Stmt.cpp.
References clang::AsmStmt::Exprs, and clang::AsmStmt::NumOutputs.
Referenced by clang::Sema::ActOnGCCAsmStmt().
void clang::GCCAsmStmt::setRParenLoc | ( | SourceLocation | L | ) | [inline] |
friend class ASTStmtReader [friend] |
Reimplemented from clang::AsmStmt.