mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	These linkages were introduced some time ago, but it was never very clear what exactly their semantics were or what they should be used for. Some investigation found these uses: * utf-16 strings in clang. * non-unnamed_addr strings produced by the sanitizers. It turns out they were just working around a more fundamental problem. For some sections a MachO linker needs a symbol in order to split the section into atoms, and llvm had no idea that was the case. I fixed that in r201700 and it is now safe to use the private linkage. When the object ends up in a section that requires symbols, llvm will use a 'l' prefix instead of a 'L' prefix and things just work. With that, these linkages were already dead, but there was a potential future user in the objc metadata information. I am still looking at CGObjcMac.cpp, but at this point I am convinced that linker_private and linker_private_weak are not what they need. The objc uses are currently split in * Regular symbols (no '\01' prefix). LLVM already directly provides whatever semantics they need. * Uses of a private name (start with "\01L" or "\01l") and private linkage. We can drop the "\01L" and "\01l" prefixes as soon as llvm agrees with clang on L being ok or not for a given section. I have two patches in code review for this. * Uses of private name and weak linkage. The last case is the one that one could think would fit one of these linkages. That is not the case. The semantics are * the linker will merge these symbol by *name*. * the linker will hide them in the final DSO. Given that the merging is done by name, any of the private (or internal) linkages would be a bad match. They allow llvm to rename the symbols, and that is really not what we want. From the llvm point of view, these objects should really be (linkonce|weak)(_odr)?. For now, just keeping the "\01l" prefix is probably the best for these symbols. If we one day want to have a more direct support in llvm, IMHO what we should add is not a linkage, it is just a hidden_symbol attribute. It would be applicable to multiple linkages. For example, on weak it would produce the current behavior we have for objc metadata. On internal, it would be equivalent to private (and we should then remove private). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203866 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			109 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
			
		
		
	
	
			109 lines
		
	
	
		
			4.4 KiB
		
	
	
	
		
			VimL
		
	
	
	
	
	
| " Vim syntax file
 | |
| " Language:   llvm
 | |
| " Maintainer: The LLVM team, http://llvm.org/
 | |
| " Version:      $Revision$
 | |
| 
 | |
| if version < 600
 | |
|   syntax clear
 | |
| elseif exists("b:current_syntax")
 | |
|   finish
 | |
| endif
 | |
| 
 | |
| syn case match
 | |
| 
 | |
| " Types.
 | |
| " Types also include struct, array, vector, etc. but these don't
 | |
| " benefit as much from having dedicated highlighting rules.
 | |
| syn keyword llvmType void half float double x86_fp80 fp128 ppc_fp128
 | |
| syn keyword llvmType label metadata x86_mmx
 | |
| syn keyword llvmType type label opaque
 | |
| syn match   llvmType /\<i\d\+\>/
 | |
| 
 | |
| " Instructions.
 | |
| " The true and false tokens can be used for comparison opcodes, but it's
 | |
| " much more common for these tokens to be used for boolean constants.
 | |
| syn keyword llvmStatement add addrspacecast alloca and arcp ashr atomicrmw
 | |
| syn keyword llvmStatement bitcast br call cmpxchg eq exact extractelement
 | |
| syn keyword llvmStatement extractvalue fadd fast fcmp fdiv fence fmul fpext
 | |
| syn keyword llvmStatement fptosi fptoui fptrunc free frem fsub getelementptr
 | |
| syn keyword llvmStatement icmp inbounds indirectbr insertelement insertvalue
 | |
| syn keyword llvmStatement inttoptr invoke landingpad load lshr malloc max min
 | |
| syn keyword llvmStatement mul nand ne ninf nnan nsw nsz nuw oeq oge ogt ole
 | |
| syn keyword llvmStatement olt one or ord phi ptrtoint resume ret sdiv select
 | |
| syn keyword llvmStatement sext sge sgt shl shufflevector sitofp sle slt srem
 | |
| syn keyword llvmStatement store sub switch trunc udiv ueq uge ugt uitofp ule ult
 | |
| syn keyword llvmStatement umax umin une uno unreachable unwind urem va_arg
 | |
| syn keyword llvmStatement xchg xor zext
 | |
| 
 | |
| " Keywords.
 | |
| syn keyword llvmKeyword acq_rel acquire sanitize_address addrspace alias align
 | |
| syn keyword llvmKeyword alignstack alwaysinline appending arm_aapcs_vfpcc
 | |
