diff options
| author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2024-05-23 10:09:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 10:09:22 +0100 |
| commit | 8930ba98e01bc66949e482b396f8389d64388359 (patch) | |
| tree | 3e8919c50e88ea76663ae05f0bf2b2733eabc3aa /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | bf4d99e16789dd711eb61b36ce92b8519f450dd5 (diff) | |
[clang][FMV] Allow declaration of function versions in namespaces. (#93044)
Fixes the following bug:
namespace Name {
int __attribute((target_version("default"))) foo() { return 0; }
}
namespace Name {
int __attribute((target_version("sve"))) foo() { return 1; }
}
int bar() { return Name::foo(); }
error: redefinition of 'foo'
int __attribute((target_version("sve"))) foo() { return 1; }
note: previous definition is here
int __attribute((target_version("default"))) foo() { return 0; }
While fixing this I also found that in the absence of default version
declaration, the one we implicitly create has incorrect mangling if
we are in a namespace:
namespace OtherName {
int __attribute((target_version("sve"))) foo() { return 2; }
}
int baz() { return OtherName::foo(); }
In this example instead of creating a declaration for the symbol
@_ZN9OtherName3fooEv.default we are creating one for the symbol
@_Z3foov.default (the namespace mangling prefix is omitted).
This has now been fixed.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
