clang  3.9.0
Functions
SemaStmtAsm.cpp File Reference
#include "clang/Sema/SemaInternal.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
Include dependency graph for SemaStmtAsm.cpp:

Go to the source code of this file.

Functions

static bool CheckAsmLValue (const Expr *E, Sema &S)
 CheckAsmLValue - GNU C has an extremely ugly extension whereby they silently ignore "noop" casts in places where an lvalue is required by an inline asm. More...
 
static bool isOperandMentioned (unsigned OpNo, ArrayRef< GCCAsmStmt::AsmStringPiece > AsmStrPieces)
 isOperandMentioned - Return true if the specified operand # is mentioned anywhere in the decomposed asm string. More...
 
static bool CheckNakedParmReference (Expr *E, Sema &S)
 
static bool checkExprMemoryConstraintCompat (Sema &S, Expr *E, TargetInfo::ConstraintInfo &Info, bool is_input_expr)
 Returns true if given expression is not compatible with inline assembly's memory constraint; false otherwise. More...
 
static void fillInlineAsmTypeInfo (const ASTContext &Context, QualType T, llvm::InlineAsmIdentifierInfo &Info)
 

Function Documentation

static bool CheckAsmLValue ( const Expr E,
Sema S 
)
static

CheckAsmLValue - GNU C has an extremely ugly extension whereby they silently ignore "noop" casts in places where an lvalue is required by an inline asm.

We emulate this behavior when -fheinous-gnu-extensions is specified, but provide a strong guidance to not use it.

This method checks to see if the argument is an acceptable l-value and returns false if it is a case we can handle.

Definition at line 37 of file SemaStmtAsm.cpp.

References clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::Expr::IgnoreParenNoopCasts(), clang::Expr::isLValue(), and clang::Expr::isTypeDependent().

Referenced by clang::Sema::ActOnGCCAsmStmt().

static bool checkExprMemoryConstraintCompat ( Sema S,
Expr E,
TargetInfo::ConstraintInfo Info,
bool  is_input_expr 
)
static

Returns true if given expression is not compatible with inline assembly's memory constraint; false otherwise.

Definition at line 112 of file SemaStmtAsm.cpp.

References clang::Sema::Diag(), clang::TargetInfo::ConstraintInfo::getConstraintStr(), clang::Expr::refersToBitField(), clang::Expr::refersToGlobalRegisterVar(), and clang::Expr::refersToVectorElement().

Referenced by clang::Sema::ActOnGCCAsmStmt().

static bool CheckNakedParmReference ( Expr E,
Sema S 
)
static
static void fillInlineAsmTypeInfo ( const ASTContext Context,
QualType  T,
llvm::InlineAsmIdentifierInfo &  Info 
)
static
static bool isOperandMentioned ( unsigned  OpNo,
ArrayRef< GCCAsmStmt::AsmStringPiece AsmStrPieces 
)
static

isOperandMentioned - Return true if the specified operand # is mentioned anywhere in the decomposed asm string.

Definition at line 65 of file SemaStmtAsm.cpp.

References clang::GCCAsmStmt::AsmStringPiece::getOperandNo(), and clang::GCCAsmStmt::AsmStringPiece::isOperand().

Referenced by clang::Sema::ActOnGCCAsmStmt().