summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Implement -fno-dwarf2-cfi-asm.Rafael Espindola2011-04-301-0/+3
| | | | llvm-svn: 130616
* Removed redundant case statementsChad Rosier2011-04-301-2/+0
| | | | llvm-svn: 130564
* Add -Oz option and use it to set the inline threshold to 25.Bob Wilson2011-04-291-3/+4
| | | | | | Radar 9333566. Patch by Chad Rosier! llvm-svn: 130554
* Add a decl update when a static data member of a class template is ↵Sebastian Redl2011-04-291-0/+6
| | | | | | instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost. llvm-svn: 130488
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-281-6/+0
| | | | | | | | | | | | | | defines to real types. Otherwise statements like: __int64 var = __int64(0); would be expanded to: long long var = long long(0); and fail to compile. llvm-svn: 130369
* Add libstdc++ search paths for GCC 4.6.0 on Arch Linux. Patch by Jakub ↵Nico Weber2011-04-251-0/+7
| | | | | | Wieczorek. llvm-svn: 130152
* Synthesizing the definition of an implicit member is an AST modification, so ↵Sebastian Redl2011-04-241-0/+6
| | | | | | notify any mutation listeners of it. This fixes a crasher in chained PCH, where an implicit destructor in a PCH gets a definition in a chained PCH, which is then lost. However, any further use of the destructor would cause its definition to be regenerated in the final file, hiding the bug. llvm-svn: 130103
* Move all of the logic for __DEPRECATED to the driver based on commentsChandler Carruth2011-04-232-4/+5
| | | | | | from dgregor. llvm-svn: 130066
* Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. ThisChandler Carruth2011-04-232-1/+9
| | | | | | | | | | | | | | | | | | matches GCC behavior which libstdc++ uses to limit #warning-based messages about deprecation. The machinery involves threading this through a new '-fdeprecated-macro' flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We turn the flag off in the driver when the warning is turned off (modulo matching some GCC bugs). We record this as a language option, and key the preprocessor on the option when introducing the define. A separate flag rather than a '-D' flag allows us to properly represent the difference between C and C++ builds (only C++ receives the define), and it allows the specific behavior of following -Wdeprecated without potentially impacting the set of user-provided macro flags. llvm-svn: 130055
* There were some frustrating problems with the implementation ofChandler Carruth2011-04-231-2/+3
| | | | | | | | | | | | | | | | | | | | -Wwrite-strings. First and foremost, once the positive form of the flag was passed, it could never be disabled by passing -Wno-write-strings. Also, the diagnostic engine couldn't in turn use -Wwrite-strings to control diagnostics (as GCC does) because it was essentially hijacked to drive the language semantics. Fix this by giving CC1 a clean '-fconst-strings' flag to enable const-qualified strings in C and ObjC compilations. Corresponding '-fno-const-strings' is also added. Then the driver is taught to introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings' dominates. This entire flag is basically GCC-bug-compatibility driven, so we also match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm open to changing this though as it seems insane. llvm-svn: 130051
* Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet2011-04-221-0/+6
| | | | | | | | | function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
* Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky2011-04-211-0/+6
| | | | | | | | | compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
* PR9772: Fix the definition of WINT_MIN and WINT_MAX on Linux -ffreestanding.Eli Friedman2011-04-211-0/+3
| | | | llvm-svn: 129907
* ADT/Triple: Switch to using .isOSDarwin() predicate.Daniel Dunbar2011-04-191-28/+31
| | | | llvm-svn: 129823
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-152-0/+10
| | | | | | Monrocq llvm-svn: 129614
* Fixes a crash when generating dependency file stuffFariborz Jahanian2011-04-151-1/+1
| | | | | | and output file is not writable. // rdar://9286457. llvm-svn: 129587
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-2/+3
| | | | llvm-svn: 129567
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* C1X: add a language standardPeter Collingbourne2011-04-151-0/+1
| | | | llvm-svn: 129553
* Chained PCH: Remember when additional specializations are added to a ↵Sebastian Redl2011-04-141-0/+7
| | | | | | function template from a previous PCH. Fixes the only crasher when using massive chains on Clang's Sema component. We still have some incomplete codegen there. llvm-svn: 129516
* Fix -H. It was pretty broken.Sebastian Redl2011-04-141-5/+9
| | | | llvm-svn: 129514
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-091-0/+3
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,Chris Lattner2011-04-091-0/+1
| | | | | | per PR9577 llvm-svn: 129201
* Frontend/CC_LOG_DIAGNOSTICS: Fix thinko and open diag log in append mode.Daniel Dunbar2011-04-071-1/+1
| | | | llvm-svn: 129103
* Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.Daniel Dunbar2011-04-071-5/+10
| | | | llvm-svn: 129095
* Fronted/CC_LOG_DIAGNOSTICS: Output main file name, and add support forDaniel Dunbar2011-04-071-2/+19
| | | | | | outputting dwarf-debug-flags. llvm-svn: 129094
* Fronted/CC_LOG_DIAGNOSTICS: Tweak output form to be plist chunks, and don'tDaniel Dunbar2011-04-071-11/+25
| | | | | | output missing data. llvm-svn: 129093
* Frontend: Continue flushing out LogDiagnosticPrinter.Daniel Dunbar2011-04-071-5/+81
| | | | llvm-svn: 129091
* Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS toDaniel Dunbar2011-04-073-0/+72
| | | | | | it. llvm-svn: 129089
* Frontend: Sketch support for -diagnostic-log-file, which still doesn't do ↵Daniel Dunbar2011-04-071-0/+5
| | | | | | anything. llvm-svn: 129086
* Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.Eric Christopher2011-04-061-0/+5
| | | | | | Patch by Bobby Powers llvm-svn: 129014
* Also update CMakeList.txtArgyrios Kyrtzidis2011-04-041-0/+1
| | | | llvm-svn: 128854
* Add missing file for my previous commit.Argyrios Kyrtzidis2011-04-041-0/+90
| | | | llvm-svn: 128853
* Move Driver::createInvocationFromArgs function to Frontend library to avoid ↵Argyrios Kyrtzidis2011-04-041-1/+1
| | | | | | | | dependency cycle between libFrontend and libDriver. llvm-svn: 128852
* Introduce Driver::createInvocationFromArgs used to create a ↵Argyrios Kyrtzidis2011-04-041-52/+4
| | | | | | CompilerInvocation from command-line args. llvm-svn: 128848
* Remove a redundant isValid() checkMatt Beaumont-Gay2011-03-311-1/+1
| | | | llvm-svn: 128606
* Change Clang's __VERSION__ to include the same basic info as in clang -v.Daniel Dunbar2011-03-311-1/+6
| | | | | | - Please never ever ever ever write a tool that sniffs this. llvm-svn: 128599
* Integrated-As: Support -Wa,-L when using the integrated assembler.Daniel Dunbar2011-03-281-0/+3
| | | | llvm-svn: 128433
* Flip the default for showing include stacks on notes to false. ThisChandler Carruth2011-03-271-4/+4
| | | | | | | | | | | | | required modifying a few tests that specifically use note include stacks to check the source manager's view of include stacks. I've simply added the flag to these tests for now, they may have to be more substantially changed if we decide to remove support for note include stacks altogether. Also, add a test for include stacks on notes that was supposed to go in with the previous commit. llvm-svn: 128390
* Add an option to suppress include stack printing on note diagnostics.Chandler Carruth2011-03-272-10/+22
| | | | | | | | | | | | | | | | | | These stacks are often less important than those on primary diagnostics. As the number of notes grows, this becomes increasingly important. The include stack printing is clever and doesn't print stacks for adjacent diagnostics from the same file, but when a note is in between a sequence of errors in a header file, and the notes all refer to some other file, we end up getting a worst-case ping-pong of include stacks that take up a great deal of vertical space. Still, for now, the default behavior isn't changed. We can evaluate user feedback with the flag. Patch by Richard Trieu, a couple of style tweaks from me. llvm-svn: 128371
* switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.Chris Lattner2011-03-231-4/+2
| | | | llvm-svn: 128142
* std::vector::data() is not portable to VS. Use a gross hack instead.Ted Kremenek2011-03-231-1/+3
| | | | llvm-svn: 128138
* Frontend: Add a more explicit -backend-option flag for passing backend commandDaniel Dunbar2011-03-221-0/+5
| | | | | | | | line options, instead of leveraging the blanket -mllvm option. - This allows using the frontend itself without requiring the backend have those options available (i.e., if the target wasn't built). llvm-svn: 128087
* Rework crash recovery cleanup in ASTUnit and CIndex to recover more memory ↵Ted Kremenek2011-03-221-25/+46
| | | | | | | | during a Sema crash (we have just a handful of leaks left) and to use the simplified cleanup registration API. llvm-svn: 128059
* Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don'tDaniel Dunbar2011-03-212-8/+15
| | | | | | really make any sense in this environment. llvm-svn: 128014
* Improve crash recovery cleanup to recovery CompilerInstances during crash ↵Ted Kremenek2011-03-213-95/+80
| | | | | | | | | | recovery. This was a huge resource "root" during crashes. This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance object. llvm-svn: 128011
* Use CrashRecoveryContextCleanup objects to reclaim resources from ↵Ted Kremenek2011-03-211-72/+90
| | | | | | CompilerInstance objects. llvm-svn: 128009
* Preprocessor: Don't define __STDC__ in -traditional-cpp mode.Daniel Dunbar2011-03-191-1/+1
| | | | llvm-svn: 127933
* Add support for language-specific address spaces. On top of that,Peter Collingbourne2011-03-181-0/+3
| | | | | | | | | add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
* Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPLDaniel Dunbar2011-03-181-0/+3
| | | | | | comments. llvm-svn: 127910
OpenPOWER on IntegriCloud