Commit Graph

239812 Commits

Author SHA1 Message Date
Filipe Cabecinhas 391438a08d Add header guards to asan_descriptions.h
llvm-svn: 279062
2016-08-18 13:22:00 +00:00
Alex Bradbury 3447ca3f08 (Trivial) TargetPassConfig: assert when TargetMachine has no MCAsmInfo
Summary:
This is a pretty trivial, but I thought it was worth just checking that nobody feels it's completely the wrong thing to be doing.

The motivation is that when starting a new backend, you often start with a minimal stub, pretty much just FooTargetMachine and FooTargetInfo. Once that's built, you might naturally try `llc -march=foo myinput.ll` and it seems more developer-friendly if this ends up asserting due to the lack of MCAsmInfo with an informative message rather than just segfaulting.

Reviewers: MatzeB, chandlerc

Subscribers: bogner, llvm-commits

Differential Revision: https://reviews.llvm.org/D23443

llvm-svn: 279061
2016-08-18 13:08:58 +00:00
George Rimar dbb76dbde3 [ELF] - Linkerscript: removed duplicate forward declarations, regrouped. NFC.
llvm-svn: 279060
2016-08-18 13:00:49 +00:00
George Rimar 43ec1c532e [ELF] - Inline defineSymbolVersion(). NFC.
llvm-svn: 279059
2016-08-18 12:53:57 +00:00
Ed Maste dec9808353 ELF: ignore -EB and -EL options
Differential Revision:	https://reviews.llvm.org/D23124

llvm-svn: 279058
2016-08-18 12:44:45 +00:00
Pavel Labath 27402d2a12 Move QSyncThreadState packet generation to the gdb-remote client
llvm-svn: 279057
2016-08-18 12:32:41 +00:00
Artem Dergachev 2fc1985db3 [analyzer] Teach CloneDetector to find clones that look like copy-paste errors.
The original clone checker tries to find copy-pasted code that is exactly
identical to the original code, up to minor details.

As an example, if the copy-pasted code has all references to variable 'a'
replaced with references to variable 'b', it is still considered to be
an exact clone.

The new check finds copy-pasted code in which exactly one variable seems
out of place compared to the original code, which likely indicates
a copy-paste error (a variable was forgotten to be renamed in one place).

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D23314

llvm-svn: 279056
2016-08-18 12:29:41 +00:00
Aaron Ballman 75de707d84 Correct the documentation for isSignedInteger() and isUnsignedInteger().
Patch by Visoiu Mistrih Francis

llvm-svn: 279055
2016-08-18 12:26:17 +00:00
Simon Pilgrim 916485c765 Remove trailing whitespace
llvm-svn: 279054
2016-08-18 11:22:22 +00:00
Diana Picus 9405ae704b Revert "ADT: Remove UB in ilist (and use a circular linked list)"
This reverts commit r278974 which broke some of our bots (e.g.
clang-cmake-aarch64-42vma, clang-cmake-aarch64-full).

llvm-svn: 279053
2016-08-18 11:17:53 +00:00
Diana Picus fa1a4b36f1 Revert "ADT: Tidy up ilist_traits static asserts, NFC"
This reverts commit r279012.
r278974 broke some bots, I have to revert this to get to it.

llvm-svn: 279052
2016-08-18 11:17:47 +00:00
Alexander Kornienko 93794b2351 [clang-tidy docs] Minor fix
llvm-svn: 279051
2016-08-18 11:12:03 +00:00
Alexander Kornienko 23768f4d03 [clang-tidy docs] Fix formatting.
llvm-svn: 279050
2016-08-18 11:10:52 +00:00
Alexander Kornienko 76eae751b5 [clang-tidy docs] Fix build errors on Sphinx 1.4.5
llvm-svn: 279049
2016-08-18 11:06:09 +00:00
Daniel Sanders 93c0f382b4 [mips][msan] Fix all the XPASSes following r278793 and r278795
All msan tests are now passing for mipsel and mips64el except for
allocator_mapping.cc which is marked unsupported.

