[cfe-commits] r61125 - in /cfe/trunk/lib/Sema: SemaDecl.cpp SemaDeclCXX.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 16 23:09:48 PST 2008
Author: lattner
Date: Wed Dec 17 01:09:26 2008
New Revision: 61125
URL: http://llvm.org/viewvc/llvm-project?rev=61125&view=rev
Log:
Move Sema::ActOnLinkageSpec to SemaDeclCXX.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=61125&r1=61124&r2=61125&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Dec 17 01:09:26 2008
@@ -3414,24 +3414,6 @@
(Decl **)Decls, NumDecls);
}
-Sema::DeclTy* Sema::ActOnLinkageSpec(SourceLocation Loc,
- const char *Lang, unsigned StrSize,
- DeclTy *D) {
- LinkageSpecDecl::LanguageIDs Language;
- Decl *dcl = static_cast<Decl *>(D);
- if (strncmp(Lang, "\"C\"", StrSize) == 0)
- Language = LinkageSpecDecl::lang_c;
- else if (strncmp(Lang, "\"C++\"", StrSize) == 0)
- Language = LinkageSpecDecl::lang_cxx;
- else {
- Diag(Loc, diag::err_bad_language);
- return 0;
- }
-
- // FIXME: Add all the various semantics of linkage specifications
- return LinkageSpecDecl::Create(Context, Loc, Language, dcl);
-}
-
void Sema::ActOnPragmaPack(PragmaPackKind Kind, IdentifierInfo *Name,
ExprTy *alignment, SourceLocation PragmaLoc,
SourceLocation LParenLoc, SourceLocation RParenLoc) {
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=61125&r1=61124&r2=61125&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Dec 17 01:09:26 2008
@@ -1979,3 +1979,22 @@
return false;
}
+
+Sema::DeclTy *Sema::ActOnLinkageSpec(SourceLocation Loc,
+ const char *Lang, unsigned StrSize,
+ DeclTy *D) {
+ LinkageSpecDecl::LanguageIDs Language;
+ Decl *dcl = static_cast<Decl *>(D);
+ if (strncmp(Lang, "\"C\"", StrSize) == 0)
+ Language = LinkageSpecDecl::lang_c;
+ else if (strncmp(Lang, "\"C++\"", StrSize) == 0)
+ Language = LinkageSpecDecl::lang_cxx;
+ else {
+ Diag(Loc, diag::err_bad_language);
+ return 0;
+ }
+
+ // FIXME: Add all the various semantics of linkage specifications
+ return LinkageSpecDecl::Create(Context, Loc, Language, dcl);
+}
+
More information about the cfe-commits
mailing list