Add testcase for prev. commit. Minor fixes
llvm-svn: 48686
This commit is contained in:
		
							parent
							
								
									25b2e8203a
								
							
						
					
					
						commit
						3f7fab913d
					
				| 
						 | 
					@ -378,10 +378,10 @@ void Verifier::visitGlobalAlias(GlobalAlias &GA) {
 | 
				
			||||||
            &GA);
 | 
					            &GA);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const GlobalValue* Aliasee = GA.resolveAliasedGlobal();
 | 
				
			||||||
  const GlobalValue* Aliasee = GA.resolveAliasedGlobal();
 | 
					  const GlobalValue* Aliasee = GA.resolveAliasedGlobal();
 | 
				
			||||||
  Assert1(Aliasee,
 | 
					  Assert1(Aliasee,
 | 
				
			||||||
          "Aliasing chain should end with global function or global variable",
 | 
					          "Aliasing chain should end with function or global variable", &GA);
 | 
				
			||||||
          &GA);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  visitGlobalValue(GA);
 | 
					  visitGlobalValue(GA);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					; RUN:  not llvm-as -f %s -o /dev/null |& grep {Aliasing chain should end with function or global variable}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					; Test that alising chain does not create a cycle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@b1 = alias i32* @c1
 | 
				
			||||||
 | 
					@c1 = alias i32* @b1
 | 
				
			||||||
		Loading…
	
		Reference in New Issue