mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Summary: In case of functions that have a pointer argument and only pass it to each other, the function attributes pass deduces that the pointer should get the readnone attribute, but fails to remove a readonly attribute that may already have been present. Reviewers: nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9995 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238152 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			14 lines
		
	
	
		
			295 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			295 B
		
	
	
	
		
			LLVM
		
	
	
	
	
	
| ; RUN: opt < %s -functionattrs -S | FileCheck %s
 | |
| 
 | |
| ; CHECK: define void @bar(i8* nocapture readnone)
 | |
| define void @bar(i8* readonly) {
 | |
|   call void @foo(i8* %0)
 | |
|     ret void
 | |
| }
 | |
| 
 | |
| ; CHECK: define void @foo(i8* nocapture readnone)
 | |
| define void @foo(i8* readonly) {
 | |
|   call void @bar(i8* %0)
 | |
|   ret void
 | |
| }
 |