Commit Graph

1840 Commits

Author SHA1 Message Date
Douglas Gregor 46ce91a964 Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129614
2011-04-15 22:04:17 +00:00
Fariborz Jahanian 193f783a99 Fixes a crash when generating dependency file stuff
and output file is not writable. // rdar://9286457.

llvm-svn: 129587
2011-04-15 18:49:23 +00:00
Richard Smith dda56e4b4a Support for C++11 (non-template) alias declarations.
llvm-svn: 129567
2011-04-15 14:24:37 +00:00
Chris Lattner 57540c5be0 fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Peter Collingbourne a686b5f8bf C1X: add a language standard
llvm-svn: 129553
2011-04-15 00:35:23 +00:00
Sebastian Redl 9ab988fe00 Chained PCH: Remember when additional specializations are added to a 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
2011-04-14 14:07:59 +00:00
Sebastian Redl 4e52123d06 Fix -H. It was pretty broken.
llvm-svn: 129514
2011-04-14 14:07:45 +00:00
John McCall 39439739cf Fix a bunch of major problems with __unknown_anytype and properly test
for them.  The only major missing feature is references.

llvm-svn: 129234
2011-04-09 22:50:59 +00:00
Chris Lattner 5045cf1a61 accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,
per PR9577

llvm-svn: 129201
2011-04-09 07:09:31 +00:00
Daniel Dunbar 44d9ef78ca Frontend/CC_LOG_DIAGNOSTICS: Fix thinko and open diag log in append mode.
llvm-svn: 129103
2011-04-07 20:19:21 +00:00
Daniel Dunbar 7b83306d20 Fronted/CC_LOG_DIAGNOSTICS: Wire up dwarf-debug-flags support.
llvm-svn: 129095
2011-04-07 18:59:02 +00:00
Daniel Dunbar c032503274 Fronted/CC_LOG_DIAGNOSTICS: Output main file name, and add support for
outputting dwarf-debug-flags.

llvm-svn: 129094
2011-04-07 18:51:54 +00:00
Daniel Dunbar 719393a56b Fronted/CC_LOG_DIAGNOSTICS: Tweak output form to be plist chunks, and don't
output missing data.

llvm-svn: 129093
2011-04-07 18:44:15 +00:00
Daniel Dunbar 4f3a28b387 Frontend: Continue flushing out LogDiagnosticPrinter.
llvm-svn: 129091
2011-04-07 18:37:34 +00:00
Daniel Dunbar 2083c32f7a Frontend: Sketch a LogDiagnosticPrinter object, and wire CC_LOG_DIAGNOSTICS to
it.

llvm-svn: 129089
2011-04-07 18:31:10 +00:00
Daniel Dunbar 6b58486466 Frontend: Sketch support for -diagnostic-log-file, which still doesn't do anything.
llvm-svn: 129086
2011-04-07 18:11:14 +00:00
Eric Christopher 534b6a01e8 Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.
Patch by Bobby Powers

llvm-svn: 129014
2011-04-06 18:22:53 +00:00
Argyrios Kyrtzidis 0e93ac675e Also update CMakeList.txt
llvm-svn: 128854
2011-04-04 23:17:56 +00:00
Argyrios Kyrtzidis 02d32aec00 Add missing file for my previous commit.
llvm-svn: 128853
2011-04-04 23:16:36 +00:00
Argyrios Kyrtzidis 5cf423ec8a Move Driver::createInvocationFromArgs function to Frontend library to avoid dependency cycle
between libFrontend and libDriver.

llvm-svn: 128852
2011-04-04 23:11:45 +00:00
Argyrios Kyrtzidis f606b82e9a Introduce Driver::createInvocationFromArgs used to create a CompilerInvocation from command-line args.
llvm-svn: 128848
2011-04-04 21:38:51 +00:00
Matt Beaumont-Gay 4ed4e93b18 Remove a redundant isValid() check
llvm-svn: 128606
2011-03-31 01:46:47 +00:00
Daniel Dunbar 3b17a865bb Change Clang's __VERSION__ to include the same basic info as in clang -v.
- Please never ever ever ever write a tool that sniffs this.

llvm-svn: 128599
2011-03-31 00:53:51 +00:00
Daniel Dunbar 67919b2a5b Integrated-As: Support -Wa,-L when using the integrated assembler.
llvm-svn: 128433
2011-03-28 22:49:28 +00:00
Chandler Carruth 24284afa2d Flip the default for showing include stacks on notes to false. This
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
2011-03-27 20:00:08 +00:00
Chandler Carruth b6766f07c8 Add an option to suppress include stack printing on note diagnostics.
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
2011-03-27 01:50:55 +00:00
Chris Lattner ce6c42f65f switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.
llvm-svn: 128142
2011-03-23 04:04:01 +00:00
Ted Kremenek d6f4ad1579 std::vector::data() is not portable to VS. Use a gross hack instead.
llvm-svn: 128138
2011-03-23 02:16:41 +00:00
Daniel Dunbar 12100e2c7f Frontend: Add a more explicit -backend-option flag for passing backend command
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
2011-03-22 16:48:17 +00:00
Ted Kremenek 022a4904fa Rework crash recovery cleanup in ASTUnit and CIndex to recover more memory during a Sema crash (we have just a handful of leaks left)
and to use the simplified cleanup registration API.

