versioner: follow __asm__ labels.
Attribute the versioning information on `void foo() __asm("bar")` to bar, not foo. The various long double functions in <math.h> run into this. Bug: https://github.com/android-ndk/ndk/issues/440 Test: python run_tests.py Test: m Change-Id: Idd3681ddbd006b4705608449935c9cfacfa3556e
This commit is contained in:
parent
dfece7a3ee
commit
38685e1887
1 changed files with 5 additions and 0 deletions
|
@ -54,6 +54,11 @@ class Visitor : public RecursiveASTVisitor<Visitor> {
|
|||
}
|
||||
}
|
||||
|
||||
// <math.h> maps fool onto foo on 32-bit, since long double is the same as double.
|
||||
if (auto asm_attr = decl->getAttr<AsmLabelAttr>()) {
|
||||
return asm_attr->getLabel();
|
||||
}
|
||||
|
||||
// The decl might not have a name (e.g. bitfields).
|
||||
if (auto identifier = decl->getIdentifier()) {
|
||||
if (mangler->shouldMangleDeclName(decl)) {
|
||||
|
|
Loading…
Reference in a new issue