aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CodeGenAction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/CodeGenAction.h')
-rw-r--r--include/clang/Frontend/CodeGenAction.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Frontend/CodeGenAction.h b/include/clang/Frontend/CodeGenAction.h
index f782e1287a..07e02e5c6e 100644
--- a/include/clang/Frontend/CodeGenAction.h
+++ b/include/clang/Frontend/CodeGenAction.h
@@ -8,18 +8,31 @@
//===----------------------------------------------------------------------===//
#include "clang/Frontend/FrontendAction.h"
+#include "llvm/ADT/OwningPtr.h"
+
+namespace llvm {
+ class Module;
+}
namespace clang {
class CodeGenAction : public ASTFrontendAction {
private:
unsigned Act;
+ llvm::OwningPtr<llvm::Module> TheModule;
protected:
CodeGenAction(unsigned _Act);
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef InFile);
+
+ virtual void EndSourceFileAction();
+
+public:
+ /// takeModule - Take the generated LLVM module, for use after the action has
+ /// been run. The result may be null on failure.
+ llvm::Module *takeModule();
};
class EmitAssemblyAction : public CodeGenAction {