llvm-svn: 128059
2011-03-22 01:15:24 +00:00
Daniel Dunbar fe908a805b Frontend: Change CC_PRINT_HEADERS to not print header depth markers, these don't
really make any sense in this environment.

llvm-svn: 128014
2011-03-21 19:37:38 +00:00
Ted Kremenek 5e14d39a88 Improve crash recovery cleanup to recovery CompilerInstances during crash 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
2011-03-21 18:40:17 +00:00
Ted Kremenek 84de4a1781 Use CrashRecoveryContextCleanup objects to reclaim resources from CompilerInstance objects.
llvm-svn: 128009
2011-03-21 18:40:07 +00:00
Daniel Dunbar 5366ff1865 Preprocessor: Don't define __STDC__ in -traditional-cpp mode.
llvm-svn: 127933
2011-03-19 01:04:12 +00:00
Peter Collingbourne 599cb8e430 Add support for language-specific address spaces. On top of that,
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
2011-03-18 22:38:29 +00:00
Daniel Dunbar 1057f86d0e Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

llvm-svn: 127910
2011-03-18 21:23:38 +00:00
Anders Carlsson 9583f794c3 Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
llvm-svn: 127894
2011-03-18 19:23:38 +00:00
Anders Carlsson c30dcecb5c Correctly store and keep track of the FileSystemOptions in ASTUnit and in clang_codeCompleteAt.
llvm-svn: 127890
2011-03-18 18:22:40 +00:00
John McCall 7ef5cb3038 The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error;  it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.

llvm-svn: 127854
2011-03-18 02:56:14 +00:00
Ted Kremenek 4422bfea50 Use CrashRecoveryContextCleanup objects to recover an ASTUnit if we crash in ASTUnit::LoadFromCommandLine() and ASTUnit::LoadFromCompilerInvocation().
llvm-svn: 127851
2011-03-18 02:06:56 +00:00
Sandeep Patel 5a4a0f75d4 Fix duplicate argument processing
llvm-svn: 127746
2011-03-16 19:14:34 +00:00
NAKAMURA Takumi 63b4b456be lib/Frontend/InitHeaderSearch.cpp: Introduce AddMinGW64CXXPaths(Base) for x86_64-w64-mingw32.
llvm-svn: 127652
2011-03-15 02:32:36 +00:00
Douglas Gregor 7ee23a8698 Add include paths for Gentoo Linux, from Marcin Mirosław!
llvm-svn: 127582
2011-03-14 15:33:44 +00:00
Anders Carlsson 9ba8fb1e48 Get rid of the static FileManager::FixupRelativePath.
llvm-svn: 127573
2011-03-14 01:13:54 +00:00
Argyrios Kyrtzidis 35dcda7922 Introduce '-chain-include' option to specify headers that will be converted to chained PCHs in memory
without having to use multiple runs and intermediate files.

Intended for testing & debugging of chained PCH.

llvm-svn: 127339
2011-03-09 17:21:42 +00:00
Argyrios Kyrtzidis 97d3a38c3e Add 'OverridenFilesKeepOriginalName' field in SourceManager which if true the SourceManager
should report the original file name for contents of files that were overriden by other files,
otherwise it should report the name of the new file. Default is true.

Also add similar field in PreprocessorOptions and pass similar parameter in ASTUnit::LoadFromCommandLine.

llvm-svn: 127289
2011-03-08 23:35:24 +00:00
Argyrios Kyrtzidis bc1f48f654 Allow passing '-###' to ASTUnit::LoadFromCommandLine to print out the cc1 options.
llvm-svn: 127183
2011-03-07 22:45:01 +00:00
Douglas Gregor cfee35b845 Remove the AST printer (-ast-print-xml), which is too incomplete and
too low-level to actually be useful but is just interesting enough for
people to try to use it (which won't actually work beyond toy examples).

To bring back the AST printer, it needs to be:
  - Complete, covering all of C/C++/Objective-C
  - Documented, with appropriate Schema against which we can validate
  the output
  - Designed for C/C++/Objective-C, not Clang's specific ASTs
  - Stable across Clang versions
  - Well-tested

llvm-svn: 127141
2011-03-07 01:03:30 +00:00
Anders Carlsson b5c356a4d5 Convert FileManager::FixupRelativePath over to using PathV2.
llvm-svn: 127133
2011-03-06 22:25:35 +00:00
Douglas Gregor 189c0e8923 Add MinGW GCC 4.5.2 include paths, from Matthieu Monrocq
llvm-svn: 127124
2011-03-06 18:00:59 +00:00