[cfe-commits] r61113 - /cfe/trunk/Driver/RewriteObjC.cpp
Steve Naroff
snaroff at apple.com
Tue Dec 16 16:20:24 PST 2008
Author: snaroff
Date: Tue Dec 16 18:20:22 2008
New Revision: 61113
URL: http://llvm.org/viewvc/llvm-project?rev=61113&view=rev
Log:
Tweaks to allow us to rewrite with -x=objective-c++ enabled.
Modified:
cfe/trunk/Driver/RewriteObjC.cpp
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=61113&r1=61112&r2=61113&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Tue Dec 16 18:20:22 2008
@@ -4349,7 +4349,18 @@
/// HandleDeclInMainFile - This is called for each top-level decl defined in the
/// main file of the input.
void RewriteObjC::HandleDeclInMainFile(Decl *D) {
+ // Required when rewriting in objective-c++ mode...
+ if (LinkageSpecDecl *LSD = dyn_cast<LinkageSpecDecl>(D)) {
+ for (LinkageSpecDecl::decl_iterator i = LSD->decls_begin(),
+ e = LSD->decls_end(); i != e; ++i) {
+ HandleDeclInMainFile(*i);
+ }
+ return;
+ }
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
+ if (FD->isOverloadedOperator())
+ return;
+
// Since function prototypes don't have ParmDecl's, we check the function
// prototype. This enables us to rewrite function declarations and
// definitions using the same code.
More information about the cfe-commits
mailing list