summaryrefslogtreecommitdiffstats
path: root/clang/Driver/SerializationTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-193/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME thatDaniel Dunbar2008-11-131-2/+2
| | | | | | | | the Backend output should be done in binary mode. - I'd appreciate it if someone who has a Windows build could verify this. llvm-svn: 59221
* Patch by Csaba Hruska!Ted Kremenek2008-09-131-4/+6
| | | | | | | "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." llvm-svn: 56185
* More #include cleaningDaniel Dunbar2008-08-111-0/+1
| | | | | | | | - Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation llvm-svn: 54627
* Unbreak SerializationTest and the Rewriter by doing the work in ↵Ted Kremenek2008-08-081-12/+14
| | | | | | HandleTranslationUnit instead of the destructor. llvm-svn: 54513
* Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek2008-06-041-19/+7
| | | | | | variety of cleanups in some ASTConsumers. llvm-svn: 51943
* Fix the destruction "properly" in the sense that we actually destroy the Eli Friedman2008-05-211-1/+4
| | | | | | | ASTs. This is a hack, but I haven't considered how we really want to do this. llvm-svn: 51364
* TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objectsTed Kremenek2008-04-231-6/+7
| | | | | | | | | | | | | | | | when it is constructed via deserialization. This is done by recording a flag indicating that this is the case, and it deletes these objects by getting the references stored in the ASTContext object. This fixes some memory leaks that occurs when we deserialize translation units from bitcode files. The rationale between having TranslationUnit sometimes own these objects and sometimes not is that a TranslationUnit object can be constructed from state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus in these cases won't own the IdentifierTable or Selectors, etc. During deserialization, there is no Preprocessor, so somebody needs to own these objects in order for them to be properly reclaimed. llvm-svn: 50149
* Call delete on the deserialized TranslationUnit object.Sam Bishop2008-04-031-0/+2
| | | | llvm-svn: 49136
* Update to match simplified llvm MemoryBuffer interfaces for files.Chris Lattner2008-04-011-4/+2
| | | | llvm-svn: 49042
* Add some missing #includes for GCC mainline, patch by Shantonu Sen!Chris Lattner2008-03-101-1/+1
| | | | llvm-svn: 48153
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Converted uses of scoped_ptr to OwningPtr.Ted Kremenek2007-12-201-5/+5
| | | | llvm-svn: 45265
* Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek2007-12-191-1/+1
| | | | | | | | | both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. llvm-svn: 45228
* Removed "SourceFile" from TranslationUnit. This same information will (soon)Ted Kremenek2007-12-191-6/+6
| | | | | | | be available by querying the SourceManager within the ASTContext referenced by the TranslationUnit. llvm-svn: 45223
* Removed storing inode and device number in TranslationUnit.Ted Kremenek2007-12-191-5/+7
| | | | | | | | | | Added "SourceFile" string to TranslationUnit to record corresponding source file. Updated serialization of TranslationUnits and logic in the driver to correctly pass the source file information to the serializer. llvm-svn: 45211
* Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made themTed Kremenek2007-12-181-2/+2
| | | | | | | the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile respectively. llvm-svn: 45180
* Fixed broken includes introduced by recent (incomplete) patch toTed Kremenek2007-12-181-1/+1
| | | | | | TranslationUnit. llvm-svn: 45177
* Converted SerializationTest (--test-pickling) to use the new TranslationUnitTed Kremenek2007-12-051-266/+42
| | | | | | class to serialize and deserialize translation units. llvm-svn: 44634
* Modified: CreateTargetInfo(). Now takes Diagnostic* instead of Diagnostic&.Ted Kremenek2007-12-051-5/+7
| | | | | | | Modified: ctor of SerializationTest: Now takes LangOptions argument. We will eventually serialize this as well. llvm-svn: 44630
* Added serialization support of SourceManager to the clang driver.Ted Kremenek2007-12-051-8/+13
| | | | llvm-svn: 44592
* Implemented serialization of TargetInfo.Ted Kremenek2007-12-031-10/+22
| | | | | | SerializationTest (subclass of ASTConsumer) now takes Diagnostics& in its ctor. llvm-svn: 44555
* Implemented serialization of SelectorTable and Selectors.Ted Kremenek2007-11-301-14/+24
| | | | | | | Modified serialization of IdentifierTable to self-register itself with the Deserializer. llvm-svn: 44471
* Only serialize top-level decls that appear at the head of a decl chain.Ted Kremenek2007-11-291-12/+17
| | | | llvm-svn: 44438
* Enhanced serialization testing by also pretty-printing CFGs constructed from ↵Ted Kremenek2007-11-291-0/+16
| | | | | | | | | ASTs both before and after serialization/deserialization. If the CFGs between the pre- and post- serialized/deserialized ASTs differ, the serialization has failed. llvm-svn: 44429
* Converted AST Pretty-Printer to use iostreams instead of FILE*. This fixesTed Kremenek2007-11-281-30/+14
| | | | | | | | | a bug where the statement pretty-printer used iostreams but the AST printer did not. This was an issue when dumping ASTs to something other than stderr. Updated SerializationTest to use the new iostreams interface for the AST printer. llvm-svn: 44417
* Modified --test-pickling to perform an actual cross-check of serialized ASTs:Ted Kremenek2007-11-281-48/+144
| | | | | | | | | | | (1) Parsed ASTs are pretty-printed to a text file. (2) The ASTs are serialized to disk. (3) The ASTs are deserialized from disk. (4) The deserialized ASTs are pretty-printed to a text file. (5) The two pretty-printed files are compared. If they are different, the test fails. llvm-svn: 44411
* SourceManager, IdentifierTable, Selectors are now serialized in their ownTed Kremenek2007-11-141-11/+27
| | | | | | | | | | | | | | block separate from ASTContext. This block is serialized out AFTER writing out ASTContext, but deserialized BEFORE reading in ASTContext. This permits the optimization of the serialization of the IdentifierTable where we only write out identifiers that are used. This was needed because TagDecls are owned by Types, and TagDecls contain identifiers. Thus types need to be written out first to register with the serializer any identifiers they refer to (and hence need to be serialized out with IdentifierTable). llvm-svn: 44125
* Added pretty-printing of statements during serialization.Ted Kremenek2007-11-131-1/+8
| | | | llvm-svn: 44078
* Modifed the test serialization driver to...Ted Kremenek2007-11-101-17/+27
| | | | | | | | | | | | | | | | | | | (1) serialize out top-level decls BEFORE serializing out translation unit structures like ASTContext. (2) deserialize out translation unit structures like ASTContext before top-level decls by first skipping the decls in the bitstream, deserializing ASTContext and friends, and then jumping back to the bitstream block with the decls and then deserializing them. Change (1) allows us to utilize the pointer-tracking system in the Serializer to only serialize out metadata that is actually referenced by the ASTS. Change (2) allows us to deserialize the metadata first as before, which signficantly reduces the amount of pointer backpatching the deserializer would have to do if the decls were deserialized first. llvm-svn: 43974
* Fixed typo in the name of "ReadPreamble".Ted Kremenek2007-11-061-2/+2
| | | | llvm-svn: 43790
* Bug fix: inverted test condition to see if a serialized AST-bitcodeTed Kremenek2007-11-061-1/+1
| | | | | | file had the correct preamble. llvm-svn: 43785
* Revampled Serialization Tester to serialize and deserialize out an entire ↵Ted Kremenek2007-11-061-112/+161
| | | | | | ASTContext and top-level decls. llvm-svn: 43773
* In driver code implemented serialization of ASTContext. Working on ↵Ted Kremenek2007-11-051-87/+126
| | | | | | serialization of simple ASTs. llvm-svn: 43738
* Modified current clients of Bitcode-Object serialization to use theTed Kremenek2007-10-241-1/+2
| | | | | | | | | | new split-header file configuration (Serialize.h and Deserialize.h) now in place in the core LLVM repository. Removed unneeded SerializeTrait specializations for enums in TokenKinds.h llvm-svn: 43306
* Implemented serialization for IdentifierInfo and IdentifierTable.Ted Kremenek2007-10-231-183/+105
| | | | | | | Updated serialization test code in the driver to test serialization of these types. llvm-svn: 43266
* Updated VC++ build system.Hartmut Kaiser2007-10-171-22/+25
| | | | | | | | Silenced some VC++ warnings. Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review. Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues? llvm-svn: 43074
* Fix the build.Anders Carlsson2007-10-171-0/+1
| | | | llvm-svn: 43057
* Started work on clang object serialization. ExperimentalTed Kremenek2007-10-161-0/+240
serialization logic as well as driver code is now in Driver/SerializationTest.cpp. The status of this code is that it should be used by no clients. Added --test-pickling option to driver to run the serialization code. Modified IdentifierInfo and IdentifierTable to have friend classes that permit object serialization. Such friendship may not be needed in the final design. llvm-svn: 43052
OpenPOWER on IntegriCloud