summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Reapply^2 "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-163-10/+14
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 llvm-svn: 269695
* Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2016-05-161-2/+133
| | | | | | | | | Also added named casts and propagation of "implicit" to fix the LLDB testsuite. This is a fixed commit of r269546, which was reverted by r269575. Thanks to Aleksei Sidorin for review and advice. llvm-svn: 269693
* [Lex] inferModuleFromLocation should do no work if there are no modulesDavid Majnemer2016-05-161-0/+3
| | | | | | | | | | | | getModuleContainingLocation ends up on the hot-path for typical C code which can lead to calls to getFileIDSlow. To speed this up, short circuit inferModuleFromLocation when there aren't any modules, implicit or otherwise. This shaves 4-5% build time when building the linux kernel. llvm-svn: 269687
* [Clang][AVX512] completing missing intrinsics for [vpabs] instruction setMichael Zuckerman2016-05-161-0/+34
| | | | | | Differential Revision: http://reviews.llvm.org/D20069 llvm-svn: 269680
* Change embed-bitcode linkage typeSteven Wu2016-05-161-22/+51
| | | | | | | | | | | Embedded bitcode should have private linkage instead of appending or external. Otherwise, it will cause link failure due to duplicated symbols. Also add llvm.embedded.module and llvm.cmdline to llvm.compiler.used so they don't get optimized out. rdar://problem/21555860 llvm-svn: 269679
* [ms] Reintroduce feature guards in intrinsic headers in Microsoft modeNico Weber2016-05-162-1/+105
| | | | | | | | | | | | | | | | | | | | | Visual Studio's C++ standard library headers include intrin.h, so the intrinsic headers get included a lot more often in Microsoft mode than elsewhere. The AVX512 intrinsics are a lot of code (0.7 MB, causing 30% compile time overhead for small programs including e.g. <string> and 6% compile time overhead for larger projects like e.g. v8). Since multiversioning can't be relied on in Microsoft mode (cl.exe doesn't support it), having faster compiles seems like the much better tradeoff until we have a better intrinsic story going forward (which we'll need for e.g. PR19898). Actually using intrinsics on Windows already requires the right /arch: settings, so this patch should have no big behavior change. See also thread "The intrinsics headers (especially avx512) are too big. What to do about it?" on cfe-dev. http://reviews.llvm.org/D20291 llvm-svn: 269675
* [PS4] Change the names of some "environmental" things to what ourPaul Robinson2016-05-164-8/+8
| | | | | | | | licensees actually see in the toolchain we deliver to them. This will reduce the set of local patches we have to maintain. The triple is not changing. (The term ORBIS is an internal code name for PS4.) llvm-svn: 269671
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-164-14/+65
| | | | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Re-commit after fixing build error due to missing override attribute. Differential Revision: http://reviews.llvm.org/D19484 llvm-svn: 269670
* Add the hasDynamicExceptionSpec() AST matcher to match function declarations ↵Aaron Ballman2016-05-161-0/+1
| | | | | | | | that have a dynamic exception specification. Patch by Don Hinton. llvm-svn: 269662
* [Modules] Use vfs for (recursive) directory iterationBruno Cardoso Lopes2016-05-163-21/+29
| | | | | | | | | | | | | | | | Clang performs directory walk while searching headers inside modules by using the ::sys::fs instead of ::vfs. This prevents any code that uses the VFS (e.g, reproducer scripts) to actually find such headers, since the VFS will never be searched for those. Change these places to use vfs::recursive_directory_iterator and vfs::directory_iterator instead. Differential Revision: http://reviews.llvm.org/D20266 rdar://problem/25880368 llvm-svn: 269661
* [Clang][AVX512] completing missing intrinsics [vsqrt|vrsqrt|vrcp14 ].Michael Zuckerman2016-05-161-0/+106
| | | | | | Differential Revision: http://reviews.llvm.org/D20068 llvm-svn: 269649
* [X86] Add typecasts to remove most assumptions about what __m128i/__m256i is ↵Craig Topper2016-05-1610-288/+289
| | | | | | defined as. Add similar typecasts for the fp types as well. llvm-svn: 269632
* [AVX512] Add typecasts to some intrinsics to avoid doing operations on the ↵Craig Topper2016-05-161-15/+15
| | | | | | __m512/__m512i/__m512d types. llvm-svn: 269631
* CodeGen: convert some const char * to StringRefSaleem Abdulrasool2016-05-161-33/+21
| | | | | | Convert some use of const char * to StringRef. NFC. llvm-svn: 269630
* [X86] Remove bad cast from the 'int' return type of ↵Craig Topper2016-05-161-4/+2
| | | | | | __builtin_ia32_kortestchi to '__mask16' before return in an 'int' intrinsic. llvm-svn: 269621
* [AVX512] Fix bad typecasts on return value for 512-bit integer byte/word ↵Craig Topper2016-05-161-8/+8
| | | | | | compare builtins. llvm-svn: 269620
* [X86] Add immediate range checks for many of the builtins.Craig Topper2016-05-151-32/+234
| | | | llvm-svn: 269619
* [AVX512] Add intrinsics for 512-bit insertf32x8/insertf32x4/inserti32x4.Craig Topper2016-05-152-0/+72
| | | | llvm-svn: 269617
* [AVX512] Mark some integer builtin arguments that go to immediates in final ↵Craig Topper2016-05-151-8/+4
| | | | | | instructions as an ICE. llvm-svn: 269613
* [AVX512] Move unary negations to the left side of typecasts to specific ↵Craig Topper2016-05-151-48/+48
| | | | | | vector type. The __m128/__m256/__m512 types should be treated more opaquely and not have any operations performed on them. llvm-svn: 269612
* [AVX512] Use the correct mask type in an intrinsic.Craig Topper2016-05-151-3/+3
| | | | llvm-svn: 269611
* [AVX512] Fix an intrinsic that was passing -2 as a mask instead of -1.Craig Topper2016-05-151-1/+1
| | | | llvm-svn: 269610
* Revert r269546 "Added support to the ASTImporter for C++ constructor ↵Oleksiy Vyalov2016-05-141-82/+0
| | | | | | initializers." as it breaks TestDataFormatterSynthVal.DataFormatterSynthValueTestCase.test_with_run_command_dwarf test - http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/14699 llvm-svn: 269575
* Warn when a reference is bound to an empty l-value (dereferenced null pointer).Nick Lewycky2016-05-141-0/+15
| | | | llvm-svn: 269572
* [mips] Enable IAS by default for 32-bit MIPS targets (O32).Daniel Sanders2016-05-141-0/+2
| | | | | | | | | | | | | | | | | | | Summary: The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux kernel, and pass a variety of LNT testing. Unfortunately we can't enable it by default for 64-bit targets yet since the N32 ABI is still very buggy and this also means we can't enable it for N64 either because we can't distinguish between N32 and N64 in the relevant code. Reviewers: vkalintiris Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18759 Differential Revision: http://reviews.llvm.org/D18761 llvm-svn: 269560
* MSVCToolChain.cpp: Make version.dll generic for win32.NAKAMURA Takumi2016-05-142-2/+6
| | | | | | | We may consider msvc features may be capable on mingw host, if it can. Consider --host=mingw --target=msvc. llvm-svn: 269557
* MSVCToolChain.cpp: Use explicit constructor for SmallString from ↵NAKAMURA Takumi2016-05-141-1/+1
| | | | | | std::string, to appease mingw-g++. llvm-svn: 269556
* Update identifiers as needed when loading macros from serialized ASTs.Sean Callanan2016-05-141-2/+5
| | | | | | | | | | | This is essential for iterating across macros properly, which LLDB does when loading macros from modules. A naiver version of this patch (without the conditional) caused assertion failures in the testsuite, but this version should be safe. Thanks to Ben Langmuir for the refinement that made this work. llvm-svn: 269554
* Fixed a bug where the ASTImporter didn't propagate builtin IDs at all.Sean Callanan2016-05-141-1/+6
| | | | | | | | | | | IdentifierInfos are assigned builtin IDs during parsing, but Idents.get() does not do that work. So the ASTImporter needs to additionally set the builtin ID for the newly-created IdentifierInfo. This patch does that. Currently ASTMerge tests only check syntax and the ASTMatchers don't check for builtin IDs, so this is tricky to test, but LLDB will have a test for this. llvm-svn: 269553
* [X86] Change most 'void' pointers in builtin type lists to more correct ↵Craig Topper2016-05-141-16/+16
| | | | | | types. Fix some unaligned load/store intrinsics to use a less aligned type in their pointer casts. llvm-svn: 269552
* Handle injected class names in the ASTImporter.Sean Callanan2016-05-141-2/+11
| | | | | | | | | | | | | | | | | | Every class as parsed by Clang has a forward declaration of itself as a member: class A { class A; ... } but when the parser generates this it ensures that the RecordTypes for the two are the same. This makes (among other things) inheritance work. This patch fixes a bug where the ASTImporter generated two separate RecordTypes when importing the class and the contained forward declaration, and adds a test case. Thanks to Doug Gregor for advice on this. llvm-svn: 269551
* Revert "Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, ↵Chandler Carruth2016-05-143-14/+10
| | | | | | | | | | NFC"" This reverts commit r269492 as the corresponding LLVM commit was reverted due to lots of warnings. See the review thread for the original LLVM commit (r269491) for details. llvm-svn: 269549
* Added support to the ASTImporter for C++ constructor initializers.Sean Callanan2016-05-141-0/+82
| | | | | | Thanks to Aleksei Sidorin for review and advice. llvm-svn: 269546
* When typo-correcting a using-declaration, actually correct the name of theRichard Smith2016-05-141-0/+4
| | | | | | UsingDecl (so that redeclaration lookup can find it). llvm-svn: 269530
* Fix some typos.Richard Smith2016-05-141-7/+7
| | | | llvm-svn: 269528
* Get default -fms-compatibility-version from cl.exe's versionAdrian McCarthy2016-05-134-6/+56
| | | | | | | | | | | | | | -fms-compatibility-version was defaulting to 18 (VS 2013), which is a pain if your environment is pointing to version 19 (VS 2015) libraries. If cl.exe can be found, this patch uses its version number as the default instead. It re-uses the existing code to find the Visual Studio binaries folder and WinAPI methods to check its version. You can still explicitly specify a compatibility version on the command line. If you don't have cl.exe, this should be a no-op and you'll get the old default of 18. This affected the tests, which assumed that if you didn't specific a version, that it would default to 18, but this won't be true for all machines. So a couple test cases had to be eliminated and a couple others had to be tweaked to allow for various outputs. Addresses: https://llvm.org/bugs/show_bug.cgi?id=27215 Differential Revision: http://reviews.llvm.org/D20136 llvm-svn: 269515
* [ModuleMap][CrashReproducer] Collect headers from inner frameworksBruno Cardoso Lopes2016-05-132-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) Collect headers under inner frameworks (frameworks inside other other frameworks). (2) Make sure we also collect the right header files inside them. More info on (2): Consider a dummy framework module B, with header Frameworks/B/B.h. Now consider that another framework A, with header Frameworks/A/A.h, has a layout with a inner framework Frameworks/A/Frameworks/B/B.h, where the "B/B.h" part is a symlink for Frameworks/B/B.h. Also assume that Frameworks/A/A.h includes <B/B.h>. When parsing header Frameworks/A/A.h, framework module lookup is performed in search for B, and it happens that "Frameworks/A/Frameworks/B/B.h" path is registered in the module instead of real "Frameworks/B/B.h". This occurs because "Frameworks/A/Frameworks/B/B.h" is scanned first by the FileManager, when looking for inner framework modules under Frameworks/A/Frameworks. This makes Frameworks/A/Frameworks/B/B.h the default cached named inside the FileManager for the B.h file UID. This leads to modules being built without consistent paths to underlying header files. This is usually not a problem in regular compilation flow, but it's an issue when running the crash reproducer. The issue is that clangs collect "Frameworks/A/Frameworks/B/B.h" but not "Frameworks/B/B.h" into the VFS, leading to err_mmap_umbrella_clash. So make sure we also collect the original header. Differential Revision: http://reviews.llvm.org/D20194 rdar://problem/25880368 llvm-svn: 269502
* Reapply "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-133-10/+14
| | | | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". Differential Revision: http://reviews.llvm.org/D19902 llvm-svn: 269492
* ARM-MachO: stop claiming to be EABITim Northover2016-05-131-1/+1
| | | | | | | | | | Embedded ARM MachO targets are AAPCS but not full EABI (we don't use __aeabi_whatever and the functions are allowed to be hard-float). Turns out there was already a test for this, but its original purpose had become corrupted over the years. llvm-svn: 269487
* Revert "[ProfileData] (clang) Use Error in InstrProf and Coverage, NFC"Vedant Kumar2016-05-133-14/+10
| | | | | | This reverts commit r269463. It fails two llvm-profdata tests. llvm-svn: 269468
* [MS ABI] Delegating constructors should not assume they are most derivedDavid Majnemer2016-05-131-9/+11
| | | | | | | | A constructor needs to know whether or not it is most derived in order to determine if it is responsible for virtual bases. Delegating constructors assumed they were most derived. llvm-svn: 269465
* [ProfileData] (clang) Use Error in InstrProf and Coverage, NFCVedant Kumar2016-05-133-10/+14
| | | | | | Sync up with "(llvm) Use Error in InstrProf and Coverage". llvm-svn: 269463
* Add an AST matcher for CastExpr kindEtienne Bergeron2016-05-132-0/+23
| | | | | | | | | | | | | | Summary: This AST matcher will match a given CastExpr kind. It's an narrowing matcher on CastExpr. Reviewers: klimek, alexfh, sbenza, aaron.ballman Subscribers: Prazek, jroelofs, aaron.ballman, klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D19871 llvm-svn: 269460
* Use marginally more appropriate functions to detect if we should declare anRichard Smith2016-05-132-5/+6
| | | | | | | implicit copy constructor/assignment, and other minor cleanups. No functionality change intended. llvm-svn: 269457
* Revert "[OpenCL] Add supported OpenCL extensions to target info."Yaxun Liu2016-05-134-65/+14
| | | | | | | | | Revert r269431 due to build failure caused by warning msg: llvm/tools/clang/lib/Basic/Targets.cpp:2090:9: error: 'setSupportedOpenCLOpts' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] void setSupportedOpenCLOpts() { llvm-svn: 269435
* [OpenCL] Add supported OpenCL extensions to target info.Yaxun Liu2016-05-134-14/+65
| | | | | | | | Add supported OpenCL extensions to target info. It serves as default values to save the users of the burden setting each supported extensions and optional core features in command line. Differential Revision: http://reviews.llvm.org/D19484 llvm-svn: 269431
* Prune four superfluous ExternalSemaSource.h includes and one forward ↵Yaron Keren2016-05-134-4/+0
| | | | | | | | declaration in Sema.h where ExternalSemaSource.h was already included due to ExternalSemaSource:: member uses. llvm-svn: 269423
* [CodeGen] Clang does not choose aapcs-vfp calling convention for ARM bare ↵Oleg Ranevskyy2016-05-131-1/+2
| | | | | | | | | | | | | | | | | | | metal target with hard float (EABIHF) Summary: Clang does not detect `aapcs-vfp` for the EABIHF environment. The reason is that only GNUEABIHF is considered while choosing calling convention, EABIHF is ignored. This causes clang to use `aapcs` for EABIHF and add the `arm_aapcscc` specifier to functions in generated IR. The modified `arm-cc.c` test checks that no calling convention specifier is added to functions for EABIHF, which means the default one is used (`CallingConv::ARM_AAPCS_VFP`). Reviewers: rengolin, compnerd, t.p.northover Subscribers: aemerson, rengolin, asl, cfe-commits Differential Revision: http://reviews.llvm.org/D20219 llvm-svn: 269419
* [AST] Add missing const qualifiers to AstContext in Type.cppEtienne Bergeron2016-05-131-9/+9
| | | | | | | | | | | | | | | | Summary: Add some missing const qualifiers to AstContext. The ASTContext can't be modified with accessors. There is no behavior change. This patch is cleanup only. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20226 llvm-svn: 269418
* Simplify getLinuxDynamicLinker() by using a common variable for the triple. NFC.Vasileios Kalintiris2016-05-131-13/+12
| | | | llvm-svn: 269412
OpenPOWER on IntegriCloud