diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-18 00:26:59 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-18 00:26:59 +0000 |
| commit | 841dd8861ad46c7efc00e9e8121f4af204c36e96 (patch) | |
| tree | b27f2808d891a2201b42c148736a0fabf9fcca7c /clang/lib/CodeGen | |
| parent | effdbf55acb208f4c0f302903c0333d46146b7f2 (diff) | |
| download | bcm5719-llvm-841dd8861ad46c7efc00e9e8121f4af204c36e96.tar.gz bcm5719-llvm-841dd8861ad46c7efc00e9e8121f4af204c36e96.zip | |
Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
parsing or false to abort parsing.
llvm-svn: 144943
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/CodeGen/ModuleBuilder.cpp | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index db2bab9bf61..fb926e1e8e6 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -86,7 +86,7 @@ namespace clang { LLVMIRGeneration.stopTimer(); } - virtual void HandleTopLevelDecl(DeclGroupRef D) { + virtual bool HandleTopLevelDecl(DeclGroupRef D) { PrettyStackTraceDecl CrashInfo(*D.begin(), SourceLocation(), Context->getSourceManager(), "LLVM IR generation of declaration"); @@ -98,6 +98,8 @@ namespace clang { if (llvm::TimePassesIsEnabled) LLVMIRGeneration.stopTimer(); + + return true; } virtual void HandleTranslationUnit(ASTContext &C) { diff --git a/clang/lib/CodeGen/ModuleBuilder.cpp b/clang/lib/CodeGen/ModuleBuilder.cpp index 793ee9192e6..30572ed9af2 100644 --- a/clang/lib/CodeGen/ModuleBuilder.cpp +++ b/clang/lib/CodeGen/ModuleBuilder.cpp @@ -59,10 +59,11 @@ namespace { *M, *TD, Diags)); } - virtual void HandleTopLevelDecl(DeclGroupRef DG) { + virtual bool HandleTopLevelDecl(DeclGroupRef DG) { // Make sure to emit all elements of a Decl. for (DeclGroupRef::iterator I = DG.begin(), E = DG.end(); I != E; ++I) Builder->EmitTopLevelDecl(*I); + return true; } /// HandleTagDeclDefinition - This callback is invoked each time a TagDecl |

