mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	s/AddDirectiveHandler/addDirectiveHandler/ s/ParseMSInlineAsm/parseMSInlineAsm/ s/ParseIdentifier/parseIdentifier/ s/ParseStringToEndOfStatement/parseStringToEndOfStatement/ s/ParseEscapedString/parseEscapedString/ s/EatToEndOfStatement/eatToEndOfStatement/ s/ParseExpression/parseExpression/ s/ParseParenExpression/parseParenExpression/ s/ParseAbsoluteExpression/parseAbsoluteExpression/ s/CheckForValidSection/checkForValidSection/ http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===-- MCAsmParser.cpp - Abstract Asm Parser Interface -------------------===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include "llvm/MC/MCParser/MCAsmParser.h"
 | |
| #include "llvm/ADT/Twine.h"
 | |
| #include "llvm/MC/MCParser/MCAsmLexer.h"
 | |
| #include "llvm/MC/MCParser/MCParsedAsmOperand.h"
 | |
| #include "llvm/MC/MCTargetAsmParser.h"
 | |
| #include "llvm/Support/Debug.h"
 | |
| #include "llvm/Support/SourceMgr.h"
 | |
| #include "llvm/Support/raw_ostream.h"
 | |
| using namespace llvm;
 | |
| 
 | |
| MCAsmParser::MCAsmParser() : TargetParser(0), ShowParsedOperands(0) {
 | |
| }
 | |
| 
 | |
| MCAsmParser::~MCAsmParser() {
 | |
| }
 | |
| 
 | |
| void MCAsmParser::setTargetParser(MCTargetAsmParser &P) {
 | |
|   assert(!TargetParser && "Target parser is already initialized!");
 | |
|   TargetParser = &P;
 | |
|   TargetParser->Initialize(*this);
 | |
| }
 | |
| 
 | |
| const AsmToken &MCAsmParser::getTok() {
 | |
|   return getLexer().getTok();
 | |
| }
 | |
| 
 | |
| bool MCAsmParser::TokError(const Twine &Msg, ArrayRef<SMRange> Ranges) {
 | |
|   Error(getLexer().getLoc(), Msg, Ranges);
 | |
|   return true;
 | |
| }
 | |
| 
 | |
| bool MCAsmParser::parseExpression(const MCExpr *&Res) {
 | |
|   SMLoc L;
 | |
|   return parseExpression(Res, L);
 | |
| }
 | |
| 
 | |
| void MCParsedAsmOperand::dump() const {
 | |
| #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 | |
|   dbgs() << "  " << *this;
 | |
| #endif
 | |
| }
 |