#include "clang/AST/ASTContext.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Parse/Parser.h"
#include "clang/Parse/RAIIObjectsForParser.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCParser/MCAsmParser.h"
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetSelect.h"
usingnamespaceclang;
namespace {
class ClangAsmParserCallback : public llvm::MCAsmParserSemaCallback { … };
}
void ClangAsmParserCallback::LookupInlineAsmIdentifier(
StringRef &LineBuf, llvm::InlineAsmIdentifierInfo &Info,
bool IsUnevaluatedContext) { … }
StringRef ClangAsmParserCallback::LookupInlineAsmLabel(StringRef Identifier,
llvm::SourceMgr &LSM,
llvm::SMLoc Location,
bool Create) { … }
void ClangAsmParserCallback::findTokensForString(
StringRef Str, SmallVectorImpl<Token> &TempToks,
const Token *&FirstOrigToken) const { … }
SourceLocation
ClangAsmParserCallback::translateLocation(const llvm::SourceMgr &LSM,
llvm::SMLoc SMLoc) { … }
void ClangAsmParserCallback::handleDiagnostic(const llvm::SMDiagnostic &D) { … }
ExprResult Parser::ParseMSAsmIdentifier(llvm::SmallVectorImpl<Token> &LineToks,
unsigned &NumLineToksConsumed,
bool IsUnevaluatedContext) { … }
static bool buildMSAsmString(Preprocessor &PP, SourceLocation AsmLoc,
ArrayRef<Token> AsmToks,
SmallVectorImpl<unsigned> &TokOffsets,
SmallString<512> &Asm) { … }
bool Parser::isGCCAsmStatement(const Token &TokAfterAsm) const { … }
bool Parser::isGNUAsmQualifier(const Token &TokAfterAsm) const { … }
StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { … }
bool Parser::parseGNUAsmQualifierListOpt(GNUAsmQualifiers &AQ) { … }
StmtResult Parser::ParseAsmStatement(bool &msAsm) { … }
bool Parser::ParseAsmOperandsOpt(SmallVectorImpl<IdentifierInfo *> &Names,
SmallVectorImpl<Expr *> &Constraints,
SmallVectorImpl<Expr *> &Exprs) { … }
const char *Parser::GNUAsmQualifiers::getQualifierName(AQ Qualifier) { … }
Parser::GNUAsmQualifiers::AQ
Parser::getGNUAsmQualifier(const Token &Tok) const { … }
bool Parser::GNUAsmQualifiers::setAsmQualifier(AQ Qualifier) { … }