summaryrefslogtreecommitdiffstats
path: root/clang/Basic
Commit message (Collapse)AuthorAgeFilesLines
...
* Finally bite the bullet and make the major change: split the clang namespaceChris Lattner2007-06-155-8/+4
| | | | | | | | | | | | | out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
* Submitted by: Bill WendlingBill Wendling2007-06-101-0/+4
| | | | | | | | | | | Reviewed by: Chris Lattner - Added a method "IgnoreDiagnostic" so that the diagnostic client can tell the diagnostic object that it doesn't want to handle a particular diagnostic message. In which case, it won't be counted as either a diagnostic or error. llvm-svn: 39641
* Submitted by: Bill WendlingBill Wendling2007-06-081-1/+2
| | | | | | - Say! why don't we increment the NumDiagnostics variable too? llvm-svn: 39616
* Submitted by: Bill WendlingBill Wendling2007-06-081-1/+5
| | | | | | | | | Reviewed by: Chris Lattner - Make the counting of errors and diagnostic messages sane. Place them into the Diagnostic class instead of in the DiagnosticClient class. llvm-svn: 39615
* track whether an error has been emitted.Chris Lattner2007-05-281-0/+5
| | | | llvm-svn: 39502
* improve const correctnessChris Lattner2007-05-191-1/+1
| | | | llvm-svn: 39460
* Bug #:Steve Naroff2007-05-181-2/+4
| | | | | | | | | | | | | | | | | | | | Submitted by: Reviewed by: An important, but truly mind numbing change. Added 6 flavors of Sema::Diag() that take 1 or two SourceRanges. Considered adding 3 flavors (using default args), however this wasn't as clear. Removed 2 flavors of Sema::Diag() that took LexerToken's (they weren't used). Changed all the typechecking routines to pass the appropriate range(s). Hacked the diagnostic machinery and driver to acccommodate the new data. What's left? A FIXME in clang.c to use the ranges. Chris offered to do the honors:-) Which includes taking us to the end of an identifier:-) llvm-svn: 39456
* Add support for inserting up to 10 strings in a diagnostic, with %0, %1, %2,Chris Lattner2007-05-161-2/+2
| | | | | | etc. llvm-svn: 39447
* Adjust to change in MemoryBuffer interfaceChris Lattner2007-05-061-1/+1
| | | | llvm-svn: 39434
* Remove the clang::SourceBuffer class, switch to the llvm::MemoryBuffer class.Chris Lattner2007-04-292-291/+11
| | | | llvm-svn: 39426
* Refactor the SourceBuffer code so that it is safe to move to the LLVMChris Lattner2007-04-292-11/+116
| | | | | | | support library, where it can be used by other LLVM clients. There are some ugly fixme's in the short-term. llvm-svn: 39425
* minor cleanupsChris Lattner2007-04-292-39/+29
| | | | llvm-svn: 39424
* adjust to CStringMap interface change.Chris Lattner2007-02-081-15/+21
| | | | llvm-svn: 39333
* Optimize #define analysis for the common case of a single target.Chris Lattner2007-01-301-0/+18
| | | | llvm-svn: 39331
* Add support for target-specific builtins, including detecting nonportabilityChris Lattner2007-01-291-0/+56
| | | | | | | | | | | | | | | | | of source code. For example: $ clang INPUTS/carbon_h.c -arch i386 -arch ppc prints: ... /usr/lib/gcc/i686-apple-darwin8/4.0.1/include/mmintrin.h:51:3: note: use of a target-specific builtin function, source is not 'portable' __builtin_ia32_emms (); ^ because carbon.h pulls in xmmintrin.h, and __builtin_ia32_emms isn't a builtin on ppc. Though clang now supports target-specific builtins, the full table isn't implemented yet. llvm-svn: 39328
* allow getTokenName to work for keywords.Chris Lattner2006-12-041-0/+1
| | | | llvm-svn: 39243
* silence some warnings when asserts are disabled.Chris Lattner2006-11-051-0/+1
| | | | llvm-svn: 39127
* simplify logic, eliminate a copy of string data.Chris Lattner2006-10-301-8/+7
| | | | llvm-svn: 39086
* Switch the FileManager::FileEntries map over to using a CStringMap. ThisChris Lattner2006-10-301-27/+41
| | | | | | speeds up preprocessing Cocoa.h 16% (from 0.99 to 0.85s). llvm-svn: 39085
* Wean LookupSubframeworkHeader off std::strings, use the new SmallStringChris Lattner2006-10-301-7/+10
| | | | | | | class instead. SmallString allows to code to avoid hitting malloc in the normal case (or will, when some other stuff is converted over). llvm-svn: 39084
* Avoid storing a directory name in both the DirEntries map keys and in theChris Lattner2006-10-301-3/+4
| | | | | | | UniqueDirs value. Instead, just have the UniqueDirs value contain a pointer to the key in the DirEntries map. llvm-svn: 39083
* Switch DirEntries over to using a CStringMap. This speeds it upChris Lattner2006-10-301-10/+16
| | | | | | 'clang -Eonly INPUTS/Cocoa_h.m' by about 4%. llvm-svn: 39082
* Avoid some mallocs, and avoid leaking some memory, by making theChris Lattner2006-10-301-16/+16
| | | | | | UniqueDirs/UniqueFiles maps own the memory for the FileEntry and DirEntries. llvm-svn: 39081
* change FileEntry::getName to return a const char*.Chris Lattner2006-10-271-2/+2
| | | | llvm-svn: 39065
* Fix these to allow clang to be in any dir.Chris Lattner2006-10-261-1/+1
| | | | llvm-svn: 39055
* llvm has no EH by default, no need for these flags.Chris Lattner2006-10-251-1/+1
| | | | llvm-svn: 39047
* Add assertions for out-of-fileid error caseChris Lattner2006-10-221-0/+4
| | | | llvm-svn: 39028
* Use read to open small files so we don't run out of file descriptors as easily.Chris Lattner2006-10-201-11/+63
| | | | llvm-svn: 39027
* Add new TargetInfo hooks for getting the set of target-specific #defines.Chris Lattner2006-10-141-0/+110
| | | | llvm-svn: 38979
* Add new TargetInfo class to clang.Chris Lattner2006-10-141-0/+40
| | | | llvm-svn: 38971
* Make this work with llvm cvsChris Lattner2006-08-271-1/+4
| | | | llvm-svn: 38952
* Add a single-entry cache for macro instantation locations. This significantlyChris Lattner2006-07-201-5/+18
| | | | | | reduces the number of FileID's made and tracked. llvm-svn: 38752
* cleanups, add some code for instrumenting statChris Lattner2006-07-191-3/+7
| | | | llvm-svn: 38728
* Add a check that the physloc for a macro instantiation is not another macro.Chris Lattner2006-07-161-0/+4
| | | | llvm-svn: 38722
* Implement support for arbitrarily mapping non-error diagnostics to be eitherChris Lattner2006-07-051-2/+18
| | | | | | | ignored, warned about, or error'd. Use this to implement the -Wunused_macros command line option. llvm-svn: 38676
* Add a fast-path in getSpelling for identifiers.Chris Lattner2006-07-041-5/+7
| | | | llvm-svn: 38672
* This matters for -E.Chris Lattner2006-07-041-1/+1
| | | | llvm-svn: 38664
* Compile without rtti or exceptions.Chris Lattner2006-07-031-0/+1
| | | | llvm-svn: 38629
* Tolerate conditions where there is no line #Chris Lattner2006-07-021-1/+3
| | | | llvm-svn: 38604
* Eliminate SourceManager::createFileIDForMacroExp, inlining it into its ↵Chris Lattner2006-06-301-16/+8
| | | | | | single use. llvm-svn: 38599
* Expose a useful helper method.Chris Lattner2006-06-301-0/+14
| | | | llvm-svn: 38596
* Factor logical line lookup better.Chris Lattner2006-06-291-28/+7
| | | | llvm-svn: 38594
* Due to generated tokens expanded by macros, there can be multiple ↵Chris Lattner2006-06-291-6/+9
| | | | | | MacroExpansion fileid's, loop over them until we get to something real. llvm-svn: 38590
* Add a new SourceBuffer::getNewMemBuffer method.Chris Lattner2006-06-281-0/+14
| | | | llvm-svn: 38587
* Fix Preprocessor/macro_expandloc2.cChris Lattner2006-06-261-0/+17
| | | | llvm-svn: 38579
* To not treat macro invocation locations as part of the include stackChris Lattner2006-06-261-0/+12
| | | | | | when reporting a diagnostic. llvm-svn: 38577
* implement #pragma GCC dependencyChris Lattner2006-06-251-2/+3
| | | | llvm-svn: 38574
* Implement a new SourceManager::getSourceName methodChris Lattner2006-06-211-10/+28
| | | | llvm-svn: 38560
* Update SourceManager::getLineNumber to return the correct line # for macroChris Lattner2006-06-211-1/+10
| | | | | | instantiations. llvm-svn: 38558
* Implement a new type of FileID: FileIDInfo::MacroExpansion. For tokens thatChris Lattner2006-06-211-2/+32
| | | | | | | | | came from a macro expansion, this allows us to keep track of both where the character data came from and where the logical position of the token is (at the expansion site). This implements Preprocessor/indent_macro.c, and reduces the number of cpp iostream -E diffs vs GCC from 2589 to 2297. llvm-svn: 38557
OpenPOWER on IntegriCloud