summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PECOFF] Fix exported symbol in the import libraryRui Ueyama2014-10-216-8/+15
| | | | | | | | | | | | | | | | | | | | | | There are two ways to specify a symbol to be exported in the module definition file. 1) EXPORT <external name> = <symbol> 2) EXPORT <symbol> In (1), you give both external name and internal name. In that case, the linker tries to find a symbol using the internal name, and write that address to the export table with the external name. Thus, from the outer world, the symbol seems to be exported as the external name. In (2), internal name is basically the same as the external name with an exception: if you give an undecorated symbol to the EXPORT directive, and if the linker finds a decorated symbol, the external name for the symbol will become the decorated symbol. LLD didn't implement that exception correctly. This patch fixes that. llvm-svn: 220333
* GCC has supported C++11 ref-qualifiers since 4.8.1Reid Kleckner2014-10-212-25/+29
| | | | | | | | | | | | This requires incorporating __GNUC_PATCHLEVEL__ into our prerequisite check, and renaming our __GNUC_PREREQ to LLVM_GNUC_PREREQ, since it is now functionally different. Patch by Chilledheart! Differential Revision: http://reviews.llvm.org/D5879 llvm-svn: 220332
* [modules] When building an injected-class-name type, we may have to insert itRichard Smith2014-10-216-6/+36
| | | | | | into multiple merged classes' TypeForDecl slots. llvm-svn: 220331
* Subclass InputGraph to get darwin linker library semanticsNick Kledzik2014-10-219-8/+157
| | | | | | | | | | | | | | | | | | | The darwin linker operates differently than the gnu linker with respect to libraries. The darwin linker first links in all object files from the command line, then to resolve any remaining undefines, it repeatedly iterates over libraries on the command line until either all undefines are resolved or no undefines were resolved in the last pass. When Shankar made the InputGraph model, the plan for darwin was for the darwin driver to place all libraries in a group at the end of the InputGraph. Thus making the darwin model a subset of the gnu model. But it turns out that does not work because the driver cannot tell if a file is an object or library until it has been loaded, which happens later. This solution is to subclass InputGraph for darwin and just iterate the graph the way darwin linker needs. llvm-svn: 220330
* R600: Use default GlobalDirectiveMatt Arsenault2014-10-212-1/+14
| | | | | | | The overridden one wasn't inserting a space, so you would end up with .globalfoo llvm-svn: 220329
* [sanitizer] Fix build with _FILE_OFFSET_BITS=64.Evgeniy Stepanov2014-10-211-0/+8
| | | | | | | Sanitizer source is not affected by _FILE_OFFSET_BITS in general, but this one file must be built with 32-bit off_t. More details in the code. llvm-svn: 220328
* Use a StringRef. No functionality change.Rafael Espindola2014-10-211-5/+4
| | | | llvm-svn: 220327
* Use __cxa_demangle on FreeBSD to fix buildbots.Rui Ueyama2014-10-212-3/+3
| | | | llvm-svn: 220326
* Teach combineMetadata how to merge 'nonnull' metadata.Philip Reames2014-10-211-0/+4
| | | | | | combineMetadata is used when merging two instructions into one. This change teaches it how to merge 'nonnull' - i.e. only preserve it on the new instruction if it's set on both sources. This isn't actually used yet since I haven't adjusted any of the call sites to pass in nonnull as a 'known metadata'. llvm-svn: 220325
* Preserve 'nonnull' when changing type of the load.Philip Reames2014-10-211-0/+1
| | | | | | | | When changing the type of a load in Chandler's recent InstCombine changes, we can preserve the new 'nonnull' metadata. I considered adding an assert since 'nonnull' is only valid on pointer types, but casting a pointer to a non-pointer would involve more than a bitcast anyways. If someone extends this transform to handle more than bitcasts, the verifier will report the malformed IR, so a separate assertion isn't needed. Also, the fpmath flags would have the same problem. llvm-svn: 220324
* Extend the verifier to check usage of 'nonnull' metadata.Philip Reames2014-10-211-0/+8
| | | | | | The recently added !nonnull metadata is only valid on loads of pointer type. llvm-svn: 220323
* Expose the type-info flags at the public API layer. These flags provide much ↵Enrico Granata2014-10-2115-112/+128
| | | | | | more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593 llvm-svn: 220322
* [PBQP] Teach PassConfig to tell if the default register allocator is used.Arnaud A. de Grandmaison2014-10-215-19/+14
| | | | | | | | This enables targets to adapt their pass pipeline to the register allocator in use. For example, with the AArch64 backend, using PBQP with the cortex-a57, the FPLoadBalancing pass is no longer necessary. llvm-svn: 220321
* Move anonymous types declared in an anonymous union toEric Christopher2014-10-211-91/+94
| | | | | | | outside the anonymous union as it's a language extension we don't normally support. llvm-svn: 220320
* Remove unused variable.Eric Christopher2014-10-211-1/+0
| | | | llvm-svn: 220319
* Fix implicit conversion of NULL constant to 'bool'.Eric Christopher2014-10-211-1/+1
| | | | llvm-svn: 220318
* Move code a bit to avoid a few declarations. NFC.Rafael Espindola2014-10-211-45/+40
| | | | llvm-svn: 220317
* [PBQP] Add a testcase for r220302: Fix coalescing benefitsArnaud A. de Grandmaison2014-10-211-0/+14
| | | | llvm-svn: 220316
* Assume cxxabi.h exists on FreeBSDRui Ueyama2014-10-213-3/+6
| | | | | | | HAVE_CXXABI_H is not defined on FreeBSD but the system actually has the header. CMake test fails because the header depends on size_t. llvm-svn: 220315
* InstCombine: Simplify FoldICmpCstShrCstDavid Majnemer2014-10-214-378/+348
| | | | | | | | | This function was complicated by the fact that it tried to perform canonicalizations that were already preformed by InstSimplify. Remove this extra code and move the tests over to InstSimplify. Add asserts to make sure our preconditions hold before we make any assumptions. llvm-svn: 220314
* Removing unused variable (assigned into, but never read from); NFC.Aaron Ballman2014-10-211-2/+0
| | | | llvm-svn: 220313
* Follow-up commit to r211657 which introduced these macros, but not for MSVC. ↵Aaron Ballman2014-10-212-105/+99
| | | | | | This turns out to break our freestanding tests on Windows when compiling in MSVC-compatible mode. It was decided (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141020/116942.html is the start of the thread) to support this as part of Clang's interface on all platforms. llvm-svn: 220312
* Treat -g1 as -gline-tables-onlyHal Finkel2014-10-212-1/+4
| | | | | | | | | | | | | -g1 on gcc (and also IBM's xlc) are documented to be very similar to -gline-tables-only. Our -gline-tables-only might still be more verbose than -g1 on other compilers, but currently we treat -g1 as -g, and so we're producing much more debug info at -g1 than everybody else. Treating -g1 as -gline-tables-only brings us much closer to what everyone else is doing. For more information, see the discussion on http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039649.html llvm-svn: 220311
* Drop support for an old version of ld64 (from darwin 9).Rafael Espindola2014-10-217-57/+3
| | | | llvm-svn: 220310
* remove function names from comments; NFCSanjay Patel2014-10-211-2/+2
| | | | llvm-svn: 220309
* Convert two tests to use llvm-readobj.Rafael Espindola2014-10-212-32/+41
| | | | llvm-svn: 220308
* Driver: Quote the command in crash reproduction scripts.Justin Bogner2014-10-215-32/+39
| | | | | | | | This fixes crash report generation when filenames have spaces. It also removes an awkward workaround that quoted *some* arguments when generating crash reports. llvm-svn: 220307
* Add typemaps to handle the transformation of Python list of strings into a ↵Enrico Granata2014-10-211-0/+74
| | | | | | 'char const **'. This fixes zephyr's issue with SBTarget::Launch without splitting the API into multiple names llvm-svn: 220306
* Driver: Move crash report command mangling into Command::PrintJustin Bogner2014-10-213-41/+47
| | | | | | | | | | This pushes the logic for generating a crash reproduction script entirely into Command::Print, instead of Command doing half of the work and then relying on textual substitution for the rest. This makes this logic much easier to read and will simplify fixing a couple of issues in this area. llvm-svn: 220305
* R600/SI: Add pattern for bswapMatt Arsenault2014-10-214-1/+84
| | | | llvm-svn: 220304
* [PBQP] Check for out of bound access in DEBUG buildsArnaud A. de Grandmaison2014-10-211-2/+8
| | | | | | | | It is just too easy to use a virtual register intead of a NodeId without a compiler warning. This does not fix the fundamental problem, i.e. both have the same underlying types, but increases the likelyhood to detect it. llvm-svn: 220303
* [PBQP] Fix coalescing benefitsArnaud A. de Grandmaison2014-10-211-2/+2
| | | | | | As coalescing registers is a benefit, the cost should be improved (i.e. made smaller) when coalescing is possible. llvm-svn: 220302
* X86AsmInstrumentation.cpp: Dissolve initializer-ranged-for. MSC17 disliked it.NAKAMURA Takumi2014-10-211-3/+3
| | | | llvm-svn: 220301
* Silence a -Wcast-qual warning; NFC.Aaron Ballman2014-10-211-1/+1
| | | | llvm-svn: 220300
* Test commitColin LeMahieu2014-10-211-1/+1
| | | | | | Fixing brief comment. llvm-svn: 220299
* Comment cleanup. NFC.Rafael Espindola2014-10-211-16/+14
| | | | | | | Don't duplicate names in comments and remove useless ones. Hopefully anyone reading this knows what main is. llvm-svn: 220298
* The nodebug attribute has a C++11-style spelling supported by GCC as well. ↵Aaron Ballman2014-10-212-2/+4
| | | | | | This modifies it so we support that spelling as well. llvm-svn: 220297
* Some tests used __typeof__ instead of decltype. Replace these usages.Marshall Clow2014-10-214-8/+8
| | | | llvm-svn: 220296
* LWG #2212 (not yet adopted) mandates that tuple_size/tuple_element are ↵Marshall Clow2014-10-212-0/+101
| | | | | | available if <array> or <utility> are included (not just <tuple>). We already do this. Add some tests to make sure that this remains true. llvm-svn: 220295
* Add support for addmod to mri scripts.Rafael Espindola2014-10-212-1/+23
| | | | llvm-svn: 220294
* Fixing the MSVC build by removing friendship with CodeGenFunction; NFC.Aaron Ballman2014-10-211-1/+0
| | | | llvm-svn: 220293
* [Tsan] Add FreeBSD support to longjmp-related definitionsViktor Kutuzov2014-10-212-1/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D5857 llvm-svn: 220292
* [Tsan] Fix sigaction_t to match system definition on FreeBSDViktor Kutuzov2014-10-211-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D5856 llvm-svn: 220291
* [PowerPC] Avoid VSX FMA mutate when killed product reg = addend regBill Schmidt2014-10-213-2/+29
| | | | | | | | | | | | | | | | | | | | | With VSX enabled, test/CodeGen/PowerPC/recipest.ll exposes a bug in the FMA mutation pass. If we have a situation where a killed product register is the same register as the FMA target, such as: %vreg5<def,tied1> = XSNMSUBADP %vreg5<tied0>, %vreg11, %vreg5, %RM<imp-use>; VSFRC:%vreg5 F8RC:%vreg11 then the substitution makes no sense. We end up getting a crash when we try to extend the interval associated with the killed product register, as there is already a live range for %vreg5 there. This patch just disables the mutation under those circumstances. Since recipest.ll generates different code with VMX enabled, I've modified that test to use -mattr=-vsx. I've borrowed the code from that test that exposed the bug and placed it in fma-mutate.ll, where it tests several mutation opportunities including the "bad" one. llvm-svn: 220290
* [analyzer] Move the NewDeleteLeaks checker from CplusplusAlpha to Cplusplus ↵Anton Yartsev2014-10-2110-13/+13
| | | | | | package. llvm-svn: 220289
* [ARM] NEON 32-bit scalar moves are also available in VFPv2Oliver Stannard2014-10-212-2/+35
| | | | | | | | | | | The 32-bit variants of the NEON scalar<->GPR move instructions are also available in VFPv2. The 8- and 16-bit variants do require NEON. Note that the checks in the test file are all -DAG because they are checking a mixture of stdout and stderr, and the ordering is not guaranteed. llvm-svn: 220288
* clang-format: [Java] Understand string literal concatenation.Daniel Jasper2014-10-212-0/+8
| | | | | | | | | | | Before: String someString = "abc" + "cde"; After: String someString = "abc" + "cde"; llvm-svn: 220287
* clang-format: [Java] Fix formatting of multiple annotations.Daniel Jasper2014-10-212-1/+5
| | | | | | | | | | | | | | | Before: @SuppressWarnings(value = "unchecked") @Author(name = "abc") public void doSomething() { } After: @SuppressWarnings(value = "unchecked") @Author(name = "abc") public void doSomething() { } llvm-svn: 220286
* clang-format: [Java] Fix space in generic method calls.Daniel Jasper2014-10-212-0/+7
| | | | | | | | | | Before: A.<B>doSomething(); After: A.<B>doSomething(); llvm-svn: 220285
* clang-format: [Java] Improve annotation handling.Daniel Jasper2014-10-212-0/+4
| | | | | | | | | | | | Before: @SuppressWarnings( value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") public static int iiiiiiiiiiiiiiiiiiiiiiii; After: @SuppressWarnings(value = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") public static int iiiiiiiiiiiiiiiiiiiiiiii; llvm-svn: 220284
OpenPOWER on IntegriCloud