llvm-svn: 279048
2016-08-18 10:50:46 +00:00
Tobias Grosser 1c18440958 [BlockGenerator] Invalidate SCEV values for instructions in scop
We already invalidated a couple of critical values earlier on, but we now
invalidate all instructions contained in a scop after the scop has been code
generated. This is necessary as later scops may otherwise obtain SCEV
expressions that reference values in the earlier scop that before dominated
the later scop, but which had been moved into the conditional branch and
consequently do not dominate the later scop any more. If these very values are
then used during code generation of the later scop, we generate used that are
dominated by the values they use.

This fixes: http://llvm.org/PR28984

llvm-svn: 279047
2016-08-18 10:45:57 +00:00
Filipe Cabecinhas e86f80c45e Convert AsanLocateAddress to Get*AddressInformation functions.
llvm-svn: 279046
2016-08-18 10:31:19 +00:00
Diana Picus 8b44bbc077 Revert "[OpenMP] Sema and parsing for 'teams distribute simd’ pragma"
This reverts commit r279003 as it breaks some of our buildbots (e.g.
clang-cmake-aarch64-quick, clang-x86_64-linux-selfhost-modules).

The error is in OpenMP/teams_distribute_simd_ast_print.cpp:
clang: /home/buildslave/buildslave/clang-cmake-aarch64-quick/llvm/include/llvm/ADT/DenseMap.h:527:
bool llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::LookupBucketFor(const LookupKeyT&, const BucketT*&) const
[with LookupKeyT = clang::Stmt*; DerivedT = llvm::DenseMap<clang::Stmt*, long unsigned int>;
      KeyT = clang::Stmt*; ValueT = long unsigned int;
      KeyInfoT = llvm::DenseMapInfo<clang::Stmt*>;
      BucketT = llvm::detail::DenseMapPair<clang::Stmt*, long unsigned int>]:
