diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:40:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-07-17 15:40:56 +0000 | 
| commit | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (patch) | |
| tree | 2097d084eb235c0b12c0bff3445f4ec7bbaa8a12 /lib/Frontend/FrontendAction.cpp | |
| parent | 29cafa66ad3878dbb9f82615f19fa0bded2e443c (diff) | |
Notes
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
| -rw-r--r-- | lib/Frontend/FrontendAction.cpp | 46 | 
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 42da44c2c720..0128d6ee0531 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -130,6 +130,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,    setCurrentFile(Filename, InputKind);    setCompilerInstance(&CI); +  if (!BeginInvocation(CI)) +    goto failure; +    // AST files follow a very different path, since they share objects via the    // AST unit.    if (InputKind == IK_AST) { @@ -381,3 +384,46 @@ PreprocessorFrontendAction::CreateASTConsumer(CompilerInstance &CI,                                                llvm::StringRef InFile) {    llvm_unreachable("Invalid CreateASTConsumer on preprocessor action!");  } + +ASTConsumer *WrapperFrontendAction::CreateASTConsumer(CompilerInstance &CI, +                                                      llvm::StringRef InFile) { +  return WrappedAction->CreateASTConsumer(CI, InFile); +} +bool WrapperFrontendAction::BeginInvocation(CompilerInstance &CI) { +  return WrappedAction->BeginInvocation(CI); +} +bool WrapperFrontendAction::BeginSourceFileAction(CompilerInstance &CI, +                                                  llvm::StringRef Filename) { +  WrappedAction->setCurrentFile(getCurrentFile(), getCurrentFileKind()); +  WrappedAction->setCompilerInstance(&CI); +  return WrappedAction->BeginSourceFileAction(CI, Filename); +} +void WrapperFrontendAction::ExecuteAction() { +  WrappedAction->ExecuteAction(); +} +void WrapperFrontendAction::EndSourceFileAction() { +  WrappedAction->EndSourceFileAction(); +} + +bool WrapperFrontendAction::usesPreprocessorOnly() const { +  return WrappedAction->usesPreprocessorOnly(); +} +bool WrapperFrontendAction::usesCompleteTranslationUnit() { +  return WrappedAction->usesCompleteTranslationUnit(); +} +bool WrapperFrontendAction::hasPCHSupport() const { +  return WrappedAction->hasPCHSupport(); +} +bool WrapperFrontendAction::hasASTFileSupport() const { +  return WrappedAction->hasASTFileSupport(); +} +bool WrapperFrontendAction::hasIRSupport() const { +  return WrappedAction->hasIRSupport(); +} +bool WrapperFrontendAction::hasCodeCompletionSupport() const { +  return WrappedAction->hasCodeCompletionSupport(); +} + +WrapperFrontendAction::WrapperFrontendAction(FrontendAction *WrappedAction) +  : WrappedAction(WrappedAction) {} +  | 
