diff options
author | Chris Lattner <sabre@nondot.org> | 2007-09-16 19:46:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-09-16 19:46:59 +0000 |
commit | 580980b3d4334016cf60d22bd19cdaad5a4e1256 (patch) | |
tree | 100b638a4880f3034f772668bb179cac2d213dad /Driver/clang.cpp | |
parent | dce7bd6688423f9607e07755327337e39d1e936e (diff) |
switch the llvm emitter to ASTConsumer interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r-- | Driver/clang.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 7301354c17..4051806718 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -870,9 +870,11 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID, ParseAST(PP, MainFileID, *C.get(), Stats); break; } - case EmitLLVM: - EmitLLVMFromASTs(PP, MainFileID, Stats); + case EmitLLVM: { + std::auto_ptr<ASTConsumer> C(CreateLLVMEmitter(PP.getDiagnostics())); + ParseAST(PP, MainFileID, *C.get(), Stats); break; + } case ParseASTCheck: exit(CheckDiagnostics(PP, MainFileID)); break; |