aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CodeGenAction.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-25 04:37:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-25 04:37:50 +0000
commitb954e98893505d401acddac42650a81b83d8dc39 (patch)
treec9556f267cab40831b596379289580bbc980da7a /include/clang/Frontend/CodeGenAction.h
parent4ee34616c6fa7700e27c0a5311718d844cbb7d2c (diff)
Frontend: Add CodeGenAction::takeModule().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97111 91177308-0d34-0410-b5e6-96231b3b80d8
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 {