mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	to improve compatibility with GNU as. Based on a patch by PaX Team. Fixed assertion failures on non-Darwin and added additional test cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164248 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			33 lines
		
	
	
		
			859 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			859 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===-- MCAsmLexer.cpp - Abstract Asm Lexer 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/MCAsmLexer.h"
 | |
| #include "llvm/Support/SourceMgr.h"
 | |
| 
 | |
| using namespace llvm;
 | |
| 
 | |
| MCAsmLexer::MCAsmLexer() : CurTok(AsmToken::Error, StringRef()),
 | |
|                            TokStart(0), SkipSpace(true) {
 | |
| }
 | |
| 
 | |
| MCAsmLexer::~MCAsmLexer() {
 | |
| }
 | |
| 
 | |
| SMLoc MCAsmLexer::getLoc() const {
 | |
|   return SMLoc::getFromPointer(TokStart);
 | |
| }
 | |
| 
 | |
| SMLoc AsmToken::getLoc() const {
 | |
|   return SMLoc::getFromPointer(Str.data());
 | |
| }
 | |
| 
 | |
| SMLoc AsmToken::getEndLoc() const {
 | |
|   return SMLoc::getFromPointer(Str.data() + Str.size() - 1);
 | |
| }
 |