| syn keyword llvmKeyword arm_aapcscc arm_apcscc asm atomic available_externally
 | |
| syn keyword llvmKeyword blockaddress byval c catch cc ccc cleanup coldcc common
 | |
| syn keyword llvmKeyword constant datalayout declare default define deplibs
 | |
| syn keyword llvmKeyword dllexport dllimport except extern_weak external fastcc
 | |
| syn keyword llvmKeyword filter gc global hidden initialexec inlinehint inreg
 | |
| syn keyword llvmKeyword intel_ocl_bicc inteldialect internal
 | |
| syn keyword llvmKeyword linkonce linkonce_odr
 | |
| syn keyword llvmKeyword localdynamic localexec minsize module monotonic
 | |
| syn keyword llvmKeyword msp430_intrcc naked nest noalias nocapture
 | |
| syn keyword llvmKeyword noimplicitfloat noinline nonlazybind noredzone noreturn
 | |
| syn keyword llvmKeyword nounwind optnone optsize personality private protected
 | |
| syn keyword llvmKeyword ptx_device ptx_kernel readnone readonly release
 | |
| syn keyword llvmKeyword returns_twice sanitize_thread sanitize_memory
 | |
| syn keyword llvmKeyword section seq_cst sideeffect signext singlethread
 | |
| syn keyword llvmKeyword spir_func spir_kernel sret ssp sspreq sspstrong
 | |
| syn keyword llvmKeyword tail target thread_local to triple unnamed_addr
 | |
| syn keyword llvmKeyword unordered uwtable volatile weak weak_odr
 | |
| syn keyword llvmKeyword x86_fastcallcc x86_stdcallcc x86_thiscallcc x86_64_sysvcc
 | |
| syn keyword llvmKeyword x86_64_win64cc zeroext
 | |
| 
 | |
| " Obsolete keywords.
 | |
| syn keyword llvmError  getresult begin end
 | |
| 
 | |
| " Misc syntax.
 | |
| syn match   llvmNoName /[%@]\d\+\>/
 | |
| syn match   llvmNumber /-\?\<\d\+\>/
 | |
| syn match   llvmFloat  /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/
 | |
| syn match   llvmFloat  /\<0x\x\+\>/
 | |
| syn keyword llvmBoolean true false
 | |
| syn keyword llvmConstant zeroinitializer undef null
 | |
| syn match   llvmComment /;.*$/
 | |
| syn region  llvmString start=/"/ skip=/\\"/ end=/"/
 | |
| syn match   llvmLabel /[-a-zA-Z$._][-a-zA-Z$._0-9]*:/
 | |
| syn match   llvmIdentifier /[%@][-a-zA-Z$._][-a-zA-Z$._0-9]*/
 | |
| 
 | |
| " Syntax-highlight dejagnu test commands.
 | |
| syn match  llvmSpecialComment /;\s*RUN:.*$/
 | |
| syn match  llvmSpecialComment /;\s*PR\d*\s*$/
 | |
| syn match  llvmSpecialComment /;\s*END\.\s*$/
 | |
| syn match  llvmSpecialComment /;\s*XFAIL:.*$/
 | |
| 
 | |
| if version >= 508 || !exists("did_c_syn_inits")
 | |
|   if version < 508
 | |
|     let did_c_syn_inits = 1
 | |
|     command -nargs=+ HiLink hi link <args>
 | |
|   else
 | |
|     command -nargs=+ HiLink hi def link <args>
 | |
|   endif
 | |
| 
 | |
|   HiLink llvmType Type
 | |
|   HiLink llvmStatement Statement
 | |
|   HiLink llvmNumber Number
 | |
|   HiLink llvmComment Comment
 | |
|   HiLink llvmString String
 | |
|   HiLink llvmLabel Label
 | |
|   HiLink llvmKeyword Keyword
 | |
|   HiLink llvmBoolean Boolean
 | |
|   HiLink llvmFloat Float
 | |
|   HiLink llvmNoName Identifier
 | |
|   HiLink llvmConstant Constant
 | |
|   HiLink llvmSpecialComment SpecialComment
 | |
|   HiLink llvmError Error
 | |
|   HiLink llvmIdentifier Identifier
 | |
| 
 | |
|   delcommand HiLink
 | |
| endif
 | |
| 
 | |
| let b:current_syntax = "llvm"
 |