summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add an optional string argument to DeprecatedAttr for Fix-It.Manman Ren2016-03-162-4/+37
| | | | | | | | We only add this to __attribute__((deprecated)). Differential Revision: http://reviews.llvm.org/D17865 llvm-svn: 263652
* Add attributes for preserve_mostcc/preserve_allcc calling conventions to the ↵Roman Levenstein2016-03-167-2/+56
| | | | | | | | | | | | | | | C/C++ front-end Till now, preserve_mostcc/preserve_allcc calling convention attributes were only available at the LLVM IR level. This patch adds attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end. The code was mostly written by Juergen Ributzka. I just added support for the AArch64 target and tests. Differential Revision: http://reviews.llvm.org/D18025 llvm-svn: 263647
* Fix destructor definition of invalid classesOlivier Goffart2016-03-161-8/+10
| | | | | | | | | | | | The declaration of the destructor of an invalid class was not properly marked as noexcept. As a result, the definition of the same destructor, which was properly implicitly marked as noexcept, would not match the definition. This would cause the definition CXXDestructorDecl to be matked as invalid and omited from the AST. Differential Revision: http://reviews.llvm.org/D17988 llvm-svn: 263639
* Revert r263617, "Reapply: [VFS] Add support for handling path traversals"NAKAMURA Takumi2016-03-162-137/+24
| | | | | | It broke standalone clang build. llvm-svn: 263636
* Directly get the canonical Type instead of going around through a ↵Yaron Keren2016-03-161-1/+1
| | | | | | CanQualType temporary, NFC. llvm-svn: 263635
* [modules] Fix adding a templated friend functions to a namespace from ↵Vassil Vassilev2016-03-161-2/+10
| | | | | | | | | | | | | | another module. When clang adds argument dependent lookup candidates, it can perform template instantiation. For example, it can instantiate a templated friend function and register it in the enclosing namespace's lookup table. Fixes https://llvm.org/bugs/show_bug.cgi?id=24954 Reviewed by Richard Smith. llvm-svn: 263634
* Avoid using LookupResult's implicit copy ctor and assignment operator to ↵Marina Yatsina2016-03-161-11/+9
| | | | | | | | | | | | | avoid warnings The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed. This patch is meant to help the following review: http://reviews.llvm.org/D18123. The functionality is covered by the tests in my original commit (255890) The test case in this patch was added to test a bug caught in the review of the first version of this fix. Differential Revision: http://reviews.llvm.org/D18175 llvm-svn: 263630
* Revert r263622, "clang/lib/Frontend/ModuleDependencyCollector.cpp: Use ↵NAKAMURA Takumi2016-03-161-1/+1
| | | | | | | | clang/Config/config.h instead of llvm's." I'll commit better fix(es) later. "llvm/Config/config.h" shouldn't be available here. llvm-svn: 263623
* clang/lib/Frontend/ModuleDependencyCollector.cpp: Use clang/Config/config.h ↵NAKAMURA Takumi2016-03-161-1/+1
| | | | | | instead of llvm's. llvm-svn: 263622
* Reapply: [VFS] Add support for handling path traversalsBruno Cardoso Lopes2016-03-162-24/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | This is originally r261551, reverted because of windows bots failing on unittests. Change the current behavior to do not handle path traversals on windows. Handle ".", ".." and "./" with trailing slashes while collecting files to be dumped into the vfs overlay directory. Include the support for symlinks into components. Given the path: /install-dir/bin/../lib/clang/3.8.0/include/altivec.h, if "bin" component is a symlink, it's not safe to use `path::remove_dots` here, and `realpath` is used to get the right answer. Since `realpath` is expensive, we only do it at collecting time (which only happens during the crash reproducer) and cache the base directory for fast lookups. Overall, this makes the input to the VFS YAML file to be canonicalized to never contain traversal components. Differential Revision: http://reviews.llvm.org/D17104 rdar://problem/24499339 llvm-svn: 263617
* Convert some ObjC msgSends to runtime calls.Pete Cooper2016-03-165-18/+121
| | | | | | | | | | | | | | It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a message to those functions. This patch adds support for converting messages to retain/release/alloc/autorelease to their equivalent runtime calls. Tests included for the positive case of applying this transformation, negative tests that we ensure we only convert "alloc" to objc_alloc, not "alloc2", and also a driver test to ensure we enable this only for supported runtime versions. Reviewed by John McCall. Differential Revision: http://reviews.llvm.org/D14737 llvm-svn: 263607
* Myriad: define __myriad2 macro automaticallyDouglas Katzman2016-03-151-1/+22
| | | | llvm-svn: 263596
* Revert commit http://reviews.llvm.org/D17877 to fix tests on x86.Arpith Chacko Jacob2016-03-154-466/+6
| | | | llvm-svn: 263589
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-154-6/+466
| | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 llvm-svn: 263587
* Move the fixit for -Wformat-security to a note.Bob Wilson2016-03-151-5/+6
| | | | | | | | r263299 added a fixit for the -Wformat-security warning, but that runs into complications with our guideline that error recovery should be done as-if the fixit had been applied. Putting the fixit on a note avoids that. llvm-svn: 263584
* [cfi] Don't emit checks for disabled CFI kinds.Evgeniy Stepanov2016-03-151-8/+7
| | | | | | | | | | | | | | In the cross-DSO CFI mode clang emits __cfi_check_fail that handles errors triggered from other modules with targets in the current module. With this change, __cfi_check_fail will handle errors for CFI kinds that are not enabled in the current module as if they have the trapping behaviour (-fsanitize-trap=...). This fixes a bug where some combinations of -fsanitize* flags may result in a link failure due to a missing sanitizer runtime library for the diagnostic calls in __cfi_check_fail. llvm-svn: 263578
* [Driver] [Darwin] Fix linking libclang_rt.profile_*sim.aChris Bieneman2016-03-151-28/+2
| | | | | | | | | | | | Summary: isTarget*() calls are order-dependent. This is because iOS Sim *is* iOS. This means checks for the simulator version of the platform must always be ahead of checks for the embedded platform. Reviewers: zaks.anna, bogner Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17947 llvm-svn: 263567
* Myriad: Pass -mcpu to movi{Compile,Asm}Douglas Katzman2016-03-151-3/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D18186 llvm-svn: 263556
* Reverted http://reviews.llvm.org/D17877 to fix tests.Arpith Chacko Jacob2016-03-154-466/+6
| | | | llvm-svn: 263555
* [OpenMP] Base support for target directive codegen on NVPTX device.Arpith Chacko Jacob2016-03-154-6/+466
| | | | | | | | | | | Summary: This patch adds base support for codegen of the target directive on the NVPTX device. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D17877 llvm-svn: 263552
* Make it possible for AST plugins to enable themselves by defaultJohn Brawn2016-03-153-29/+53
| | | | | | | | | | | | Currently when an AST plugin is loaded it must then be enabled by passing -plugin pluginname or -add-plugin pluginname to the -cc1 command line. This patch adds a method to PluginASTAction which allows it to declare that the action happens before, instead of, or after the main AST action, plus the relevant changes to make the plugin action happen at that time automatically. Differential Revision: http://reviews.llvm.org/D17959 llvm-svn: 263546
* Restrict the hack from r263429 to asan and msan.Benjamin Kramer2016-03-151-2/+4
| | | | | | | The other sanitizers don't have backend passes that rely on value names. Avoid paying the compile time cost of names there. llvm-svn: 263541
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-152-19/+19
| | | | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. (Recommit after fixing LLVM side to add back missed file) llvm-svn: 263514
* Revert "[ThinLTO] Clang side of renaming of function index (NFC)"Teresa Johnson2016-03-142-19/+19
| | | | | | This reverts commit r263491. Missed a file on the LLVM side. llvm-svn: 263494
* [ThinLTO] Clang side of renaming of function index (NFC)Teresa Johnson2016-03-142-19/+19
| | | | | | | This is the companion to an LLVM patch that renamed the function index data structures and files to use the more general module summary index. llvm-svn: 263491
* clang-format: [JS] Handle certain cases of ASI.Daniel Jasper2016-03-142-1/+72
| | | | | | | | | | | | | | Automatic Semicolon Insertion can only be properly handled by parsing source code. However conservatively catching just a few, common situations prevents breaking code during development, which greatly improves usability. JS code should still use semicolons, and ASI code should be flagged by a compiler or linter. Patch by Martin Probst. Thank you. llvm-svn: 263470
* CodeGen: Use 32-bit gep offsets to address vtable address points.Peter Collingbourne2016-03-142-5/+5
| | | | | | | | | | | | | | | | | The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 llvm-svn: 263469
* CodeGen: Mark functions used in vtables as unnamed_addr.Peter Collingbourne2016-03-142-6/+10
| | | | | | | | | | | This marks virtual function declarations, as well as runtime library functions __cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This will allow us to correctly form relative references to them from vtables in the relative vtable ABI. Differential Revision: http://reviews.llvm.org/D18071 llvm-svn: 263464
* [modules] Don't diagnose non-modular includes from modular files that areRichard Smith2016-03-142-4/+9
| | | | | | implementation units of modules rather than interface units. llvm-svn: 263449
* [OpenMP] Replace offloading option that start with -o with -fo.Samuel Antao2016-03-141-2/+2
| | | | | | | | | | | | | | | Summary: The current offloading implementation is using -omptargets and -omp-host-ir-file-path options in the frontend. This causes the user a lot of trouble due to to the conflicts with the -o option. E.g. if the user misspells omptargets he will end up with a file with a weird name. This patches replaces these two options with -fomptargets and -fomp-host-ir-file-path to avoid these issues, and it is also more consistent with the other options like -fopenmp. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18112 llvm-svn: 263442
* Revert "Recommitted r261634 "Supporting all entities declared in lexical ↵Benjamin Kramer2016-03-143-59/+14
| | | | | | | | scope in LLVM debug info." After fixing PR26715 at r263379." This reverts commit r263425. Breaks self-host. llvm-svn: 263436
* Make FreeBSD and NetBSD use CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2016-03-143-26/+14
| | | | | | | | | Also introduce -stdlib=platform to override the configured value and use it to make the tests always pass. Differential Revision: http://reviews.llvm.org/D17286 llvm-svn: 263434
* [Frontend] Disable value name discarding for all sanitizers.Benjamin Kramer2016-03-141-6/+7
| | | | | | | | ASan also relies on names on allocas and will emit unhelpful output if they're not present. Just force-enable value names for now. Should unbreak release builds of asan. llvm-svn: 263429
* Recommitted r261634 "Supporting all entities declared in lexical scope in ↵Amjad Aboud2016-03-143-14/+59
| | | | | | | | LLVM debug info." After fixing PR26715 at r263379. llvm-svn: 263425
* [Driver] Enable --rtlib option for MSVC targetAndrey Turetskiy2016-03-141-1/+16
| | | | | | | | | | This enables "--rtlib compiler-rt" option under MSVC environment. Patch by Roman Shirokiy. Differential Revision: http://reviews.llvm.org/D17453 llvm-svn: 263422
* Temporarily make discard value names depend on whether or not we'reEric Christopher2016-03-141-1/+6
| | | | | | | | | | trying to track origins in the memory sanitizer since the backend instrumentation pass currently takes names from the Instruction. Fixes all of the origin tracking tests in compiler-rt after the -discard-value-name option was added. llvm-svn: 263412
* Remove compile time PreserveName in favor of a runtime cc1 ↵Mehdi Amini2016-03-137-37/+14
| | | | | | | | | | | | | | | | | | | | -discard-value-names option Summary: This flag is enabled by default in the driver when NDEBUG is set. It is forwarded on the LLVMContext to discard all value names (but GlobalValue) for performance purpose. This an improved version of D18024 Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18127 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263394
* Update for new argument to scalbnMatt Arsenault2016-03-131-4/+6
| | | | llvm-svn: 263371
* clang-cl: Add /Yc argument to /showIncludes output.Nico Weber2016-03-132-27/+32
| | | | | | | | | | To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit, so that it happens after CompilerInstance::InitializeSourceManager() has run. General /FI arguments are still missing from /showIncludes output, this still needs to be fixed. llvm-svn: 263352
* Temporarily revert these patches:Eric Christopher2016-03-125-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 60d9845f6a037122d9be9a6d92d4de617ef45b04 Author: Mehdi Amini <mehdi.amini@apple.com> Date: Fri Mar 11 18:48:02 2016 +0000 Fix clang crash: when CodeGenAction is initialized without a context, use the member and not the parameter From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263273 91177308-0d34-0410-b5e6-96231b3b80d8 commit af7ce3bf04a75ad5124b457b805df26006bd215b Author: Mehdi Amini <mehdi.amini@apple.com> Date: Fri Mar 11 17:32:58 2016 +0000 Fix build: use -> with pointers and not . Silly typo. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263267 91177308-0d34-0410-b5e6-96231b3b80d8 commit d0eea119192814954e7368c77d0dc5a9eeec1fbb Author: Mehdi Amini <mehdi.amini@apple.com> Date: Fri Mar 11 17:15:44 2016 +0000 Remove compile time PreserveName switch based on NDEBUG Summary: Following r263086, we are now relying on a flag on the Context to discard Value names in release builds. Reviewers: chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18024 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263257 91177308-0d34-0410-b5e6-96231b3b80d8 until we can fix the Release builds. This reverts commits 263257, 263267, 263273 llvm-svn: 263320
* Make functions in altivec.h be __inline__. As they are all also markedDaniel Jasper2016-03-111-4034/+4370
| | | | | | | __always_inline__, this has likely been meant from the start. Review: http://reviews.llvm.org/D18015 llvm-svn: 263302
* Add fix-it for format-security warnings.Bob Wilson2016-03-111-9/+21
| | | | llvm-svn: 263299
* Fix ObjCMethodDecl::findPropertyDecl for class properties.Jordan Rose2016-03-111-9/+15
| | | | | | | This affects code completion and a few other things; hopefully the code completion test is sufficient to catch regressions. llvm-svn: 263295
* Allow sizeof(UnrelatedClass::field) in C++11 class template methodsReid Kleckner2016-03-111-3/+16
| | | | | | | | | | | | | | | | | This feature works outside of templates by forming a DeclRefExpr to a FieldDecl instead of a MemberExpr, which requires a base object in addition to the FieldDecl. Previously, while building up the template AST before instantiation, we formed a CXXDependentScopeMemberExpr, which always instantiates to a MemberExpr. Now, in unevaluated contexts we form a DependentScopeDeclRefExpr, which is a more flexible node that can instantiate to either a MemberExpr or a DeclRefExpr depending on lookup results. Fixes PR26893. llvm-svn: 263279
* Fix clang crash: when CodeGenAction is initialized without a context, use ↵Mehdi Amini2016-03-111-1/+1
| | | | | | | the member and not the parameter From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263273
* [SEH] Remove nounwind/noinline from outlined finally funcletsReid Kleckner2016-03-111-6/+0
| | | | | | With the new EH representation this is no longer necessary. llvm-svn: 263269
* Fix build: use -> with pointers and not .Mehdi Amini2016-03-111-1/+1
| | | | | | | Silly typo. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263267
* Remove compile time PreserveName switch based on NDEBUGMehdi Amini2016-03-115-36/+15
| | | | | | | | | | | | | | | Summary: Following r263086, we are now relying on a flag on the Context to discard Value names in release builds. Reviewers: chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18024 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263257
* Update to include the new header file providing createGVNPass.Chandler Carruth2016-03-111-0/+1
| | | | llvm-svn: 263210
* [OpenMP] NFC fix compilation warning about unused variableDmitry Polukhin2016-03-111-2/+1
| | | | | | lib/Sema/SemaOpenMP.cpp:9243:13: warning: variable ‘IsRightMostExpression’ set but not used llvm-svn: 263202
OpenPOWER on IntegriCloud