summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [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
* clang-format: [Java] Fix more generics formatting.Daniel Jasper2014-11-031-1/+1
| | | | | | | | | | Before: < T extends B > T getInstance(Class<T> type); After: <T extends B> T getInstance(Class<T> type); llvm-svn: 221124
* clang-format: [Java] Fix static generic methods.Daniel Jasper2014-11-031-0/+2
| | | | | | | | | | Before: public static<R> ArrayList<R> get() {} After: public static <R> ArrayList<R> get() {} llvm-svn: 221122
* clang-format: [Java] Fix class declaration formatting.Daniel Jasper2014-11-032-4/+8
| | | | | | | | | | | | | | | | Before: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } After: @SomeAnnotation() abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc { } llvm-svn: 221121
* clang-format: Fix false positive in lambda detection.Daniel Jasper2014-11-021-1/+2
| | | | | | | | | | | | Before: delete [] a -> b; After: delete[] a->b; This fixes part of llvm.org/PR21419. llvm-svn: 221114
* clang-format: [Java] Support enums without trailing semicolon.Daniel Jasper2014-11-021-0/+3
| | | | | | | | | | | | | | | | | | | Before: class SomeClass { enum SomeThing { ABC, CDE } void f() { } } After: class SomeClass { enum SomeThing { ABC, CDE } void f() { } } This fixed llvm.org/PR21458. llvm-svn: 221113
* clang-format: [Java] Don't break imports.Daniel Jasper2014-11-021-3/+3
| | | | | | This fixes llvm.org/PR21453. llvm-svn: 221112
* clang-format: [Java] Add space between "synchronized" and "(".Daniel Jasper2014-11-021-0/+3
| | | | | | | | | | | | | | | | Before: synchronized(mData) { // ... } After: synchronized (mData) { // ... } This fixes llvm.org/PR21455. llvm-svn: 221110
* clang-format: [Java] Support generics with "?".Daniel Jasper2014-11-021-1/+8
| | | | | | | | | | | | | | | | | | | Before: @Override public Map < String, ? > getAll() { // ... } After: @Override public Map<String, ?> getAll() { // ... } This fixes llvm.org/PR21454. llvm-svn: 221109
* clang-format: [Java] Support try/catch/finally blocks.Daniel Jasper2014-11-021-1/+2
| | | | llvm-svn: 221104
* clang-format: [Java] Don't break after extends/implements.Daniel Jasper2014-11-023-7/+23
| | | | | | | | | | | | Before: abstract class SomeClass extends SomeOtherClass implements SomeInterface {} After: abstract class SomeClass extends SomeOtherClass implements SomeInterface {} llvm-svn: 221103
OpenPOWER on IntegriCloud