summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Emit lifetime.start / lifetime.end markers for unnamed temporary objects.Arnaud A. de Grandmaison2014-07-183-24/+51
| | | | | | This will give more information to the optimizers so that they can reuse stack slots. llvm-svn: 213379
* [OPENMP] Initial parsing and sema analysis for 'taskwait' directive.Alexey Bataev2014-07-1814-7/+93
| | | | llvm-svn: 213363
* [OPENMP] Initial parsing and sema analysis for 'barrier' directive.Alexey Bataev2014-07-1813-1/+100
| | | | llvm-svn: 213360
* [ARM] Fix AAPCS regression caused by r211898Oliver Stannard2014-07-181-1/+5
| | | | | | | | | | | | | r211898 introduced a regression where a large struct, which would normally be passed ByVal, was causing padding to be inserted to prevent the backend from using some GPRs, in order to follow the AAPCS. However, the type of the argument was not being set correctly, so the backend cannot align 8-byte aligned struct types on the stack. The fix is to not insert the padding arguments when the argument is being passed ByVal. llvm-svn: 213359
* [OPENMP] Initial parsing and sema analysis of 'taskyield' directive.Alexey Bataev2014-07-1814-32/+142
| | | | llvm-svn: 213355
* [AArch64] Implement Clang CLI interface proposal about "-march".Kevin Qin2014-07-183-66/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Revert "Add default feature for CPUs on AArch64 target in Clang" at r210625. Then, all enabled feature will by passed explicitly by -target-feature in -cc1 option. 2. Get "-mfpu" deprecated. 3. Implement support of "-march". Usage is: -march=armv8-a+[no]feature For instance, "-march=armv8-a+neon+crc+nocrypto". Here "armv8-a" is necessary, and CPU names are not acceptable. Candidate features are fp, neon, crc and crypto. Where conflicting feature modifiers are specified, the right-most feature is used. 4. Implement support of "-mtune". Usage is: -march=CPU_NAME For instance, "-march=cortex-a57". This option will ONLY get micro-architectural feature enabled specifying to target CPU, like "+zcm" and "+zcz" for cyclone. Any architectural features WON'T be modified. 5. Change usage of "-mcpu" to "-mcpu=CPU_NAME+[no]feature", which is an alias to "-march={feature of CPU_NAME}+[no]feature" and "-mtune=CPU_NAME" together. Where this option is used in conjunction with -march or -mtune, those options take precedence over the appropriate part of this option. llvm-svn: 213353
* Parse: Diagnose malformed 'message' arguments for 'availability' attrDavid Majnemer2014-07-181-1/+12
| | | | | | | The parsing code for 'availability' wasn't prepared for string literals like "a" L"b" showing up. Error if this occurs. llvm-svn: 213350
* Add dump() for MacroDirective and MacroInfo.Richard Smith2014-07-181-0/+72
| | | | llvm-svn: 213349
* [modules] Fix macro hiding bug exposed if:Richard Smith2014-07-182-8/+23
| | | | | | | | | | | | | | * A submodule of module A is imported into module B * Another submodule of module A that is not imported into B exports a macro * Some submodule of module B also exports a definition of the macro, and happens to be the first submodule of B that imports module A. In this case, we would incorrectly determine that A's macro redefines B's macro, and so we don't need to re-export B's macro at all. This happens with the 'assert' macro in an LLVM self-host. =( llvm-svn: 213348
* Cleanup: remove essentially unused variable.Richard Smith2014-07-181-3/+2
| | | | llvm-svn: 213347
* Mark the vtable used when defining implicit copy and move ctorsReid Kleckner2014-07-181-0/+3
| | | | | | | | | | I don't think other implicit members like copy assignment and move assignment require this treatment, because they should already be operating on a constructed object. Fixes PR20351. llvm-svn: 213346
* SemaInit.cpp: Fix a warning with -Asserts. [-Wunused-variable]NAKAMURA Takumi2014-07-181-0/+1
| | | | llvm-svn: 213345
* Fix parsing certain kinds of strings in the MS section pragmasReid Kleckner2014-07-181-50/+99
| | | | | | | | | We were crashing on the relevant test case inputs. Also, refactor this code a bit so we can report failure and slurp the pragma tokens without returning a diagnostic id. This is more consistent with the rest of the parser and sema code. llvm-svn: 213337
* PR20346: fix aggregate initialization / template instantiation bug:Richard Smith2014-07-171-0/+9
| | | | | | | | | | | | | If, during the initial parse of a template, we perform aggregate initialization and form an implicit value initialization for an array type, then when we come to instantiate the template and redo the initialization step, we would try to match the implicit value initialization up against an array *element*, not to the complete array. Remarkably, we've had this bug since ~the dawn of time, but only noticed it recently. llvm-svn: 213332
* Revert "unique_ptr-ify ownership of ASTConsumers"David Blaikie2014-07-1718-200/+206
| | | | | | | | | This reverts commit r213307. Reverting to have some on-list discussion/confirmation about the ongoing direction of smart pointer usage in the LLVM project. llvm-svn: 213325
* unique_ptr-ify ownership of ASTConsumersDavid Blaikie2014-07-1718-206/+200
| | | | | | | | | (after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
* MS compatibility: always emit dllexported in-class initialized static data ↵Hans Wennborg2014-07-175-34/+31
| | | | | | | | | | | | | | members (PR20140) This makes us emit dllexported in-class initialized static data members (which are treated as definitions in MSVC), even when they're not referenced. It also makes their special linkage reflected in the GVA linkage instead of getting massaged in CodeGen. Differential Revision: http://reviews.llvm.org/D4563 llvm-svn: 213304
* If char/short are shorter than int, do not use U as suffix forJoerg Sonnenberger2014-07-172-4/+8
| | | | | | | | constants. Comparing int against a constant of the given type like UINT8_MAX will otherwise force a promotion to unsigned int, which is typically not expected. llvm-svn: 213301
* Always set the C suffix macro, even if it is empty.Joerg Sonnenberger2014-07-171-6/+2
| | | | llvm-svn: 213299
* clang-cl: Flush stdout after writing the /showIncludes outputEhsan Akhgari2014-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Before this patch, you could get lines in the output such as: Note: including file: ../../dist/include/js/Tc:/path/to/foo.cpp(1,1) : error(clang): static_assert failed... This patch ensures that the stdout output from showIncludes won't be garbled in the terminal like this, and it also helps applications that use the output to generate dependency information if they happen to capture both stdout and stderr. Test Plan: Tested locally, it's hard to write an automated test for this as the behavior depends on the buffering of the ostreams. Reviewers: nico Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4559 llvm-svn: 213297
* [UBSan] Add !nosanitize metadata to the code generated by UBSan.Alexey Samsonov2014-07-175-18/+64
| | | | | | | | | | This is used to mark the instructions emitted by Clang to implement variety of UBSan checks. Generally, we don't want to instrument these instructions with another sanitizers (like ASan). Reviewed in http://reviews.llvm.org/D4544 llvm-svn: 213291
* Provide __SIG_ATOMIC_MAX__ next to __SIG_ATOMIC_WIDTH__.Joerg Sonnenberger2014-07-171-0/+1
| | | | llvm-svn: 213289
* Wrap a comment to 80 columns, no code change.Nico Weber2014-07-171-1/+2
| | | | llvm-svn: 213288
* Objective-C. deprecated attribute is not inherited on methodsFariborz Jahanian2014-07-171-0/+2
| | | | | | | overriden in interfaces and protocols (this is already the case for properties). rdar://16068470 llvm-svn: 213282
* Handle __assume in the VoidExprEvaluatorHal Finkel2014-07-171-0/+10
| | | | | | | | This is a follow-up to an IRC conversation with Richard last night; __assume does not evaluate its argument, and so the argument should not contribute to whether (__assume(e), constant) can be used where a constant is required. llvm-svn: 213267
* Add an __assume side-effects warningHal Finkel2014-07-171-0/+18
| | | | | | | | | | | | In MS-compatibility mode, we support the __assume builtin. The __assume builtin does not evaluate its arguments, and we should issue a warning if __assume is provided with an argument with side effects (because these effects will be discarded). This is similar in spirit to the warnings issued by other compilers (Intel Diagnostic 2261, MS Compiler Warning C4557). llvm-svn: 213266
* Using a std::string instead of a StringRef because the Default case ↵Aaron Ballman2014-07-171-6/+6
| | | | | | | | synthesizes a temporary std::string from a Twine. Assigning that into a StringRef causes the StringRef to refer to a temporary, and bad things happen. This fixes a failing test case on Windows. llvm-svn: 213265
* [OPENMP] Initial parsing and sema analysis of 'mergeable' clause.Alexey Bataev2014-07-178-1/+40
| | | | llvm-svn: 213262
* ARM: Add ACLE memory barrier intrinsic mappingYi Kong2014-07-171-1/+8
| | | | llvm-svn: 213261
* Revert "Handle diagnostic warnings in Frontend diagnostic handler."Alp Toker2014-07-171-28/+12
| | | | | | | | | | | This commit is missing tests and there are a few points that need to be addressed before a new user-facing option can be added: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140714/110198.html This reverts commit r213112. llvm-svn: 213260
* clang-format: Fix parsing of conditional expressions.Daniel Jasper2014-07-171-1/+1
| | | | | | | | | | | | | | | Before: aaaaaa = aaaaaaaaaaaa ? aaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: aaaaaa = aaaaaaaaaaaa ? aaaaaaaaaa ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 213258
* [OPENMP] Initial support for parsing and sema analysis of 'untied' clause.Alexey Bataev2014-07-178-1/+39
| | | | llvm-svn: 213257
* Port memory barriers intrinsics to AArch64Yi Kong2014-07-171-1/+12
| | | | | | | | | | | | | Memory barrier __builtin_arm_[dmb, dsb, isb] intrinsics are required to implement their corresponding ACLE and MSVC intrinsics. This patch ports ARM dmb, dsb, isb intrinsic to AArch64. Requires LLVM r213247. Differential Revision: http://reviews.llvm.org/D4521 llvm-svn: 213250
* IR: update Clang to use polymorphic __fp16 conversion intrinsics.Tim Northover2014-07-171-8/+15
| | | | | | There should be no change in semantics at this stage. llvm-svn: 213249
* [mips] Pass the ABI to the integrated assembler and add tests the existing ↵Daniel Sanders2014-07-171-0/+11
| | | | | | | | | | | | | | | | | arguments. Summary: With this patch (and a corresponding LLVM patch), assembling an empty file with GCC and Clang -fintegrated-as produce near identical objects. The remaining differences are: * GCC/GAS produce objects have a .pdr section * GCC/GAS produce objects have a .gnu.attributes section Other differences are insignificant such as precise file offsets and the order of strings in the string table. Differential Revision: http://reviews.llvm.org/D4531 llvm-svn: 213241
* [OPENMP] Parsing/Sema analysis of directive 'master'Alexander Musman2014-07-1713-9/+126
| | | | llvm-svn: 213237
* [OPENMP] Initial parsing and sema analysis for 'final' clause.Alexey Bataev2014-07-178-6/+85
| | | | llvm-svn: 213232
* Track the difference betweenRichard Smith2014-07-178-31/+59
| | | | | | | | | | | | -- a constructor list initialization that unpacked an initializer list into constructor arguments and -- a list initialization that created as std::initializer_list and passed it as the first argument to a constructor in the AST. Use this flag while instantiating templates to provide the right semantics for the resulting initialization. llvm-svn: 213224
* Fix FriendDecl source location and range for class templates and function ↵Nikola Smiljanic2014-07-173-8/+8
| | | | | | declarations that don't start with 'friend' keyword. Add more unittests. llvm-svn: 213220
* MS ABI: Padding injected between empty vbases doesn't up required alignDavid Majnemer2014-07-171-1/+1
| | | | | | Only alignment is changed, not required alignment. llvm-svn: 213217
* DebugInfo: Forward HandleTagDeclRequiredDefinition through MultiplexConsumer ↵David Blaikie2014-07-161-0/+25
| | | | | | | | | | | | | | | | | | | to fix debug info emission in the presence of plugins. When plugins are used the Multiplex(AST)Consumer is employed to dispatch to both the plugin ASTConsumers and the IRGen ASTConsumer. It wasn't dispatching a critical call for debug info, resulting in plugin users having a negative debugging experience. While I'm here, forward a bunch of other missing calls through the consumer that seem like they should be there. To test this, use the example plugin (requires plugins and examples) and split the test case up so that the plugin testing can be done under that requirement while the non-plugin testing will execute even in builds that don't include plugin support or examples. llvm-svn: 213213
* Add basic (noop) CodeGen support for __assumeHal Finkel2014-07-161-0/+3
| | | | | | | | | | | | | | Clang supports __assume, at least at the semantic level, when MS extensions are enabled. Unfortunately, trying to actually compile code using __assume would result in this error: error: cannot compile this builtin function yet __assume is an optimizer hint, and can be ignored at the IR level. Until LLVM supports assumptions at the IR level, a noop lowering is valid, and that is what is done here. llvm-svn: 213206
* When list-initializing an object of class type, if we pick an initializer listRichard Smith2014-07-161-17/+24
| | | | | | | | | constructor (and pass it an implicitly-generated std::initializer_list object), be sure to mark the resulting construction as list-initialization. This fixes an assert in template instantiation where we previously thought we'd got direct non-list initialization without any parentheses. llvm-svn: 213201
* Typically linker options are protected with -Xlinker or -Wl,Arthur Marble2014-07-161-2/+7
| | | | | | | | however certain sloppy Makefiles pass -z options directly to the compiler. This patch enables clang to recognize these options (because -z is not used by clang itself). llvm-svn: 213198
* Removing a FIXME from the attribute parsing code by now passing along the ↵Aaron Ballman2014-07-161-31/+35
| | | | | | scope and syntax information for attributes with custom parsing. It turns out not to matter too much because the FIXME wasn't quite true -- none of these attributes have a C++11 spelling. However, it's still a good change (for instance, we may add an attribute with a type arg in the future for which this code now behaves properly). llvm-svn: 213191
* Objective-C. Changes per A. Ballman's commentFariborz Jahanian2014-07-162-16/+19
| | | | | | for my last patch. // rdar://17631257 llvm-svn: 213185
* Simplify memory management in NestedNameSpecifierLocBuilder.Serge Pavlov2014-07-161-8/+4
| | | | | | | With this change the memory of buffer in NestedNameSpecifierLocBuilder is allocated in one place. It also prevents from allocation of tiny blocks. llvm-svn: 213178
* [Driver][Mips] If CPU name is not provided to the driver explicitly useSimon Atanasyan2014-07-161-19/+7
| | | | | | multilibs from the FSFS toolchain corresponding to the mips32r2/mips64r2 CPUs. llvm-svn: 213175
* Make clang's rewrite engine a core featureAlp Toker2014-07-1628-79/+56
| | | | | | | | | | | | | | | The rewrite facility's footprint is small so it's not worth going to these lengths to support disabling at configure time, particularly since key compiler features now depend on it. Meanwhile the Objective-C rewriters have been moved under the ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still potentially worth excluding from lightweight builds. Tests are now passing with any combination of feature flags. The flags historically haven't been tested by LLVM's build servers so caveat emptor. llvm-svn: 213171
* Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))Fariborz Jahanian2014-07-163-112/+181
| | | | | | | | | to be applied to class or protocols. This will direct IRGen for Objective-C metadata to use the new name in various places where class and protocol names are needed. rdar:// 17631257 llvm-svn: 213167
OpenPOWER on IntegriCloud