This check was put in place to prevent static functions
from translation units outside the one that the current
expression is evaluated from, from taking precedence over functions
in the global namespace. However, this is really a different
bug. LLDB lumps functions from all CUs into a single AST and
ends up picking the file-static even when C++ context rules
wouldn't allow that to happen.
This patch removes the check so we apply the AsmLabel to all
FunctionDecls we create from DWARF if we have a linkage name
available. This makes the code-path easier to reason about and
allows calling static functions in contexts where we previously
would've chosen the wrong function.
We also flip the XFAILs in the API test to reflect what effect
this change has.
Testing
- Fixed API tests and added XFAIL
should probably move this to the appropriate test-function that isn't xfailed so we don't spin up an lldb instance just for this