summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Remove the unuseful -fdiagnostics-show-nameDavid Blaikie2012-02-152-15/+0
| | | | | | | | | | | | | | This option was added in r129614 and doesn't have any use case that I'm aware of. It's possible that external tools are using these names - and if that's the case we can certainly reassess the functionality, but for now it lets us shave out a few unneeded bits from clang. Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool. This removes the actual diagnostic name strings from clang entirely. Reviewed by Chris Lattner & Ted Kremenek. llvm-svn: 150612
* Add some Solaris include paths and fix a -lgcc_eh that apparently should be ↵David Chisnall2012-02-151-0/+9
| | | | | | -lgcc_s. llvm-svn: 150602
* include clang's config.h unconditionally (v2)Dylan Noblesmith2012-02-141-4/+1
| | | | | | | | | | And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. Reverts r149571/restores r149504, now that config.h is generated correctly by LLVM's configure in all build configurations. llvm-svn: 150487
* Refactor DiagnosticRenderer and SDiagsRenderer to have some functionalityTed Kremenek2012-02-143-34/+38
| | | | | | | | | pulled into DiagnosticNoteRenderer, and common DiagnosticRenderer that assumes that all custom diagnostic messages are notes. Also extend DiagnosticRenderer to work with StoredDiagnostics in preparation for subsequent changes. llvm-svn: 150455
* [libclang] Indexing API: Fully index implict template instantiations.Argyrios Kyrtzidis2012-02-101-0/+5
| | | | llvm-svn: 150267
* Add ArrayRef goodness in MultiplexASTMutationListener.Argyrios Kyrtzidis2012-02-101-3/+3
| | | | llvm-svn: 150266
* Update MultiplexASTMutationListener with the missing methods from ↵Argyrios Kyrtzidis2012-02-101-0/+18
| | | | | | ASTMutationListener. llvm-svn: 150265
* Revert my patches which removed Diagnostic.h includes by moving some ↵Benjamin Kramer2012-02-071-3/+3
| | | | | | | | | | | | | | | | | | operator overloads out of line. This seems to negatively affect compile time onsome ObjC tests (which use a lot of partial diagnostics I assume). I have to come up with a way to keep them inline without including Diagnostic.h everywhere. Now adding a new diagnostic requires a full rebuild of e.g. the static analyzer which doesn't even use those diagnostics. This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99. This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789. This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7. This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f. This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5. llvm-svn: 150006
* Print NamedDecls directly to a raw_ostream where possible.Benjamin Kramer2012-02-071-1/+1
| | | | llvm-svn: 149982
* Move instantiateTemplateAttribute into the sema namespace, make helpers static.Benjamin Kramer2012-02-061-1/+1
| | | | llvm-svn: 149864
* Invalid O levels on the command line no longer have a confusing error.Aaron Ballman2012-02-061-4/+5
| | | | llvm-svn: 149852
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-0516-32/+32
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-057-39/+39
| | | | llvm-svn: 149798
* Move a method from IdentifierTable.h out of line and remove the SmallString ↵Benjamin Kramer2012-02-041-0/+1
| | | | | | | | include. Fix all the transitive include users. llvm-svn: 149783
* Remove Diagnostic.h include from Preprocessor.h.Benjamin Kramer2012-02-041-3/+3
| | | | | | | - Move the offending methods out of line and fix transitive includers. - This required changing an enum in the PPCallback API into an unsigned. llvm-svn: 149782
* ArrayRef goodness in MultiplexConsumer, no functionality change.Argyrios Kyrtzidis2012-02-041-2/+3
| | | | llvm-svn: 149764
* Use variable in place of multiple CI.getFrontendOpts() calls and use a bitArgyrios Kyrtzidis2012-02-041-2/+2
| | | | | | of ArrayRef goodness. No functionality change. llvm-svn: 149739
* Clang has existing support for debuggers thatSean Callanan2012-02-041-0/+3
| | | | | | | | | | | | | | | | | | | | want to provide "po"-like functionality which treats the result of an expression implicitly as "id" (if it is not otherwise known) and prints it as an Objective-C object. This has in the past been gated by the "DebuggerSupport" language option, but that is too general. Debuggers also provide other commands like "print" that do not make any assumptions about whether the object is an Objective-C object. This patch makes the assumption conditional on a new language option: DebuggerCastResultToId. I have also made corresponding modifications to the testsuite. llvm-svn: 149735
* Make sure that the layout-override parser grabs the size, not the dataDouglas Gregor2012-02-031-3/+3
| | | | | | size. Otherwise, we can end up with bogus layouts. llvm-svn: 149703
* Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>Bob Wilson2012-02-031-0/+1
| | | | | | | | | That llvm change removed the -trap-func backend option, so that using -ftrap-function with clang would cause the backend to complain. Fix it by adding the trap function name to the CodeGenOptions and passing it through to the TargetOptions. llvm-svn: 149679
* Replace the old --with-cxx-* configure options with a single ↵Rafael Espindola2012-02-031-13/+0
| | | | | | | | | --with-gcc-toolchain that just uses the new toolchain probing logic. This fixes linking with -m32 on 64 bit systems (the /32 dir was not being added to the search). llvm-svn: 149652
* Rename -dependency-graphviz to -dependencncy-dotDouglas Gregor2012-02-023-4/+5
| | | | llvm-svn: 149645
* Back out my heinous hack that tricked the module generation mechanismDouglas Gregor2012-02-022-39/+34
| | | | | | | | | | | | | | | | | | | | into using non-absolute system includes (<foo>)... ... and introduce another hack that is simultaneously more heineous and more effective. We whitelist Clang-supplied headers that augment or override system headers (such as float.h, stdarg.h, and tgmath.h). For these headers, Clang does not provide a module mapping. Instead, a system-supplied module map can refer to these headers in a system module, and Clang will look both in its own include directory and wherever the system-supplied module map suggests, then adds either or both headers. The end result is that Clang-supplied headers get merged into the system-supplied module for the C standard library. As a drive-by, fix up a few dependencies in the _Builtin_instrinsics module. llvm-svn: 149611
* Introduce a -cc1 option "-dependency-graphviz" that determines headerDouglas Gregor2012-02-024-0/+145
| | | | | | dependencies and outputs them in GraphViz format. llvm-svn: 149575
* back out r149504Dylan Noblesmith2012-02-021-1/+4
| | | | | | Too many weird build failures. llvm-svn: 149571
* [libclang] Make sure we don't ever leave a StoredDiagnostic associated withArgyrios Kyrtzidis2012-02-011-10/+34
| | | | | | a SourceManager that has already been deleted, rdar://10768346. llvm-svn: 149532
* include clang's config.h unconditionallyDylan Noblesmith2012-02-011-5/+3
| | | | | | | | | | | | | And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. llvm-svn: 149504
* Split compiler builtin module into "stdlib" builtins and "intrinsic"Douglas Gregor2012-01-311-26/+39
| | | | | | | | builds, and bring mm_alloc.h into the fold. Start playing some tricks with these builtin modules to mirror the include_next tricks that the headers already perform. llvm-svn: 149434
* Fix 80-column violation.Chad Rosier2012-01-311-1/+2
| | | | llvm-svn: 149405
* Thread a TargetInfo through to the module map; we'll need it forDouglas Gregor2012-01-303-4/+6
| | | | | | target-specific module requirements. llvm-svn: 149224
* Switch over to LLVM's file-level locking facilityDouglas Gregor2012-01-291-265/+5
| | | | llvm-svn: 149204
* Ensure that we clean up after a failed module build and cope with theDouglas Gregor2012-01-292-1/+4
| | | | | | results in libclang. llvm-svn: 149200
* Implement code completion support for module import declarations, e.g.,Douglas Gregor2012-01-291-1/+0
| | | | | | | | | | | | @import <complete with module names here> or @import std.<complete with submodule names here> Addresses <rdar://problem/10710117>. llvm-svn: 149199
* Rework HeaderSearch's interface for getting a module from a name andDouglas Gregor2012-01-292-5/+20
| | | | | | | | | for getting the name of the module file, unifying the code for searching for a module with a given name (into lookupModule()) and separating out the mapping to a module file (into getModuleFileName()). No functionality change. llvm-svn: 149197
* Complain about attempts to use 'protected' visibility on targetsJohn McCall2012-01-291-0/+1
| | | | | | | | like Darwin that don't support it. We should also complain about invalid -fvisibility=protected, but that information doesn't seem to exist at the most appropriate time, so I've left a FIXME behind. llvm-svn: 149186
* Introduce module attributes into the module map grammar, along with aDouglas Gregor2012-01-273-8/+16
| | | | | | | | | | | | | single attribute ("system") that allows us to mark a module as being a "system" module. Each of the headers that makes up a system module is considered to be a system header, so that we (for example) suppress warnings there. If a module is being inferred for a framework, and that framework directory is within a system frameworks directory, infer it as a system framework. llvm-svn: 149143
* Due to a bug, -Wno-everything works like -Weverything. Fix the bug by havingArgyrios Kyrtzidis2012-01-271-2/+8
| | | | | | | | | -Wno-everything remap all warnings to ignored. We can now use "-Wno-everything -W<warning>" to ignore all warnings except specific ones. llvm-svn: 149121
* objc-arc: introduce -no-finalize-removal which in gc mode,Fariborz Jahanian2012-01-261-0/+1
| | | | | | | | leaves "finalize' behind and in arc mode, does not include it. This allows the migrated source to be compiled in both gc and arc mode. // rdar://10532441 llvm-svn: 149079
* Extend the ExternalASTSource interface to allow the AST source toDouglas Gregor2012-01-264-3/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provide the layout of records, rather than letting Clang compute the layout itself. LLDB provides the motivation for this feature: because various layout-altering attributes (packed, aligned, etc.) don't get reliably get placed into DWARF, the record layouts computed by LLDB from the reconstructed records differ from the actual layouts, and badness occurs. This interface lets the DWARF data drive layout, so we don't need the attributes preserved to get the answer write. The testing methodology for this change is fun. I've introduced a variant of -fdump-record-layouts called -fdump-record-layouts-simple that always has the simple C format and provides size/alignment/field offsets. There is also a -cc1 option -foverride-record-layout=<file> to take the output of -fdump-record-layouts-simple and parse it to produce a set of overridden layouts, which is introduced into the AST via a testing-only ExternalASTSource (called LayoutOverrideSource). Each test contains a number of records to lay out, which use various layout-changing attributes, and then dumps the layouts. We then run the test again, using the preprocessor to eliminate the layout-changing attributes entirely (which would give us different layouts for the records), but supplying the previously-computed record layouts. Finally, we diff the layouts produced from the two runs to be sure that they are identical. Note that this code makes the assumption that we don't *have* to provide the offsets of bases or virtual bases to get the layout right, because the alignment attributes don't affect it. I believe this assumption holds, but if it does not, we can extend LayoutOverrideSource to also provide base offset information. Fixes the Clang side of <rdar://problem/10169539>. llvm-svn: 149055
* Introduce 3 new fixit options:Argyrios Kyrtzidis2012-01-261-0/+9
| | | | | | | | | | | | | | -fixit-recompile applies fixits and recompiles the result -fixit-to-temporary applies fixits to temporary files -fix-only-warnings">, applies fixits for warnings only, not errors Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits without touching the original sources. llvm-svn: 149027
* Fix -fmacro-backtrace-limit=0 to show the entire macro backtrace.Ted Kremenek2012-01-251-1/+2
| | | | llvm-svn: 148930
* Rework the external Sema source's ReadMethodPool() so that it doesn'tDouglas Gregor2012-01-251-3/+2
| | | | | | | return pre-built lists. Instead, it feeds the methods it deserializes to Sema so that Sema can unique them, which keeps the chains shorter. llvm-svn: 148889
* arc migrator: Provide infrastructure to add optionsFariborz Jahanian2012-01-251-0/+6
| | | | | | | | | specific to migrator. Use its first option to warn migrating from GC to arc when NSAllocateCollectable/NSReallocateCollectable is used. // rdar://10532541 llvm-svn: 148887
* Improve Lexer::getImmediateMacroName to take into account inner macrosArgyrios Kyrtzidis2012-01-231-1/+38
| | | | | | | | | of macro arguments. For "MAC1( MAC2(foo) )" and location of 'foo' token it would return "MAC1" instead of "MAC2". llvm-svn: 148704
* Add support for -fno-optimize-sibling-calls. Currently only implemented in theNick Lewycky2012-01-231-0/+3
| | | | | | X86 backend in LLVM. llvm-svn: 148689
* lib/Frontend/InitHeaderSearch.cpp: [Cygwin] Add 4.5.3.NAKAMURA Takumi2012-01-211-0/+1
| | | | llvm-svn: 148637
* [Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.NAKAMURA Takumi2012-01-211-2/+0
| | | | llvm-svn: 148636
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+0
| | | | llvm-svn: 148577
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-208-69/+61
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* Refactor: Pull getImmediateMacroName() out of DiagnosticRenderer andAnna Zaks2012-01-181-30/+1
| | | | | | into Lexer and Preprocessor; making it widely available. llvm-svn: 148410
OpenPOWER on IntegriCloud