Gabor Greif | afb4e8c | 2008-05-20 22:07:21 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -o /dev/null -f |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 2 | |
| 3 | ; Method arguments were being checked for collisions at the global scope before |
Tanya Lattner | 74bb9f5 | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 4 | ; the method object was created by the parser. Because of this, false |
| 5 | ; collisions could occur that would cause the following error message to be |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 6 | ; produced: |
| 7 | ; |
| 8 | ; Redefinition of value named 'X' in the 'int *' type plane! |
| 9 | ; |
| 10 | ; Fixed by delaying binding of variable names until _after_ the method symtab is |
| 11 | ; created. |
| 12 | ; |
Tanya Lattner | 74bb9f5 | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 13 | @X = global i32 4 ; <i32*> [#uses=0] |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 14 | |
Tanya Lattner | 74bb9f5 | 2008-02-14 07:57:12 +0000 | [diff] [blame] | 15 | declare i32 @xxx(i32*) |