Commit Graph

168863 Commits

Author SHA1 Message Date
Rafael Espindola 191b95125a Don't produce an alias between destructors with different calling conventions.
Fixes pr19007.

llvm-svn: 203007
2014-03-05 21:04:41 +00:00
Richard Smith 7bea1d42d8 When building a module from the command line via -emit-module, add an entry to
the module build stack for the module being built, so we can correctly detect
recursive module builds.

llvm-svn: 203006
2014-03-05 20:55:36 +00:00
Richard Smith 8c71eba19f If a #include finds a file relative to the current file, don't forget to check
whether it's part of a module.

llvm-svn: 203005
2014-03-05 20:51:45 +00:00
Rui Ueyama b63570ecb6 Fix broken link.
llvm-svn: 203004
2014-03-05 20:39:57 +00:00
Rui Ueyama 746c915c9d Visual Studio 11 = VS2012
llvm-svn: 203003
2014-03-05 20:36:07 +00:00
Nico Weber fcf6128c71 Mention clang-cl in MSVCCompatibility.rst
llvm-svn: 203002
2014-03-05 20:18:59 +00:00
Rafael Espindola 8377085657 Always print the implicit .text at the start of an asm file.
Before llvm-mc would print it, but llc was assuming that it would produce
another section changing directive before one was needed. That assumption is
false with inline asm.

Fixes PR19049.

Another option would be to always create the section, but in the asm printer
avoid printing sections changes during initialization. That would work, but
* We do use the fact that llvm-mc prints it in testing. The tests can be changed
  if needed.
* A quick poll on IRC suggest that most developers prefer the implicit .text to
  be printed.

llvm-svn: 203001
2014-03-05 20:09:15 +00:00
Rafael Espindola 1368f8ac96 Update for llvm change.
llvm-svn: 203000
2014-03-05 20:08:57 +00:00
Ben Langmuir 8d11639612 Fix an inconsistency in treatment of trailing / in path::const_iterator
When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.

llvm-svn: 202999
2014-03-05 19:56:30 +00:00
Rui Ueyama d6ad741e5e Add "override" to member functions where appropriate.
llvm-svn: 202998
2014-03-05 19:50:03 +00:00
Benjamin Kramer 061d147f74 ConstantFolding: Also fold the vector overloads of our math intrinsics.
llvm-svn: 202997
2014-03-05 19:41:48 +00:00
Cameron McInally 791ae9927c Lower AVX v4i64->v4i32 truncate to one shuffle.
llvm-svn: 202996
2014-03-05 19:41:16 +00:00
Argyrios Kyrtzidis f8d46fb6eb [code-completion] Add a couple of test cases suggested by Jordan, and a FIXME.
llvm-svn: 202995
2014-03-05 19:10:31 +00:00
Marshall Clow 78a87e8a68 Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it.
llvm-svn: 202994
2014-03-05 19:06:20 +00:00
David Majnemer f27217ffaf AST: Remove layering violation with Sema
Scope lives in Sema and cannot be used in AST. Shuffle things around.

llvm-svn: 202993
2014-03-05 18:55:38 +00:00
David Blaikie 7f4a52eaee Fix clang -Werror build break due to mismatched sign comparison.
Originally committed in r202985.

