forked from OSchip/llvm-project
parent
d8fe9af3a2
commit
e6eab983f4
|
@ -1887,7 +1887,7 @@ NamedDecl * Sema::DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II)
|
|||
/// DeclApplyPragmaWeak - A declaration (maybe definition) needs #pragma weak
|
||||
/// applied to it, possibly with an alias.
|
||||
void Sema::DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W) {
|
||||
if (!W.getUsed()) { // only do this once
|
||||
if (W.getUsed()) return; // only do this once
|
||||
W.setUsed(true);
|
||||
if (W.getAlias()) { // clone decl, impersonate __attribute(weak,alias(...))
|
||||
IdentifierInfo *NDId = ND->getIdentifier();
|
||||
|
@ -1905,7 +1905,6 @@ void Sema::DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W) {
|
|||
ND->addAttr(::new (Context) WeakAttr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// ProcessDeclAttributes - Given a declarator (PD) with attributes indicated in
|
||||
/// it, apply them to D. This is a bit tricky because PD can have attributes
|
||||
|
|
Loading…
Reference in New Issue