[cfe-commits] r72926 - in /cfe/trunk: include/clang/Parse/Action.h lib/Sema/Sema.h lib/Sema/SemaDecl.cpp
Eli Friedman
eli.friedman at gmail.com
Thu Jun 4 23:28:29 PDT 2009
Author: efriedma
Date: Fri Jun 5 01:28:29 2009
New Revision: 72926
URL: http://llvm.org/viewvc/llvm-project?rev=72926&view=rev
Log:
Address review comments for #pragma weak.
Modified:
cfe/trunk/include/clang/Parse/Action.h
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=72926&r1=72925&r2=72926&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Fri Jun 5 01:28:29 2009
@@ -1750,7 +1750,7 @@
return;
}
- /// ActOnPragmaPack - Called on well formed #pragma pack(...).
+ /// ActOnPragmaUnused - Called on well formed #pragma unused(...).
virtual void ActOnPragmaUnused(ExprTy **Exprs, unsigned NumExprs,
SourceLocation PragmaLoc,
SourceLocation LParenLoc,
@@ -1758,14 +1758,14 @@
return;
}
- /// ActOnPragmaPack - Called on well formed #pragma weak ident.
+ /// ActOnPragmaWeakID - Called on well formed #pragma weak ident.
virtual void ActOnPragmaWeakID(IdentifierInfo* WeakName,
SourceLocation PragmaLoc,
SourceLocation WeakNameLoc) {
return;
}
- /// ActOnPragmaPack - Called on well formed #pragma weak ident = ident.
+ /// ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
virtual void ActOnPragmaWeakAlias(IdentifierInfo* WeakName,
IdentifierInfo* AliasName,
SourceLocation PragmaLoc,
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=72926&r1=72925&r2=72926&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Fri Jun 5 01:28:29 2009
@@ -2451,12 +2451,12 @@
SourceLocation LParenLoc,
SourceLocation RParenLoc);
- /// ActOnPragmaPack - Called on well formed #pragma weak ident.
+ /// ActOnPragmaWeakID - Called on well formed #pragma weak ident.
virtual void ActOnPragmaWeakID(IdentifierInfo* WeakName,
SourceLocation PragmaLoc,
SourceLocation WeakNameLoc);
- /// ActOnPragmaPack - Called on well formed #pragma weak ident = ident.
+ /// ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
virtual void ActOnPragmaWeakAlias(IdentifierInfo* WeakName,
IdentifierInfo* AliasName,
SourceLocation PragmaLoc,
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=72926&r1=72925&r2=72926&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Jun 5 01:28:29 2009
@@ -4439,6 +4439,7 @@
// FIXME: This implementation is an ugly hack!
if (PrevDecl) {
PrevDecl->addAttr(::new (Context) AliasAttr(AliasName->getName()));
+ PrevDecl->addAttr(::new (Context) WeakAttr());
return;
}
Diag(PragmaLoc, diag::err_unsupported_pragma_weak);
More information about the cfe-commits
mailing list