summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [dllimport] A non-imported class with an imported key can't have a keyReid Kleckner2015-08-102-0/+14
| | | | | | | | | | | | | | | | | Summary: The vtable takes its DLL storage class from the class, not the key function. When they disagree, the vtable won't be exported by the DLL that defines the key function. The easiest way to ensure that importers of the class emit their own vtable is to say that the class has no key function. Reviewers: hans, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11913 llvm-svn: 244488
* [clang-cl] Add support for CL and _CL_ environment variablesDavid Majnemer2015-08-102-0/+38
| | | | | | | | | | cl uses 'CL' and '_CL_' to prepend and append command line options to the given argument vector. There is an additional quirk whereby '#' is transformed into '='. Differential Revision: http://reviews.llvm.org/D11896 llvm-svn: 244473
* Correct x86_64 fp128 calling conventionChih-Hung Hsieh2015-08-102-12/+143
| | | | | | | | | | | | | | | | These changes are for Android x86_64 targets to be compatible with current Android g++ and conform to AMD64 ABI. https://llvm.org/bugs/show_bug.cgi?id=23897 * Return type of long double (fp128) should be fp128, not x86_fp80. * Vararg of long double (fp128) could be in register and overflowed to memory. https://llvm.org/bugs/show_bug.cgi?id=24111 * Return value of long double (fp128) _Complex should be in memory like a structure of {fp128,fp128}. Differential Revision: http://reviews.llvm.org/D11437 llvm-svn: 244468
* Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll".Mark Heffernan2015-08-1012-77/+124
| | | | | | | | | | | | | | | | | | | | | | This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs the optimizer to unroll a loop fully if the trip count is known at compile time, and unroll partially if the trip count is not known at compile time. This differs from "llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not known at compile time With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than "llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all". The motivating example for this change was some internal code with a loop marked with "#pragma unroll" which only sometimes had a compile-time trip count depending on template magic. When the trip count was a compile-time constant, everything works as expected and the loop is fully unrolled. However, when the trip count was not a compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!). Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable from a performance perspective. llvm-svn: 244467
* Add WebKit brace style configuration option.Roman Kashitsyn2015-08-104-11/+59
| | | | | | | | | | | | | | | | | | Summary: Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html: * Function definitions: place each brace on its own line. * Other braces: place the open brace on the line preceding the code block; place the close brace on its own line. Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`. Reviewers: djasper, klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D11837 llvm-svn: 244446
* [Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernelJohn Brawn2015-08-102-24/+21
| | | | | | | | | | | -mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour when -fno-common is default. Differential Revision: http://reviews.llvm.org/D11459 llvm-svn: 244437
* [Static Analyzer] Warn when inner and outer conditions are identical. The ↵Daniel Marjamaki2015-08-102-0/+50
| | | | | | | | inner condition is always true. Reviewed in http://reviews.llvm.org/D10892. llvm-svn: 244435
* [tests] Remove calls to grepFilipe Cabecinhas2015-08-101-3/+4
| | | | llvm-svn: 244433
* [MSVC] Crash fix: assigning of overloaded member function pointer caused ↵Alexey Bataev2015-08-102-0/+19
| | | | | | | | | assertion Original class was not marked with inheritance attribute and it causes a crash on codegen. Differential Revision: http://reviews.llvm.org/D11828 llvm-svn: 244428
* clang/test/Modules: Satisfy win32 hosts due to dospath issue.NAKAMURA Takumi2015-08-093-3/+3
| | | | llvm-svn: 244427
* [modules] Remove now-dead code for lazy loading of files specified by ↵Richard Smith2015-08-097-85/+3
| | | | | | -fmodule-file=. llvm-svn: 244417
* [modules] PR22534: Load files specified by -fmodule-file= eagerly. In ↵Richard Smith2015-08-0912-123/+190
| | | | | | particular, this avoids the need to re-parse module map files when using such a module. llvm-svn: 244416
* Unrevert r244412 (reverted in r244414), and delete the bogus line left behindRichard Smith2015-08-092-5/+9
| | | | | | in the unit test that was checking a file the test no longer creates. llvm-svn: 244415
* Revert "[modules] Don't leak -M flags for dependency file generation into ↵Justin Bogner2015-08-092-9/+4
| | | | | | | | | | | | | | | the module" This was failing tests on a bunch of bots: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/ http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/ This reverts r244412 llvm-svn: 244414
* [modules] When building a dependency file, include module maps parsed in theRichard Smith2015-08-097-7/+76
| | | | | | current compilation, not just those from imported modules. llvm-svn: 244413
* [modules] Don't leak -M flags for dependency file generation into the moduleRichard Smith2015-08-092-4/+9
| | | | | | | | | | build process when we implicitly build a module. Previously, we'd create the specified .d file once for each implicitly-built module and then finally overwrite it with the correct contents after the requested build completes. (This fails if you use stdout as a dependency file, which is what the provided testcase does, and is how I discovered this brokenness.) llvm-svn: 244412
* [modules] Attach dependency listeners to the module manager once when it'sRichard Smith2015-08-091-9/+7
| | | | | | | | created, rather than creating and attaching a new listener each time we load a module file (yes, the old ones were kept around too!). No functionality change intended, but a bit more sanity. llvm-svn: 244411
* Add file missed from r244409.Richard Smith2015-08-091-0/+9
| | | | llvm-svn: 244410
* [modules] When loading a template specialization, re-canonicalize its templateRichard Smith2015-08-097-15/+58
| | | | | | | | arguments because the reloaded form might have become non-canonical across the serialization/deserialization step (this particularly happens when the canonical form of the type involves an expression). llvm-svn: 244409
* Teach mingw toolchain driver to properly emit static or dynamic linking of ↵Yaron Keren2015-08-092-2/+43
| | | | | | | | | | ligcc. Implemented in MinGW::Linker::AddLibGCC since AddLibgcc is a logic puzzle even before adding one more boolean. A first step towards simplification of AddLibgcc would be to factor out the Android AddLibgcc code into its own routine. llvm-svn: 244407
* [Static Analyzer] Add --analyzer-target option to scan-build.Ted Kremenek2015-08-082-1/+37
| | | | | | | | | | | | | | When interposing on a compiler doing cross-compilation, scan-build does not infer the target triple needed to pass to clang for doing static analysis. The --analyzer-target option allows one to manually specify the target triple used during static analysis (and only static analysis) for such cases. Patch by Honggyu Kim! Reviewed in http://reviews.llvm.org/D10356. llvm-svn: 244400
* Revert "[analyzer] Add checkers for OS X / iOS localizability issues"Anna Zaks2015-08-085-897/+0
| | | | | | | | This reverts commit fc885033a30b6e30ccf82398ae7c30e646727b10. Revert all localization checker commits until the proper fix is implemented. llvm-svn: 244394
* Revert "[analyzer] Fixup to r244389 to make this build on windows."Anna Zaks2015-08-081-1/+1
| | | | | | | | This reverts commit 57a46a75b408245cf4154a838fe13ad702065745. Revert all localization checker commits until the proper fix is implemented. llvm-svn: 244393
* [analyzer] Fixup to r244389 to make this build on windows.Anna Zaks2015-08-081-1/+1
| | | | llvm-svn: 244390
* [analyzer] Add checkers for OS X / iOS localizability issuesAnna Zaks2015-08-085-0/+897
| | | | | | | | | | | | Add checkers that detect code-level localizability issues for OS X / iOS: - A path sensitive checker that warns about uses of non-localized NSStrings passed to UI methods expecting localized strings. - A syntax checker that warns against not including a comment in NSLocalizedString macros. A patch by Kulpreet Chilana! llvm-svn: 244389
* [analyzer] Don't issue alarm in ObjCSuperCallChecker for the super class itself.Devin Coughlin2015-08-082-2/+21
| | | | | | | | | | | | | | | | | The ObjCSuperCallChecker issues alarms for various Objective-C APIs that require a subclass to call to its superclass's version of a method when overriding it. So, for example, it raises an alarm when the -viewDidLoad method in a subclass of UIViewController does not call [super viewDidLoad]. This patch fixes a false alarm where the analyzer erroneously required the implementation of the superclass itself (e.g., UIViewController) to call super. rdar://problem/18416944 Differential Revision: http://reviews.llvm.org/D11842 llvm-svn: 244386
* AST: Implement mangling support for function types without a prototype.Peter Collingbourne2015-08-074-5/+32
| | | | | | | | | | Function types without prototypes can arise when mangling a function type within an overloadable function in C. We mangle these as the absence of any parameter types (not even an empty parameter list). Differential Revision: http://reviews.llvm.org/D11848 llvm-svn: 244374
* [Sparc] XFAIL CodeGen/atomic_ops test.James Y Knight2015-08-071-1/+2
| | | | llvm-svn: 244370
* Update a comment to be more descriptive.Eric Christopher2015-08-071-1/+1
| | | | llvm-svn: 244346
* Move the cpu validating virtual method down to the feature routinesEric Christopher2015-08-071-3/+4
| | | | | | where it belongs. llvm-svn: 244342
* Restore PrettyStackTrace state on crash.Nico Weber2015-08-071-0/+17
| | | | | | Last part of PR11974. llvm-svn: 244339
* Use LLVM_ATTRIBUTE_UNUSED to hide gcc 5.1 unused variable warning.Yaron Keren2015-08-071-1/+1
| | | | | | Suggestion by David Blaikie! llvm-svn: 244326
* This patch commits OpenMP 4 target device clausesMichael Wong2015-08-0717-2/+217
| | | | | | | This is committed on behalf of Kelvin Li http://reviews.llvm.org/D11469?id=31227 llvm-svn: 244325
* Silence tools/clang/lib/Tooling/CompilationDatabase.cpp:328:12: warning:Yaron Keren2015-08-071-1/+1
| | | | | | | ‘clang::tooling::JSONAnchorDest’ defined but not used [-Wunused-variable] from gcc 5.1. llvm-svn: 244312
* Make sure the Features field of the Builtin Info struct is always ↵Craig Topper2015-08-072-36/+44
| | | | | | | | initialized. Silences -Wmissing-field-initializers. While there convert 0 in the BUILTIN macros to nullptr. llvm-svn: 244307
* Make 'arm' cover both 32 and 64 bit architecutresBen Langmuir2015-08-074-0/+82
| | | | | | | | | | | | | | | | ... and add aarch32 to specifically refer to the 32-bit ones. Previously, 'arm' meant only 32-bit architectures and there was no way for a module to build with both 32 and 64 bit ARM architectures. Now a module that is intended to work on both architectures can specify requires arm whereas a module only for 32-bit platforms can say requires aarch32 and just like before, 64-bit only can say requires aarch64 llvm-svn: 244306
* Range-forify a loop, delete trailing whitespace. NFCDouglas Katzman2015-08-061-6/+4
| | | | llvm-svn: 244290
* [modules] Remove unused ModuleManager::visitDepthFirst function.Richard Smith2015-08-062-95/+0
| | | | llvm-svn: 244289
* [modules] Fix use-after-iterator-invalidation bug.Richard Smith2015-08-061-1/+1
| | | | llvm-svn: 244288
* Continue the work from r243908 by adding a Features field to Builtin::InfoEric Christopher2015-08-062-2/+9
| | | | | | | | so that we can populate it on a per-target basis with required features. Future commits will start using this information for warnings. llvm-svn: 244286
* [modules] Stop walking all modules when looking for lexical decls for aRichard Smith2015-08-065-75/+66
| | | | | | DeclContext. These only ever come from the owning module file for the Decl. llvm-svn: 244285
* Fix alignment of TemplateArgumentList.James Y Knight2015-08-061-1/+1
| | | | llvm-svn: 244280
* [modules] Remove now-unused MergedLookups map.Richard Smith2015-08-062-27/+0
| | | | llvm-svn: 244277
* [modules] Remove redundant lookups into non-primary DeclContexts. These were ↵Richard Smith2015-08-061-64/+13
| | | | | | made unnecessary by r244192. llvm-svn: 244271
* [ItaniumCXXABI] Don't import RTTI data for classes with key functionsDavid Majnemer2015-08-062-4/+21
| | | | | | | | | MinGW has some pretty strange behvaior around RTTI and dllimport/dllexport: - RTTI data is never imported - RTTI data is only exported if the class has no key function. llvm-svn: 244266
* Convert a few classes over to use the new TrailingObjects helper.James Y Knight2015-08-065-107/+177
| | | | | | | | | | This initial commit serves as an example -- the remainder of the classes using pointer arithmetic for trailing objects will be converted in subsequent changes. Differential Revision: http://reviews.llvm.org/D11298 llvm-svn: 244262
* Remove unused 'Owned' flag from TemplateArgumentList.James Y Knight2015-08-062-15/+9
| | | | llvm-svn: 244261
* [Frontend] Fix crash when serializing diagnostics with really long text.Argyrios Kyrtzidis2015-08-062-1/+31
| | | | | | rdar://21896690 llvm-svn: 244245
* Fix memory ownership in the NeonEmitter by using values instead of pointers ↵David Blaikie2015-08-061-37/+30
| | | | | | | | | | | | | (smart or otherwise) Improvement to the memory leak fix in 244196. Address validity is required for the Intrinsic objects, but since the collections only ever grow (no elements are removed), deque provides sufficient guarantees (that the objects will never be reallocated/moved around) for this use case. llvm-svn: 244241
* [OPENMP 4.1] Allow references in init expression for loop-based constructs.Alexey Bataev2015-08-0613-56/+138
| | | | | | OpenMP 4.1 allows to use variables with reference types in private clauses and, therefore, in init expressions of the cannonical loop forms. llvm-svn: 244209
OpenPOWER on IntegriCloud