summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [Objective-C Sema]. Issue availability/deprecated warning when Fariborz Jahanian2014-11-071-1/+5
| | | | | | | there is a uinque method found when message is sent to receiver of 'id' type. // rdar://18848183 llvm-svn: 221562
* ARM ABI: simplify decisions on whether args can be expanded.Tim Northover2014-11-071-35/+21
| | | | | | | | | | | | Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being flattened (e.g. [2 x float] rather than "float, float") for various weird ABI reasons. However, this isn't the case for anything else; further, we know at the ABIArgInfo::getDirect callsites whether this flattening is allowed. So, we can get more unified ARM code, with a simpler Clang, by just using that knowledge directly. llvm-svn: 221559
* Introduce a SanitizerKind enum to LangOptions.Alexey Samsonov2014-11-0718-237/+241
| | | | | | | | | | | | | Use the bitmask to store the set of enabled sanitizers instead of a bitfield. On the negative side, it makes syntax for querying the set of enabled sanitizers a bit more clunky. On the positive side, we will be able to use SanitizerKind to eventually implement the new semantics for -fsanitize-recover= flag, that would allow us to make some sanitizers recoverable, and some non-recoverable. No functionality change. llvm-svn: 221558
* Fix style.Michael J. Spencer2014-11-071-4/+3
| | | | llvm-svn: 221546
* Fix clash of gcc toolchains in hexagon driver regression tests.Samuel Antao2014-11-073-10/+15
| | | | | | If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands. llvm-svn: 221535
* Revert r221404 which caused lldb to not displayFariborz Jahanian2014-11-071-33/+0
| | | | | | vararg expressions. llvm-svn: 221533
* CodeGen, Itanium: Properly dllimport RTTI dataDavid Majnemer2014-11-071-1/+10
| | | | | | | | | | We would blindly assume that RTTI data should have the same linkage as the vtable because we didn't think the RTTI data was external. This oversight stemmed because we didn't take dllimport into account. This fixes PR21512. llvm-svn: 221511
* Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...Frederic Riss2014-11-062-5/+5
| | | | | | | ... instead of a DIScope that might wrap something that's not actually a DIScope (eg. a DIGlobalVariable); llvm-svn: 221481
* Remove references to the cortex-a9-mp CPU.Charlie Turner2014-11-063-5/+4
| | | | | | | | | | This CPU definition is redundant. The Cortex-A9 is defined as supporting multiprocessing extensions. Remove references to this CPU. This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057 Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678 llvm-svn: 221458
* Don't manually insert L prefixes.Rafael Espindola2014-11-061-180/+122
| | | | | | Simply marking the symbol private conveys the desire to hide them to LLVM. llvm-svn: 221451
* [X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add ↵Andrea Di Biagio2014-11-061-12/+7
| | | | | | | | | | | | | | | | | | | missing checks to test for target features. This patch simplifies how default target features are set for AMD bdver2 and bdver1. In particular, method 'getDefaultFeatures' now implements a fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'. That is because 'bdver2' has the same features available in bdver1 plus BMI, FMA, F16C and TBM. This patch also adds missing checks for predefined macros in test predefined-arch-macros.c. In the case of BTVER2, the test now also checks for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now also checks for the presence of FSGSBASE. Differential Revision: http://reviews.llvm.org/D6134 llvm-svn: 221449
* Fix for exception specification mismatch in explicit instantiation.Alexey Bataev2014-11-061-0/+23
| | | | | | | According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this. Differential Revision: http://reviews.llvm.org/D5822 llvm-svn: 221448
* [X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled ↵Craig Topper2014-11-061-98/+45
| | | | | | for different CPUs. llvm-svn: 221437
* Patch for small addition to availability attribute.Fariborz Jahanian2014-11-051-0/+13
| | | | | | | | | This is to accept "NA" in place of vesion number for availability attribute. Used on introduced=NA to mean unavailable and deprecated=NA to mean nothing (not deprecated). rdar://18804883 llvm-svn: 221417
* Thread Safety Analysis: move warnings on range-based for loops out of betaDeLesley Hutchins2014-11-051-11/+9
| | | | | | and into -Wthread-safety. llvm-svn: 221410
* This patch fixes a crash after rebuilding call AST ofFariborz Jahanian2014-11-051-0/+33
| | | | | | | | | | | | | an __unknown_anytype(...). In this case, we rebuild the vararg function type specially to convert the call expression to something that IRGen can handle. However, FunctionDecl as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and results in crash when accessing its params later on. This patch fixes the crash by rebuilding the FunctionDecl to match its new resolved type. rdar://15297105. John McCall, please review post-commit. llvm-svn: 221404
* cmake: Conditionalize CodeGen's dependency on intrinsics_genReid Kleckner2014-11-051-1/+10
| | | | | | | | Custom targets in cmake cannot be exported, and this dependency is only needed in the combined build to ensure that Intrinsics.gen is created before compiling CodeGen. In the standalone, all of LLVM is build first. llvm-svn: 221391
* [DebugInfo] Do not record artificial global initializer functions in the ↵Frederic Riss2014-11-051-1/+4
| | | | | | | | | | | | | | | DeclCache. When we are generating the global initializer functions, we call CGDebugInfo::EmitFunctionStart() with a valid decl which is describing the initialized global variable. Do not update the DeclCache with this key as it will overwrite the the cached variable DIGlobalVariable with the newly created artificial DISubprogram. One could wonder if we should put artificial subprograms in the DIE tree at all (there are vaild uses for them carrying line information though). llvm-svn: 221385
* IR: MDNode => Value: Update for LLVM API change in r221375Duncan P. N. Exon Smith2014-11-051-1/+1
| | | | llvm-svn: 221376
* Revert "clang-format: [js] Updates to Google's JavaScript style."Daniel Jasper2014-11-052-2/+1
| | | | | | | | This reverts commit eefd2eaad43c5c2b17953ae7ed1e72b28e696f7b. Apparently, this change was a bit premature. llvm-svn: 221365
* Remove superceded warning warn_forgotten_module_headerBen Langmuir2014-11-051-28/+0
| | | | | | | | | | | | This DefaultIgnore warning under -Wincomplete-module was firing on any module map files that happened to be parsed (it's only supposed to fire on headers), and it has been superceded by -Wnon-modular-include-in-module anyway. For compatibility, I rewired -Wincomplete-module to imply -Wnon-modular-include-in-module. llvm-svn: 221357
* MS ABI: Correctly mangle CV qualifiers from typedefsWill Wilson2014-11-051-1/+1
| | | | llvm-svn: 221344
* clang-format: Improve free-standing macro detection.Daniel Jasper2014-11-051-10/+7
| | | | | | | | | | | | Before: SOME_WEIRD_LOG_MACRO << "Something long enough to cause a line break"; After: SOME_WEIRD_LOG_MACRO << "Something long enough to cause a line break"; llvm-svn: 221338
* Debug info: Emit the correct type for the __FuncPtr field in a blockAdrian Prantl2014-11-051-2/+4
| | | | | | | | descriptor. rdar://problem/15984431 llvm-svn: 221326
* Filter out non-static class members when correcting non-member-references.Kaelyn Takata2014-11-051-7/+23
| | | | llvm-svn: 221319
* Use backslashes to escape spaces and other backslashes in -dwarf-debug-flags.Bob Wilson2014-11-041-2/+23
| | | | | | | | | | The command line options are specified in a space-separated list that is an argument to -dwarf-debug-flags, so that breaks if there are spaces in the options. This feature came from Apple's internal version of GCC, so I went back to check how llvm-gcc handled this and matched that behavior. rdar://problem/18775420 llvm-svn: 221309
* Make helper function static. NFC.Benjamin Kramer2014-11-041-1/+2
| | | | llvm-svn: 221290
* Use @rpath as LC_ID_DYLIB for ASan dylib on OS XKuba Brecka2014-11-042-7/+30
| | | | | | | | Change the LC_ID_DYLIB of ASan's dynamic libraries on OS X to be set to "@rpath/libclang_rt.asan_osx_dynamic.dylib" and similarly for iossim. Clang driver then sets the "-rpath" to be the real path to where clang currently has the dylib (because clang uses the relative path to its current executable). This means if you move the compiler or install the binary release, -fsanitize=address will link to the proper library. Reviewed at http://reviews.llvm.org/D6018 llvm-svn: 221279
* clang-format: Use identifier table for keywords in other languages.Daniel Jasper2014-11-048-65/+127
| | | | | | | | | Slightly easier to write, more efficient and prevents bugs by misspelling them. No functional changes intended. llvm-svn: 221259
* clang-format: [Java] Fix class declaration line breaks.Daniel Jasper2014-11-041-0/+4
| | | | | | | | | | | | | | | | Before: @SomeAnnotation() abstract class aaaaaaaaa<a> extends bbbbbbbbbbbb<b> implements cccccccccccc { } After: @SomeAnnotation() abstract class aaaaaaaaa<a> extends bbbbbbbbbbbb<b> implements cccccccccccc { } llvm-svn: 221256
* Driver: Pass some std::strings by reference instead of valueDavid Majnemer2014-11-041-2/+2
| | | | | | No functional change intended. This fixes PR21463. llvm-svn: 221249
* [clang-tidy] Move -extra-arg handling to CommonOptionsProviderAlexander Kornienko2014-11-042-0/+73
| | | | | | | | | | | | | | | | | | Summary: Handle -extra-arg and -extra-arg-before options in the CommonOptionsProvider so they can be used in all clang tools. Adjust arguments in a CompilationDatabase wrapper instead of adding ArgumentsAdjuster to the tool. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6073 llvm-svn: 221248
* [llvm-api-change] Use findProgramByName.Michael J. Spencer2014-11-042-4/+6
| | | | llvm-svn: 221222
* Use the new LLVM_END_WITH_NULL nameReid Kleckner2014-11-042-3/+3
| | | | llvm-svn: 221217
* Lower __builtin_fabs* to @llvm.fabs.*Reid Kleckner2014-11-031-0/+7
| | | | | | | | | mingw64's headers implement fabs by calling __builtin_fabs, so using the library call results in an infinite loop. If the backend legalizes @llvm.fabs as a call to fabs later, things should work out, as the crt provides a definition. llvm-svn: 221206
* Remove dead AST type argument to EmitFAbsReid Kleckner2014-11-031-5/+5
| | | | llvm-svn: 221205
* Move the no-prototype calling conv check after decl mergingReid Kleckner2014-11-031-13/+14
| | | | | | | | | | | Now we don't warn on this code: void __stdcall f(void); void __stdcall f(); My previous commit regressed this functionality because I didn't update the relevant test case which used a definition. llvm-svn: 221188
* Don't diagnose no-prototype callee-cleanup function definitionsReid Kleckner2014-11-031-15/+15
| | | | | | | | | | | | We already have a warning on the call sites of code like this: void f() { } void g() { f(1, 2, 3); } t.c:2:21: warning: too many arguments in call to 'f' We can limit ourselves to diagnosing unprototyped forward declarations of f to cut down on noise. llvm-svn: 221184
* Further restrict issuance of 'override' warning if methodFariborz Jahanian2014-11-031-5/+7
| | | | | | is argument to a macro which is defined in system header. llvm-svn: 221172
* Implement vaarg lowering for ppc32. Lowering of scalars and aggregatesRoman Divacky2014-11-031-3/+101
| | | | | | is supported. Complex numbers are not. llvm-svn: 221170
* This patch reverts r220496 which issues warning on comparing Fariborz Jahanian2014-11-031-31/+1
| | | | | | | | parameters with nonnull attribute when comparison is always true/false. Patch causes false positive when parameter is modified in the function. llvm-svn: 221163
* Emit OpenCL local global variables without zeorinitializerMatt Arsenault2014-11-031-1/+9
| | | | | | | | Local variables are not initialized, and every target has been (incorrectly) ignoring the unnecessary request for zero initialization. llvm-svn: 221162
* Don't allow dllimport/export on classes with internal linkage (PR21399)Hans Wennborg2014-11-031-0/+6
| | | | | | | | | | | Trying to import or export such classes doesn't make sense, and Clang would assert trying to export vtables for them. This is consistent with how we treat functions with internal linkage, but it is stricter than MSVC so we may have to back down if it breaks real code. llvm-svn: 221160
* Revert "clang-format: [Java] Allow trailing semicolons after enums."Daniel Jasper2014-11-031-3/+4
| | | | | | | | | This reverts commit b5bdb2ef59ab922bcb4d6e843fffaee1f7f68a8c. This doesn't really seem necessary on second though and causes problems with C++ enum formatting. llvm-svn: 221158
* Don't dllimport inline functions when targeting MinGW (PR21366)Hans Wennborg2014-11-034-9/+44
| | | | | | | | | | | | It turns out that MinGW never dllimports of exports inline functions. This means that code compiled with Clang would fail to link with MinGW-compiled libraries since we might try to import functions that are not imported. To fix this, make Clang never dllimport inline functions when targeting MinGW. llvm-svn: 221154
* [x86] Add cx16 feature to KNL, SKX, and CoreAVXi CPUs.Craig Topper2014-11-031-2/+5
| | | | llvm-svn: 221132
* [x86] Realphabetize the feature string decoding function since it was mostly ↵Craig Topper2014-11-031-4/+4
| | | | | | in alphabetical order. llvm-svn: 221131
* Add FSGSBASE intrinsics to x86 intrinsic headers.Craig Topper2014-11-033-15/+76
| | | | llvm-svn: 221130
* Remove definitions from Intrin.h that already exist in one of the other x86 ↵Craig Topper2014-11-031-52/+0
| | | | | | intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future. llvm-svn: 221127
* clang-format: [Java] Allow trailing semicolons after enums.Daniel Jasper2014-11-031-4/+3
| | | | | | | | | | | Before: enum SomeThing { ABC, CDE } ; After: enum SomeThing { ABC, CDE }; llvm-svn: 221125
OpenPOWER on IntegriCloud