summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-119-18/+18
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* No longer defining GNUC mode when compiling for Microsoft compatibility. ↵Aaron Ballman2012-03-101-5/+8
| | | | | | This allows people's cross-platform compiler-specific macros to work properly. llvm-svn: 152512
* [analyzer] Add support for NoRedundancy inlining mode.Anna Zaks2012-03-091-1/+1
| | | | | | | | | | | We do not reanalyze a function, which has already been analyzed as an inlined callee. As per PRELIMINARY testing, this gives over 50% run time reduction on some benchmarks without decreasing of the number of bugs found. Turning the mode on by default. llvm-svn: 152440
* [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bitDaniel Dunbar2012-03-092-2/+2
| | | | | | more obvious. llvm-svn: 152408
* [analyzer] Rework inlining related command line options.Anna Zaks2012-03-081-3/+63
| | | | | | | | | - Remove -analyzer-inline-call. - Add -analyzer-ipa=[none|inlining] - Add -analyzer-inlining-mode to allow experimentation for different performance tuning methods. llvm-svn: 152351
* Replace MarkVarRequired with a more genericRafael Espindola2012-03-081-2/+2
| | | | | | HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
* Workaround module test failures by removing the version info from module hashes.Bob Wilson2012-03-071-1/+4
| | | | | | | | | | PR12196: The module hash strings are not actually hashing the compiler version string; the entire version string is being included in the hash. Depending on the module cache directory name, that can lead to failures where the path names become too long. As a temporary workaround, just remove the version string from the hash. llvm-svn: 152266
* [PCH] Mark a PCH file with a flag to indicate if the serialized AST hadArgyrios Kyrtzidis2012-03-073-12/+20
| | | | | | | | | | | | | | | | compiler errors or not. -Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time. By default, such a PCH file will be rejected with an error when trying to load it. [libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors occurred. -Have libclang API calls accept a PCH that had compiler errors. The general idea is that we want libclang to stay functional even if a PCH had a compiler error. rdar://10976363. llvm-svn: 152192
* CMake: Fix build to add clangEdit to USED_LIBS.NAKAMURA Takumi2012-03-061-0/+1
| | | | llvm-svn: 152154
* [driver] What was implemented in r152130 was actually -fno-inline-functions, notChad Rosier2012-03-061-3/+4
| | | | | | | -fno-inline. Part of rdar://10972766 llvm-svn: 152145
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-062-5/+83
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. llvm-svn: 152141
* [driver] Add support for -fno-inline.Chad Rosier2012-03-061-2/+4
| | | | | | rdar://10972766 llvm-svn: 152130
* Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola2012-03-051-0/+5
| | | | | | | | | | | | In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
* [preprocessor] Enhance PreprocessingRecord to keep track of locations of ↵Argyrios Kyrtzidis2012-03-051-1/+1
| | | | | | | | | conditional directives. Introduce PreprocessingRecord::rangeIntersectsConditionalDirective() which returns true if a given range intersects with a conditional directive block. llvm-svn: 152018
* Frontend: Default to creating output files using temporary files + rename.Daniel Dunbar2012-03-031-1/+2
| | | | | | | | | - This is a more reliable default, as it behaves better on failure and also ensures that we create *new* files (instead of reusing existing inodes). This is useful for other applications (like lldb) which want to cache inode's to know when a file has been rewritten. llvm-svn: 151961
* Frontend: Don't automatically create missing directories when using ↵Daniel Dunbar2012-03-032-7/+22
| | | | | | | | temporary files with createOutputFile() - This would otherwise happen as a side effect of llvm::sys::fs::unique_file creating parent directories. llvm-svn: 151960
* [analyzer] Bound the size of the functions being inlined + provideAnna Zaks2012-03-021-0/+6
| | | | | | | | | | | command line options for inlining tuning. This adds the option for stack depth bound as well as function size bound. + minor doxygenification llvm-svn: 151930
* Add the Solaris support directory to the header search when using libc++.David Chisnall2012-03-021-0/+5
| | | | | | | | Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a (hopefully temporary) work around for libc++ exposing C99-but-not-C++98 features in C++98 mode. llvm-svn: 151889
* [analyzer] Turn inlining on by default for better testing exposure.Anna Zaks2012-03-011-1/+2
| | | | | | Fix a test, which was most likely an unintended recursive call. llvm-svn: 151848
* Add a flag -fthread-sanitizer.Kostya Serebryany2012-03-011-0/+3
| | | | | | | | | | This flag enables ThreadSanitizer instrumentation committed to llvm as r150423. The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer. This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet committed and it's structure in compiler-rt is not 100% clear. The users manual wil be changed in a separate commit. llvm-svn: 151846
* Serialization: Switch over to using the native SmallVector based BitstreamWriterDaniel Dunbar2012-02-292-2/+2
| | | | | | ctor. llvm-svn: 151752
* Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall2012-02-281-7/+0
| | | | | | clang (and linking clang against it). llvm-svn: 151632
* [analyzer] Add -analyzer-stats, which hooks up LLVM stats tracking.Anna Zaks2012-02-271-0/+1
| | | | | | As in http://llvm.org/docs/ProgrammersManual.html#Statistic llvm-svn: 151570
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-252-11/+3
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 llvm-svn: 151427
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-208-24/+24
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* Implement #pragma redefine_extname.David Chisnall2012-02-181-0/+3
| | | | | | This fixes PR5172 and allows clang to compile C++ programs on Solaris using the system headers. llvm-svn: 150881
* 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
OpenPOWER on IntegriCloud