ispc/ispc — Issue #129: Function declarations inside functions don't work
Author: mmp
Created: 2011-12-05 13:39:40+00:00
State: open
Labels: bugs

The following code:

```
int foo(int v) {
int inc(int v);
inc(v);
}
```

Fails and hits an assertion. The basic issue is that we've never created an llvm::Function * for the "inc" symbol. Note also that we need to maintain a persistent representation of the declared function -> function symbol (and thence llvm::Function * mapping) beyond the scope in which a function like this is declared locally, so that if another function also has a local declaration of the same external function, it gets the same symbol/llvm::Function *...