summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* ASTUnit: Make sure to preserve the TargetInfo for later use.Daniel Dunbar2009-12-011-2/+3
| | | | llvm-svn: 90263
* Add ASTUnit::LoadFromCompilerInvocation, which does what it says.Daniel Dunbar2009-12-011-4/+95
| | | | | | | Also, add an -ast-from-source option to index-test which allows index-test to run on source files directly. llvm-svn: 90223
* Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer2009-11-281-2/+1
| | | | llvm-svn: 90033
* Add TargetOptions and use it when constructing targets.Daniel Dunbar2009-11-151-1/+9
| | | | | | | | - This ended up being hard to factor, sorry for the large diff. - Some post-commit cleanup to come. llvm-svn: 88833
* Redo how PCH handles its implicit include. Instead of treating this specially inDaniel Dunbar2009-11-111-0/+1
| | | | | | | | | | | | | | | the front-end (as far as the preprocessor goes), follow the usual logic of inserting the (original include path) name into the predefines buffer. This pushes the responsibility for handling this to PCH instead of the front-end. In PCH this requires being a little more clever when we diff the predefines buffers. Neither of these solutions are particularly great, I think what we eventually should do is something like gcc where we insert a special marker to indicate the PCH file, but then run the preprocessor as usual. This would be clearer and would allow us to drop the overly clever predefines handling. llvm-svn: 86806
* StringRefify some PCH interfaces.Daniel Dunbar2009-11-111-3/+2
| | | | llvm-svn: 86775
* The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ↵Ted Kremenek2009-10-191-4/+9
| | | | | | | | | | | | | | ASTUnit to specify alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object is destroyed. The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes <rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients. llvm-svn: 84539
* Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.Steve Naroff2009-10-191-10/+6
| | | | | | Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>). llvm-svn: 84499
* Use sys::Path::eraseFromDisk instead of unlink as suggested by Chris.Benjamin Kramer2009-10-181-1/+2
| | | | llvm-svn: 84415
* Add 'UseBumpPtrAllocator' flag to ASTUnit::LoadFromPCHFile() to cause the ↵Ted Kremenek2009-10-171-2/+3
| | | | | | | | | | | created ASTContext to use its own BumpPtrAllocator to allocate ASTs. Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to ASTUnit::LoadFromPCHFile(). llvm-svn: 84296
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-2/+3
| | | | | | | | | | header or not via a new "PCHLevel" field in Decl. We currently use this information to help CIndex filter out declarations that came from a precompiled header (rather than from an AST file). Further down the road, it can be used to help implement multi-level precompiled headers. llvm-svn: 84267
* Make sure temporary files get unlinked.Steve Naroff2009-10-151-2/+9
| | | | llvm-svn: 84208
* Change ASTUnit to only initialize the predefines buffer to the suggested ↵Daniel Dunbar2009-09-211-1/+1
| | | | | | | | predefines. - It isn't really clear what to do with the preprocessor here, but this is more sensible. llvm-svn: 82431
* Change ASTUnit to take the Diagnostic as an argument, the client should have ↵Daniel Dunbar2009-09-211-15/+7
| | | | | | control of this. llvm-svn: 82430
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-18/+18
| | | | llvm-svn: 81346
* Implement accessors clang_getCursorKind(), clang_getCursorDecl().Steve Naroff2009-09-041-0/+4
| | | | | | | Implement clang_getCursor() - wired up to Argiris's work. Implement callbacks for CXCursor_ObjCProtocolRef. llvm-svn: 81004
* Add ASTUnit::getOriginalSourceFileName() and use in ↵Steve Naroff2009-09-031-0/+3
| | | | | | clang_getTranslationUnitSpelling(). llvm-svn: 80932
* Revert "Visit function/method bodies and issue callback for parameters and localDaniel Dunbar2009-09-031-5/+1
| | | | | | variables.", this is breaking x86_64-apple-darwin10 and Linux tests. llvm-svn: 80896
* Revert "Remove redundant local variable (use newly created instance data).", theDaniel Dunbar2009-09-031-8/+10
| | | | | | previous commit this depends on is breaking x86_64-apple-darwin10 and Linux tests. llvm-svn: 80895
* Remove redundant local variable (use newly created instance data).Steve Naroff2009-09-031-10/+8
| | | | llvm-svn: 80861
* Visit function/method bodies and issue callback for parameters and local ↵Steve Naroff2009-09-031-1/+5
| | | | | | | | variables. Add clang_getTranslationUnitSpelling(). llvm-svn: 80859
* Handle PCHReader::IgnorePCH, it gets returned for when the file does not exist.Argyrios Kyrtzidis2009-06-251-5/+1
| | | | llvm-svn: 74196
* Add the license part to the new source files.Argyrios Kyrtzidis2009-06-201-0/+13
| | | | llvm-svn: 73825
* Introduce the ASTUnit class.Argyrios Kyrtzidis2009-06-201-0/+146
ASTUnit is a helper class to allow easy loading of an ASTContext from a PCH file. No users for now. llvm-svn: 73819
OpenPOWER on IntegriCloud