summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* On Darwin, initialization and destruction functions should go into the ↵Anders Carlsson2010-06-081-0/+6
| | | | | | __StaticInit section. llvm-svn: 105650
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-5/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-2/+2
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Correctly align large arrays in x86-64. This fixes PR5599.Rafael Espindola2010-06-042-0/+4
| | | | llvm-svn: 105500
* Accept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.Daniel Dunbar2010-05-301-2/+23
| | | | llvm-svn: 105116
* Roll back r104941.John McCall2010-05-281-1/+1
| | | | llvm-svn: 104990
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-281-1/+1
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Darwin/ARM seems to support mac68k align as well.Daniel Dunbar2010-05-271-1/+3
| | | | llvm-svn: 104828
* Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.Daniel Dunbar2010-05-272-0/+2
| | | | llvm-svn: 104789
* don't make _Bool be a keyword in -fms-extensions mode, patch byChris Lattner2010-05-211-1/+3
| | | | | | Steven Watanabe! llvm-svn: 104373
* Update the types for warning option subgroup arrays to 'short', we have moreChandler Carruth2010-05-131-4/+4
| | | | | | | than 127 groups so this was already failing given -fsigned-char. A subsequent to commit to TableGen will generate shorts for the arrays themselves. llvm-svn: 103703
* clean up isBeforeInTranslationUnit by factoring out some commonChris Lattner2010-05-071-24/+34
| | | | | | | code into a MoveUpIncludeHierarchy helper, and use the helper to fix a case involving macros which regressed from my recent patch. llvm-svn: 103288
* reimplement the guts of SourceManager::isBeforeInTranslationUnitChris Lattner2010-05-071-53/+56
| | | | | | | | | | | to be algorithmically faster and avoid an std::map. This routine basically boils down to finding the nearest common ancestor in a tree, and we (implicitly) have information about nesting depth, use it! This wraps up rdar://7948633 - SourceManager::isBeforeInTranslationUnit has poor performance llvm-svn: 103239
* start using the caching now that it appears to work!Chris Lattner2010-05-071-16/+4
| | | | llvm-svn: 103236
* reimplement the caching in the SourceManager::isBeforeInTranslationUnit()Chris Lattner2010-05-071-20/+31
| | | | | | | | method to be correct. Right now it correctly computes the cache, then goes ahead and computes the result the hard way, then asserts that they match. Next I'll actually turn it on. llvm-svn: 103231
* Basic: Update getClangRepositoryPath for my change to integration branch layout.Daniel Dunbar2010-05-061-1/+2
| | | | llvm-svn: 103192
* Workaround a really serious caching bug in ↵Ted Kremenek2010-05-061-0/+5
| | | | | | | | | | SourceManager::isBeforeInTranslationUnit() where the method will sometimes return different results for the same input SourceLocations. I haven't unraveled this method completely yet, so this truly is a workaround until a better fix comes along. llvm-svn: 103143
* When -fdiagnostics-print-source-range-info is specified,Chris Lattner2010-05-041-0/+29
| | | | | | | | | | | | | | | | | | | | | | | print the diagnostic category number in the [] at the end of the line. For example: $ cat t.c #include <stdio.h> void foo() { printf("%s", 4); } $ clang t.c -fsyntax-only -fdiagnostics-print-source-range-info t.c:3:11:{3:10-3:12}{3:15-3:16}: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1] printf("%s", 4); ~^ ~ 1 warning generated. Clients that want category information can now pick the number out of the output, rdar://7928231. More coming. llvm-svn: 103053
* add the ability to associate 'category' names with diagnosticsChris Lattner2010-05-041-4/+6
| | | | | | | | | and diagnostic groups. This allows the compiler to group diagnostics together (e.g. "Logic Warning", "Format String Warning", etc) like the static analyzer does. This is not exposed through anything in the compiler yet. llvm-svn: 103051
* david conrad points out that {|} in inline assembly on arm are not asmChris Lattner2010-04-232-0/+5
| | | | | | variants. This fixes neon inline asm which my patch for PR6780 broke. llvm-svn: 102181
* another tweak for haiku support, patch by Paul Davey!Chris Lattner2010-04-221-0/+2
| | | | llvm-svn: 102098
* ARM/APCS: Don't respect bit-field types when laying out structures.Daniel Dunbar2010-04-221-0/+4
| | | | | | | | | | | - This fixes the last known ABI issues with ARM/APCS. - I've run the first 1k ABITests with '--no-unsigned --no-vector --no-complex' on {armv6, armv7} x {-mno-thumb, -mthumb}, and the first 10k tests for armv7 -mthumb, for both function return types and single argument calls. These all pass now (they failed horribly before without --no-bitfield). llvm-svn: 102070
* Sink the _GNU_SOURCE definition down into the target configuration,Douglas Gregor2010-04-211-0/+4
| | | | | | | and only define it where we know we need it---Linux and Cygwin. Thanks to Chris for the prodding. llvm-svn: 101989
* change FullSourceLoc to have a *const* SourceManager&, eliminatingChris Lattner2010-04-201-4/+1
| | | | | | a const_cast. llvm-svn: 101940
* push some source location information down through the compiler,Chris Lattner2010-04-201-20/+32
| | | | | | | | into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939
* enhance sourcemgr to detect various UTF BOM's and emit a fatal errorChris Lattner2010-04-201-0/+35
| | | | | | | | | about it instead of producing tons of garbage from the lexer. It would be even better for sourcemgr to dynamically transcode (e.g. from UTF16 -> UTF8). llvm-svn: 101924
* Introduce a limit on the depth of the template instantiation backtraceDouglas Gregor2010-04-201-1/+2
| | | | | | | | | | | | | | | | we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. llvm-svn: 101882
* Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are notChandler Carruth2010-04-171-3/+3
| | | | | | | | implemented precisely the same as GCC, but the distinction GCC makes isn't useful to represent. This allows parsing code which uses GCC-specific keywords ('asm', etc.) without parsing in a fully GNU mode. llvm-svn: 101667
* clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.Daniel Dunbar2010-04-151-2/+3
| | | | llvm-svn: 101370
* Tweak spelling (Bitfield -> BitField)Daniel Dunbar2010-04-151-1/+1
| | | | llvm-svn: 101369
* Add TargetInfo::useBitfieldTypeAlignment().Daniel Dunbar2010-04-151-3/+3
| | | | | | | | | | | | | | | - Used to determine whether the alignment of the type in a bit-field is respected when laying out structures. The default is true, targets can override this as needed. - This is designed to correspond to the PCC_BITFIELD_TYPE_MATTERS macro in gcc. The AST/Sema implementation only affects one line, unless I have forgotten something. I'd appreciate further review. - IRgen still needs to be updated to fully support this (which is effectively PR5591). llvm-svn: 101356
* Once we've emitted a fatal diagnostic, keep counting errors but with aDouglas Gregor2010-04-141-1/+8
| | | | | | | | | | | | | | separate count of "suppressed" errors. This way, semantic analysis bits that depend on the error count to determine whether problems occured (e.g., some template argument deduction failures, jump-scope checking) will not get confused. The actual problem here is that a missing #include (which is a fatal error) could cause the jump-scope checker to run on invalid code, which it is not prepared to do. Trivial fix for both <rdar://problem/7775941> and <rdar://problem/7775709>. llvm-svn: 101297
* fix PR6814 - Only print [-pedantic] on a diagnostic if -pedantic Chris Lattner2010-04-121-4/+11
| | | | | | | | actually turned it on. If a diag is produced by a warning which is an extension but defaults to on, and has no warning group, don't print any option info. llvm-svn: 101071
* Fix null dereference in 'WriteSourceLocation' when the FileEntry is null.Ted Kremenek2010-04-121-11/+18
| | | | llvm-svn: 101060
* add haiku support, patch by Paul Davey!Chris Lattner2010-04-111-0/+19
| | | | llvm-svn: 100982
* Disable diag::err_file_modified on Win32 completely, until someone cares to fixDaniel Dunbar2010-04-101-10/+12
| | | | | | | it. PR6812. - This is another attempt at silencing annoying buildbot failures. llvm-svn: 100914
* On Windows, disable the modification-time check for files used inDouglas Gregor2010-04-091-5/+11
| | | | | | | | precompiled headers and/or when reading the contents of the file into memory. These checks seem to be causing spurious regression-test failures on Windows. llvm-svn: 100866
* add clang -cc1 level support for "-ferror-limit 42"Chris Lattner2010-04-071-2/+2
| | | | llvm-svn: 100687
* add capabilities to stop emitting errors after some limit.Chris Lattner2010-04-071-0/+7
| | | | | | Right now the limit is 0 (aka disabled) llvm-svn: 100684
* Instead of counting totally diagnostics, split the count into a countChris Lattner2010-04-071-2/+5
| | | | | | | | | | | | | | | of errors and warnings. This allows us to emit something like this: 2 warnings and 1 error generated. instead of: 3 diagnostics generated. This also stops counting 'notes' because they are just follow-on information about the previous diag, not a diagnostic in themselves. llvm-svn: 100675
* Add option and macro definition for AES instructions. Now produces realEric Christopher2010-04-021-2/+20
| | | | | | assembly for testcases. llvm-svn: 100253
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-5/+5
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-5/+5
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-5/+5
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Optimize PartialDiagnostic's memory-allocation behavior by placing aDouglas Gregor2010-03-291-0/+11
| | | | | | | | | | | | | | cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. llvm-svn: 99849
* Teach the diagnostic engine to provide more detailed information aboutDouglas Gregor2010-03-251-4/+14
| | | | | | | | | how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. llvm-svn: 99560
* PS3 needs __PPC__. Should this be in the PPC target?John Thompson2010-03-251-0/+1
| | | | llvm-svn: 99513
* Fix a thinko and a typo in the delayed-diagnostic code.Douglas Gregor2010-03-221-3/+4
| | | | llvm-svn: 99178
* Introduce the notion of a single "delayed" diagnostic into theDouglas Gregor2010-03-222-3/+61
| | | | | | | | | | | | Diagnostic subsystem, which is used in the rare case where we find a serious problem (i.e., an inconsistency in the file system) while we're busy formatting another diagnostic. In this case, the delayed diagnostic will be emitted after we're done with the other diagnostic. This is only to be used for fatal conditions detected at very inconvenient times, where we can neither stop the current diagnostic in flight nor can we suppress the second error. llvm-svn: 99175
* Keep track of the size/modification time of each file source-locationDouglas Gregor2010-03-211-2/+1
| | | | | | | entry in a precompiled header, so that we can detect modified files even when we miss in the stat cache. llvm-svn: 99149
OpenPOWER on IntegriCloud