Assertion `!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) &&
"Empty/Tombstone value shouldn't be inserted into map!"' failed.

llvm-svn: 279045
2016-08-18 09:25:07 +00:00
Gabor Horvath 2402dd1e82 revert [analyzer] Added valist related checkers.
llvm-svn: 279043
2016-08-18 09:13:37 +00:00
Guy Blank 294cbbdb66 test commit
llvm-svn: 279042
2016-08-18 08:44:33 +00:00
Gabor Horvath 56e8aa535b [analyzer] Added valist related checkers.
Differential Revision: https://reviews.llvm.org/D15227

llvm-svn: 279041
2016-08-18 08:43:26 +00:00
Pavel Labath 4b6f9591d3 gdb-remote: Centralize thread specific packet handling
Summary:
Before this, each function had a copy of the code which handled appending of the thread suffix to
the packet (or using $Hg instead). I have moved that code into a single function and made
everyone else use that. The function takes the partial packet as a StreamString rvalue reference,
to avoid a copy and to remind the users that the packet will have undeterminate contents after
the call.

This also fixes the incorrect formatting of the QRestoreRegisterState packet in case thread
suffix is not supported.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D23604

llvm-svn: 279040
2016-08-18 08:30:03 +00:00
Pavel Labath c233995b1e Fix tests for the gdb-remote memory read packets
Part of TestGDBRemoteMemoryRead has been disabled since r259379 because it was incompatible with
python3. This changes the test to use the lldb-server test framework, which is a more appropriate
method of testing raw stub behaviour anyway (and should avoid the whole python 3 issue).

llvm-svn: 279039
2016-08-18 08:21:42 +00:00
Pavel Labath 9361c439e8 Fix parsing of complicated C++ names
Summary:
CPlusPlusLanguage::MethodName was not correctly parsing templated functions whose demangled name
included the return type -- the space before the function name was included in the "context" and
the context itself was not terminated correctly due to a misuse of the substr function (second
argument is length, not the end position). Fix that and add a regression test.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D23608

llvm-svn: 279038
2016-08-18 08:21:38 +00:00
Gabor Horvath 6ee4f905dc [analyzer] Small cleanups when checkers retrieving statements from exploded
nodes.

Differential Revision: https://reviews.llvm.org/D23550

llvm-svn: 279037
2016-08-18 07:54:50 +00:00
Eugene Leviant 3f675e38bd [ELF] Don't add input sections twice when linker script is used
llvm-svn: 279036
2016-08-18 07:27:37 +00:00
Vedant Kumar 7b6b1bd038 [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds
llvm/Config/config.h has intentionally been excluded from llvm
installations (see: llvm/CMakeLists.txt). Un-break out-of-tree builds
post-r278882 by switching to llvm-config.h, which is exported.

Suggested by Will Dietz!

llvm-svn: 279035
2016-08-18 06:43:07 +00:00
Richard Smith ceaf5ad041 Remove debugging aids from this test and fix its expectations.
llvm-svn: 279034
2016-08-18 06:15:19 +00:00
Petr Hosek 0df80bef96 [ELF] Linkerscript: support assignment outside SECTIONS
We only support assignments inside SECTIONS, but this does not match
the behavior of GNU linker which also allows them outside SECTIONS.
The only restriction on assignments outside SECTIONS is that they
cannot reference . (they have to be absolute expressions).

Differential Revision: https://reviews.llvm.org/D23598

llvm-svn: 279033
2016-08-18 04:34:27 +00:00
George Burgess IV c7c81fa197 [Docs] More MemorySSA doc updates!
Thanks again to Michael Kuperstein for the feedback.

llvm-svn: 279032
2016-08-18 02:56:05 +00:00
Matthias Braun c9130ea6a3 Testcase for r279022
llvm-svn: 279031
2016-08-18 02:21:54 +00:00
Kostya Serebryany 68f8cbd597 [asan] trying to fix the windows bot
llvm-svn: 279030
2016-08-18 02:04:03 +00:00
Lang Hames 75601bf71e Revert r279016 -- it breaks win32-elf JIT tests.
llvm-svn: 279029
2016-08-18 01:33:28 +00:00
Kostya Serebryany 070bcb0d68 [sanitizer-coverag] update the docs in __sanitizer_cov_trace_cmp
llvm-svn: 279028
2016-08-18 01:26:36 +00:00
Kostya Serebryany 524c3f32e7 [sanitizer-coverage/libFuzzer] instrument comparisons with __sanitizer_cov_trace_cmp[1248] instead of __sanitizer_cov_trace_cmp, don't pass the comparison type to save a bit performance. Use these new callbacks in libFuzzer
llvm-svn: 279027
2016-08-18 01:25:28 +00:00
Kostya Serebryany 385b973ad3 [sanitizer-coverage] add __sanitizer_cov_trace_cmp[1248] to the sanitizer-coverage interface
llvm-svn: 279026
2016-08-18 01:23:27 +00:00
Teresa Johnson f1844daac9 Fix bot failure due to new test
I had updated the output file name but not the corresponding nm based check
before submitting as r279023. This should fix the bot failures

llvm-svn: 279025
2016-08-18 01:18:15 +00:00
Richard Smith 3dba7ebde4 PR28438: Update the information on an identifier with local definitions before
trying to write out its macro graph, in case we imported a module that added
another module macro between the most recent local definition and the end of
the module.

llvm-svn: 279024
2016-08-18 01:16:55 +00:00
Teresa Johnson f2b5ec6ef4 [ThinLTO] Keep common symbols in ThinLTO modules
Summary:
Skip the merging of common symbols for ThinLTO modules, they will be
merged by the final native object link. Trying to merge the symbols and
add to a combined module will incorrectly enable the common symbol to be
internalized in the ThinLTO module. Additionally, we will not want to
create a combined module for ThinLTO distributed builds.

This fixes failures in 7 cpu2006 benchmarks from the new LTO API in
ThinLTO mode.

Reviewers: mehdi_amini

Subscribers: pcc, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23637

llvm-svn: 279023
2016-08-18 01:08:50 +00:00
Matthias Braun 6442fc1f6e TailDuplicator: Fix crash after r278974
Some inputs would after r278974 without this fix (see
http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console
for an example)

llvm-svn: 279022
2016-08-18 00:59:32 +00:00
Mehdi Amini 8ac7b32207 [LTO] Promote before performing weak resolution
Summary:
This was reversed compared to ThinLTOCodeGenerator for some reason,
and lead to an increased code-size on my tests. I figured that the
weak resolution may internalize a linkonce function, which will be
promoted immediately (and renamed), before being internalized again.

Reviewers: tejohnson

Subscribers: pcc, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23632

llvm-svn: 279021
2016-08-18 00:59:24 +00:00
Vitaly Buka d5ec14989d [asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Summary:
We are going to combine poisoning of red zones and scope poisoning.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23623

llvm-svn: 279020
2016-08-18 00:56:58 +00:00
Vitaly Buka 1396b9f072 [asan] Add __asan_set_shadow_*
Summary:
We are poisoning small allocas using store instruction from instrumented code.
For larger allocas we'd like to insert function calls instead of multiple stores.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D23616

llvm-svn: 279019
2016-08-18 00:56:11 +00:00
Lang Hames 1d39cb16ec [RuntimeDyld] Strip leading '_' from symbols on 32-bit windows in
RTDyldMemoryManager::getSymbolAddressInProcess()

This should allow JIT'd code for win32 to find in-process symbols. See
http://llvm.org/PR28699 .

Patch by James Holderness. Thanks James!

llvm-svn: 279016
2016-08-18 00:22:34 +00:00
Mehdi Amini eccffada33 [LTO] Change addSaveTemps API: do not add dot to the supplied prefix path
Summary:
It does not play well with directories (end up with a bunch of hidden
files).
Also, do not strip the 0 suffix for the first task, especially since
0 can be used by ThinLTO as well now.

Reviewers: tejohnson

Subscribers: mehdi_amini, pcc, llvm-commits

Differential Revision: https://reviews.llvm.org/D23612

llvm-svn: 279014
2016-08-18 00:12:33 +00:00
Petr Hosek 1fb2ecc903 [ELF] Allow specifying the stack size
This option can be used to specify the stack size of the
PT_GNU_STACK segment.

Differential Revision: https://reviews.llvm.org/D23538

llvm-svn: 279013
2016-08-17 23:59:58 +00:00
Duncan P. N. Exon Smith 56ee4f1fb7 ADT: Tidy up ilist_traits static asserts, NFC
Change the ilist traits to use decltype instead of sizeof, and add
HasObsoleteCustomization so that additions to this list don't need to be
added in two places.

I suspect this will now work with MSVC, since the trait tested in
r278991 seems to work.  If for some reason it continues to fail on
Windows I'll follow up by adding back the #ifndef _MSC_VER.

llvm-svn: 279012
2016-08-17 23:47:56 +00:00
Dominic Chen a8a638292c [WebAssembly] Handle debug information and virtual registers without crashing (reland r278967)
Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes.

Reviewers: jfb, aprantl, dschuff, echristo

Subscribers: llvm-commits, dschuff, jfb, MatzeB, dexonsmith, yurydelendik, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23635

llvm-svn: 279011
2016-08-17 23:42:27 +00:00
Vitaly Buka 334ac36e66 [asan] Remove "Stack partial redzone" from report
Summary: This value is never used.

Reviewers: kcc, eugenis

Subscribers: llvm-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D23631

llvm-svn: 279010
2016-08-17 23:38:08 +00:00
Eugene Zelenko cb93ba56ec [Release notes] Mention Emacs integration in Include-fixer.
llvm-svn: 279009
2016-08-17 23:36:22 +00:00