mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116779 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| //===- lib/MC/MCObjectFormat.cpp - MCObjectFormat implementation ----------===//
 | |
| //
 | |
| //                     The LLVM Compiler Infrastructure
 | |
| //
 | |
| // This file is distributed under the University of Illinois Open Source
 | |
| // License. See LICENSE.TXT for details.
 | |
| //
 | |
| //===----------------------------------------------------------------------===//
 | |
| 
 | |
| #include "llvm/MC/MCObjectFormat.h"
 | |
| #include "llvm/MC/MCSymbol.h"
 | |
| 
 | |
| using namespace llvm;
 | |
| 
 | |
| MCObjectFormat::~MCObjectFormat() {
 | |
| }
 | |
| 
 | |
| bool MCELFObjectFormat::isAbsolute(bool IsSet, const MCSymbol &A,
 | |
|                                    const MCSymbol &B) const {
 | |
|   // On ELF A - B is absolute if A and B are in the same section.
 | |
|   return &A.getSection() == &B.getSection();
 | |
| }
 | |
| 
 | |
| bool MCMachOObjectFormat::isAbsolute(bool IsSet, const MCSymbol &A,
 | |
|                                      const MCSymbol &B) const  {
 | |
|   // On MachO A - B is absolute only if in a set.
 | |
|   return IsSet;
 | |
| }
 | |
| 
 | |
| bool MCCOFFObjectFormat::isAbsolute(bool IsSet, const MCSymbol &A,
 | |
|                                     const MCSymbol &B) const  {
 | |
|   // On COFF A - B is absolute if A and B are in the same section.
 | |
|   return &A.getSection() == &B.getSection();
 | |
| }
 |