diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-03 06:24:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-03 06:24:16 +0000 |
commit | 31e6c7ddfeeefe05b67220bc87fa23d4338d1056 (patch) | |
tree | f445f70ad9a9bb949af7c23aa2f92a873ca51060 /Driver/RewriteTest.cpp | |
parent | 8aab17e82aab6b3f266ef1884253226d2cb8b8d8 (diff) |
Fix ownership model of ParseAST to allow the dtor of
ASTConsumer to process the AST before it is destroyed.
This allows elimination of HandleObjcMetaDataEmission.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index ca9b1153f0..7bbd7afdb5 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -79,7 +79,6 @@ namespace { void SynthGetClassFunctionDecl(); // Metadata emission. - void HandleObjcMetaDataEmission(); void RewriteObjcClassMetaData(ObjcImplementationDecl *IDecl, std::string &Result); @@ -162,6 +161,12 @@ RewriteTest::~RewriteTest() { // Get the top-level buffer that this corresponds to. RewriteTabs(); + // Rewrite Objective-c meta data* + std::string ResultStr; + WriteObjcMetaData(ResultStr); + // For now just print the string out. + printf("%s", ResultStr.c_str()); + // Get the buffer corresponding to MainFileID. If we haven't changed it, then // we are done. if (const RewriteBuffer *RewriteBuf = @@ -175,16 +180,6 @@ RewriteTest::~RewriteTest() { } -/// HandleObjcMetaDataEmission - main routine to generate objective-c's -/// metadata. -void RewriteTest::HandleObjcMetaDataEmission() { - // Rewrite Objective-c meta data* - std::string ResultStr; - WriteObjcMetaData(ResultStr); - // For now just print the string out. - printf("%s", ResultStr.c_str()); -} - //===----------------------------------------------------------------------===// // Syntactic (non-AST) Rewriting Code //===----------------------------------------------------------------------===// |