llvm-svn: 202992
2014-03-05 18:53:36 +00:00
Marshall Clow 28eded3845 Mark is_final as a C++14 feature.
llvm-svn: 202991
2014-03-05 17:58:48 +00:00
Marshall Clow f2c10e1340 Remove definition of std::fmaf from libc++. Fixes bug #18910. This function should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value
llvm-svn: 202990
2014-03-05 17:09:51 +00:00
Aaron Ballman 8f1439bd0c [C++11] Using std::unique_ptr to ensure that Argument objects do not leak (since clang-tblgen isn't long-lived, the old leak is probably acceptable, but it offended my senses nonetheless).
llvm-svn: 202989
2014-03-05 16:49:55 +00:00
Hans Wennborg 928fb264a5 Work around MSVC bug in IntrusiveRefCntPtr.h
The build was failing with:

  error C2664: 'std::atomic_int::atomic_int(const std::atomic_int &)' : cannot convert argument 1 from 'int' to 'const std::atomic_int &'

Apparently "std::atomic_int x(0)" doesn't work, but "std::atomic<int> x(0)"
does.

llvm-svn: 202988
2014-03-05 16:26:04 +00:00
Alexander Kornienko 9de3a98c4e Fixed a crash when handling diagnostics without a valid file location, e.g. 'error reading <file>'.
llvm-svn: 202987
2014-03-05 15:44:36 +00:00
Ben Langmuir 53145df884 Use ThreadSafeRefCountedBase for vfs::FileSystem
Allow trivial read-only filesystems such as RealFileSystem to be shared
between threads.

llvm-svn: 202986
2014-03-05 15:25:59 +00:00
Oliver Stannard d55e115b58 ARM: Correctly align arguments after a byval struct is passed on the stack
llvm-svn: 202985
2014-03-05 15:25:27 +00:00
Ben Langmuir 7590be3cfa Add a ThreadSafeRefCountedBase
A version of RefCountedBase that uses std::atomic_int to store its
reference count.

llvm-svn: 202984
2014-03-05 15:24:33 +00:00
Alexey Samsonov 921f5a529e asan_symbolize.py: use llvm-symbolizer results even if it returned function name w/o file/line info
llvm-svn: 202983
2014-03-05 15:18:50 +00:00
Alexey Samsonov 8ad7a05bb4 Improve llvm-symbolizer discovery in asan_symbolize.py
llvm-svn: 202982
2014-03-05 15:00:36 +00:00
Alexey Samsonov e062e4c7eb Enable memrchr interceptor only on Linux
llvm-svn: 202981
2014-03-05 14:07:19 +00:00
Ed Maste 32aa12b86c Build JITLoader on FreeBSD also
llvm-svn: 202980
2014-03-05 13:57:24 +00:00
Dmitry Vyukov 792d4b1559 tsan: add missing header file to sanitizer_common cmake file
llvm-svn: 202979
2014-03-05 13:55:32 +00:00
Timur Iskhodzhanov 77764b6d4c Style fix: replace "1 entries" with "1 entry" in the vftable layout dumping code
llvm-svn: 202978
2014-03-05 13:54:07 +00:00
Dmitry Vyukov e73e0a04d7 tsan: fix deadlock detector build for SANITIZER_DEADLOCK_DETECTOR_VERSION=2
llvm-svn: 202977
2014-03-05 13:53:29 +00:00
Ed Maste 29150c1731 Put "jit" in alpha order in log category list
llvm-svn: 202976
2014-03-05 13:43:23 +00:00
Dmitry Vyukov 9b410fb627 tsan: implement new version of standalong deadlock detector
intercept pthread_cond (it is required to properly track state of mutexes)
detect cycles in mutex graph

llvm-svn: 202975
2014-03-05 13:41:21 +00:00
Dmitry Vyukov cd3583a4c7 tsan: include what you use
VPrintf uses common_flags()

llvm-svn: 202974
2014-03-05 13:40:05 +00:00
Tobias Grosser fbe95dcfd2 [LangRef] Improve llvm.mem.parallel_loop_access example
The following changes have been applied:

  - Removed 'align 4'. We can simplify this away, as it does not provide useful
    information in the example.
  - Use named instructions instead of '%0'. This is nicer, but more importantly
    this makes the IR valid. Before we had two assignments to %0 in a single
    example.
  - Add a missing branch instruction to make the loop structure clear.
  - Move one access into outer.for.body to make it not look that empty.
  - The statments that are only in the outer loop body should not reference the
    inner loop metadata, but only the outer loop. Only statements in both loops
    should reference both surrounding loops.
  - Rename the array indexes to make them all independent. Before there were
    identical array indexes in the inner and the outer loop. We want to
    avoid this special case as it may lead to confusion.

llvm-svn: 202973
2014-03-05 13:36:04 +00:00
Alexey Samsonov 6dece3c99f Add common interceptors for memchr/memrchr
llvm-svn: 202972
2014-03-05 13:25:32 +00:00
Benjamin Kramer 65f0a4a1af Revert "[C++11] Replace trivial lambda with std::cref."
MSVC2013's standard library is too broken to understand this pattern.

llvm-svn: 202971
2014-03-05 13:25:00 +00:00
Alexander Kornienko 16ac6cebcf Added a module for checks not related to LLVM or Google coding style.
llvm-svn: 202970
2014-03-05 13:14:32 +00:00
Alexander Kornienko 21f3b77707 Fixed formatting.
llvm-svn: 202969
2014-03-05 13:01:24 +00:00
Benjamin Kramer fcef811822 [C++11] Replace trivial lambda with std::cref.
llvm-svn: 202968
2014-03-05 11:38:18 +00:00
Joerg Sonnenberger cce644a633 Enable integrated assembler on OpenBSD/PPC32 by default, too.
From Brad Smith.

llvm-svn: 202967
2014-03-05 11:37:04 +00:00
Vladimir Medic 27c398e38c This patch implements .set dsp directive and sets appropriate feature bits.This directive is a counterpart of -mattr=dsp command line option with the exception that it does not influence elf header flags. The usage example is gives in test file.
llvm-svn: 202966
2014-03-05 11:05:09 +00:00
Alexander Kornienko cef10edcb2 Added a const qualifier to SourceManager& parameters.
llvm-svn: 202964
2014-03-05 10:38:27 +00:00
Tobias Grosser ba49e4229c Add missing parenthesis in SCEV comment
Contributed-by: Michael Zolutukin <mzolotukhin@apple.com>
llvm-svn: 202963
2014-03-05 10:37:17 +00:00
David Majnemer f017ec360c MS ABI: Mangle lambdas
Use a scheme inspired by the Itanium ABI to properly implement the
mangling of lambdas.

N.B.  The incredibly astute observer will notice that we do not generate
external names that are identical, or even compatible with, MSVC.
This is fine because they don't generate names that they can use across
translation units.  Technically, we can generate any name we'd like so
long as that name wouldn't conflict with any other and would be stable
across translation units.

This fixes PR15512.

llvm-svn: 202962
2014-03-05 10:35:06 +00:00
Chandler Carruth 9106521056 [Layering] Move AutoUpgrade.h into the IR library where its
implementation already lives.

llvm-svn: 202961
2014-03-05 10:34:14 +00:00
Chandler Carruth 9205140772 [Layering] Move DebugLoc.h into the IR library. The implementation
already lived there and it is where it belongs -- this is the in-memory
debug location representation.

This is just cleanup -- Modules can actually cope with this, but that
doesn't make it right. After chatting with folks that have out-of-tree
stuff, going ahead and moving the rest of the headers seems preferable.

llvm-svn: 202960
2014-03-05 10:30:38 +00:00
Ahmed Charles fba066461f [C++11] Add overloads for externally used OwningPtr functions.
This will allow external callers of these functions to switch over time
rather than forcing a breaking change all a once. These particular
functions were determined by building clang/lld/lldb.

llvm-svn: 202959
2014-03-05 10:27:34 +00:00
Chandler Carruth 64e9aa5c93 [C++11] Make this interface accept const Use pointers and use override
to ensure we don't mess up any of the overrides. Necessary for cleaning
up the Value use iterators and enabling range-based traversing of use
lists.

llvm-svn: 202958
2014-03-05 10:21:48 +00:00
Ahmed Charles 96c9d95f51 [C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
2014-03-05 10:19:29 +00:00