Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o /dev/null |
Duncan P. N. Exon Smith | 13f5c58 | 2014-08-19 21:08:27 +0000 | [diff] [blame] | 2 | ; RUN: verify-uselistorder %s |
Tanya Lattner | e7e3f2e | 2004-11-06 22:07:09 +0000 | [diff] [blame] | 3 | |
Chris Lattner | 57232c5 | 2002-03-08 18:41:11 +0000 | [diff] [blame] | 4 | ; Method arguments were being checked for collisions at the global scope before |
Tanya Lattner | 6e9bcee | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 5 | ; the method object was created by the parser. Because of this, false |
| 6 | ; collisions could occur that would cause the following error message to be |
Reid Spencer | d7c2c2f | 2006-12-02 20:34:08 +0000 | [diff] [blame] | 7 | ; produced: |
Chris Lattner | 57232c5 | 2002-03-08 18:41:11 +0000 | [diff] [blame] | 8 | ; |
| 9 | ; Redefinition of value named 'X' in the 'int *' type plane! |
| 10 | ; |
| 11 | ; Fixed by delaying binding of variable names until _after_ the method symtab is |
| 12 | ; created. |
| 13 | ; |
Tanya Lattner | 6e9bcee | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 14 | @X = global i32 4 ; <i32*> [#uses=0] |
Chris Lattner | 57232c5 | 2002-03-08 18:41:11 +0000 | [diff] [blame] | 15 | |
Tanya Lattner | 6e9bcee | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 16 | declare i32 @xxx(i32*) |