Commit Graph

194663 Commits

Author SHA1 Message Date
Vasileios Kalintiris c9c7a3e4e5 InstrProf: Fix warnings for mixed declarations and code. NFC.
llvm-svn: 230494
2015-02-25 13:50:18 +00:00
Tamas Berghammer 765b5e5bfe Remove use_pthread option from getBuildFlags in the test environment
Removing the option to require the usage of pthread based on an argument
of the getBuildFlags method in lldbtest.py because it can be specified
by a variable in the makefile for the given test case. Using the
variable in the makefile works in all supported platforms.

Differential revision: http://reviews.llvm.org/D7861

llvm-svn: 230493
2015-02-25 13:26:28 +00:00
Tamas Berghammer 14f4476a88 Truncate target file for stdout and stderr
Add O_TRUNC when opening file for redirecting stdout and stderr of the
process. It is neccessary because if the file exists then on some
platform the original content is kept while it isn't overwritten by the
new data causing pollution of the saved stdout and stderr.

llvm-svn: 230492
2015-02-25 13:21:45 +00:00
Alexander Kornienko 6d02cc8d65 [clang-tidy] Correct spelling error in test file name. NFC.
Patch by Richard Thomson!
http://reviews.llvm.org/D7603

llvm-svn: 230491
2015-02-25 13:17:14 +00:00
Alexander Kornienko 8cef0752f5 [clang-tidy] Correct confusion between overwrite and override. NFC.
Patch by Richard Thomson!
http://reviews.llvm.org/D7604

llvm-svn: 230490
2015-02-25 13:05:33 +00:00
Aaron Ballman 5561ed448b Silencing a "result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)" warning in MSVC; NFC.
llvm-svn: 230489
2015-02-25 13:05:24 +00:00
Aaron Ballman 70c27ded97 Silencing a -Wsign-compare warning triggered in MSVC; NFC.
llvm-svn: 230488
2015-02-25 13:02:23 +00:00
Tamas Berghammer 37099e87cb Fix global makefiles for the tests to support android
Two changes are required to compile the tests for android
* Disable the usage of -lpthread as it is included by default on
  android
* Add -pie to the linker flags because android only support position
  independent executables

Differential revision: http://reviews.llvm.org/D7856

llvm-svn: 230487
2015-02-25 13:02:08 +00:00
Tamas Berghammer 6723ecb552 Add option to set environment variables from dotest.py
Setting environment variables are required when testing on a remote
target requiring different flags then the ones specified on the host OS.

Differential revision: http://reviews.llvm.org/D7854

llvm-svn: 230485
2015-02-25 12:22:40 +00:00
Marshall Clow a64f2fbc09 Add trailing return types (and noexcept specifications) to the 'diamond operators'. Fixes PR#22600.
llvm-svn: 230484
2015-02-25 12:20:52 +00:00
Gabor Horvath ca0bbff3a7 [clang-tidy] Fixed a false positive case in misc-inaccurate-erase checker.
llvm-svn: 230483
2015-02-25 12:17:03 +00:00
Vladimir Medic addb2daaac Replace obsolete -mattr=n64 command line option with -target-abi=n64. No functional changes.
llvm-svn: 230482
2015-02-25 11:43:01 +00:00
Ilia K 249420d099 Fix comment in test/tools/lldb-mi/main.cpp
llvm-svn: 230481
2015-02-25 11:04:40 +00:00
NAKAMURA Takumi 31574990a1 GlobalLayoutBuilder::addFragment(): Prune incorrect usage of \param(s). [-Wdocumentation]
llvm-svn: 230480
2015-02-25 11:04:36 +00:00
NAKAMURA Takumi b01d86b315 Fix UTF8 chars to ASCII.
llvm-svn: 230479
2015-02-25 11:02:00 +00:00
NAKAMURA Takumi 073f2b4795 Whitespace.
llvm-svn: 230478
2015-02-25 10:50:06 +00:00
NAKAMURA Takumi e218a40a40 Revert r230448, "Reland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple modules."", since I have reverted r230446.
llvm-svn: 230477
2015-02-25 10:49:59 +00:00
Pavel Labath 7257d28025 Skip symlinks to the original file when searching for debug info
Summary:
Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a
splitdebug configuration. It tries to skip over the original file in its search path, but it was
easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can
correctly compare symlinks.

As a side effect, I had to fix one test because the address for the "abort" function resolves on
my system to "__GI_abort" now. With the debug info, the libc on my system contains two symbols
associated with the address of the abort function, and lldb prefers __GI_abort, possibly because
the debug info is associated with it. It would be nice at some point to have it prefer the public
symbol name.

Reviewers: emaste, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7836

llvm-svn: 230476
2015-02-25 10:44:35 +00:00
NAKAMURA Takumi 472041f027 Whitespace.
llvm-svn: 230475
2015-02-25 10:32:20 +00:00
NAKAMURA Takumi a2acc360ed Revert r230446, "MS ABI: Try to respect external AST source record layouts"
It fails on Clang::PCH/headersearch.cpp for targeting msvc.

llvm-svn: 230474
2015-02-25 10:32:13 +00:00
Daniel Jasper 1c22048834 clang-format: Fix spacing for function with ref-qualification ..
.. when using SpacesInCStyleCastParentheses != SpacesInParentheses.

Before:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;

  Spaces.SpacesInParentheses = true;
  Deleted(const Deleted &)& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted( const Deleted & )& = default;

After:
  FormatStyle Spaces = getLLVMStyle();
  Deleted &operator=(const Deleted &)& = default;;

  Spaces.SpacesInParentheses= true;
  Deleted( const Deleted & )& = default;

  Spaces.SpacesInCStyleCastParentheses = true;
  Spaces.SpacesInParentheses= false;
  Deleted(const Deleted &)& = default;

Patch by Jean-Philippe Dufraigne. Thank you!

llvm-svn: 230473
2015-02-25 10:30:06 +00:00
Daniel Jasper cd94c40b10 Revert "Produce less broken basic block sequences for __finally blocks."
The test is broken on buildbots:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/2279/

This reverts commit adda738b6dc533c42db5f5f5b31344098a3aba7d.

llvm-svn: 230472
2015-02-25 10:07:14 +00:00
Elena Demikhovsky 56eadcf5ce AVX-512: Gather and Scatter patterns
Gather and scatter instructions additionally write to one of the source operands - mask register.
In this case Gather has 2 destination values - the loaded value and the mask.
Till now we did not support code gen pattern for gather - the instruction was generated from 
intrinsic only and machine node was hardcoded.
When we introduce the masked_gather node, we need to select instruction automatically,
in the standard way.
I added a flag "hasTwoExplicitDefs" that allows to handle 2 destination operands.

(Some code in the X86InstrFragmentsSIMD.td is commented out, just to split one big
patch in many small patches)

llvm-svn: 230471
2015-02-25 09:46:31 +00:00
Alexey Bataev 3eff5f46d7 [OPENMP] Rename methods of OpenMPRuntime class. NFC.
llvm-svn: 230470
2015-02-25 08:32:46 +00:00
Simon Atanasyan 3f02403b3a [Mips] Support mips-r6 path suffix for Adnroid MIPS toolchain
This path suffix is used if user provides the -mips32r6 command line
options.

llvm-svn: 230469
2015-02-25 07:31:12 +00:00
Ilia K 4dc4ed0a2a Add extra acceptable characters to CMICmdArgValFile (MI)
Summary:
Improve CMICmdArgValFile::IsValidChars to accept extra characters that can be in file name:
```
.'\"`@#$%^&*()_+-={}[]| 
```

Enable MiSyntaxTestCase.test_lldbmi_specialchars test.

All test pass on OS X.

Reviewers: abidh, emaste, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, zturner, emaste, clayborg, abidh

Differential Revision: http://reviews.llvm.org/D7859

llvm-svn: 230468
2015-02-25 06:34:05 +00:00
Ilia K a5de1433b7 Fix MiSignalTestCase.xxx_remote tests after r230466
llvm-svn: 230467
2015-02-25 06:29:48 +00:00
Ilia K 8e4f69ba54 Fix ImportError in lldb-mi tests on Linux
Summary:
This patch fixes the following error:
```
 File "/home/llvmbb/llvm-build-dir/lldb-x86_64-clang-ubuntu-14.04/llvm/tools/lldb/test/tools/lldb-mi/signal/TestMiSignal.py", line 5, in <module>
    import lldbmi_testcase
ImportError: No module named lldbmi_testcase
```

Reviewers: vharron, abidh, clayborg

Reviewed By: abidh, clayborg

Subscribers: lldb-commits, vharron, clayborg, abidh

Differential Revision: http://reviews.llvm.org/D7857

llvm-svn: 230466
2015-02-25 06:21:35 +00:00
Davide Italiano 9793956644 [ELF][X86_64] Handle R_X86_64_PC64 relocation
Differential Revision:	D7820
Reviewed by:	shankarke, ruiu

llvm-svn: 230465
2015-02-25 05:56:05 +00:00
Sameer Sahasrabuddhe a75db66eee Restores r228382, which was reverted in r228406.
The original commit failed to handle "shift assign" (<<=), which
broke the test mentioned in r228406. This is now fixed and the
test added to the lit tests under SemaOpenCL.

*** Original commit message from r228382 ***

OpenCL: handle shift operator with vector operands

Introduce a number of checks:
1. If LHS is a scalar, then RHS cannot be a vector.
2. Operands must be of integer type.
3. If both are vectors, then the number of elements must match.

Relax the requirement for "usual arithmetic conversions":
When LHS is a vector, a scalar RHS can simply be expanded into a
vector; OpenCL does not require that its rank be lower than the LHS.
For example, the following code is not an error even if the implicit
type of the constant literal is "int".

  char2 foo(char2 v) { return v << 1; }

Consolidate existing tests under CodeGenOpenCL, and add more tests
under SemaOpenCL.

llvm-svn: 230464
2015-02-25 05:48:23 +00:00
Ilia K e20ede26d2 Fix CommandLineCompletionTestCase.test_watchpoint_xxx tests after r230408
llvm-svn: 230463
2015-02-25 05:47:10 +00:00
Charles Davis 33d1dc0008 [IC] Turn non-null MD on pointer loads to range MD on integer loads.
Summary:
This change fixes the FIXME that you recently added when you committed
(a modified version of) my patch.  When `InstCombine` combines a load and
store of an pointer to those of an equivalently-sized integer, it currently
drops any `!nonnull` metadata that might be present.  This change replaces
`!nonnull` metadata with `!range !{ 1, -1 }` metadata instead.

Reviewers: chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7621

llvm-svn: 230462
2015-02-25 05:10:25 +00:00
Nico Weber d70bb8d8cb Revert 230419, 230425, 230432.
They don't build on Windows.
http://lab.llvm.org:8011/builders/sanitizer-windows/ went red for example.

llvm-svn: 230461
2015-02-25 04:39:21 +00:00
Nico Weber 795bd2d411 Produce less broken basic block sequences for __finally blocks.
The way cleanups (such as PerformSEHFinally) get emitted is that codegen
generates some initialization code, then calls the cleanup's Emit() with the
insertion point set to a good place, then the cleanup is supposed to emit its
stuff, and then codegen might tack in a jump or similar to where the insertion
point is after the cleanup.

The PerformSEHFinally cleanup tries to just stash away the block it's supposed
to codegen into, and then does codegen later, into that stashed block.  However,
after codegen'ing the __finally block, it used to set the insertion point to
the finally's continuation block (where the __finally cleanup goes when its body
is completed after regular, non-exceptional control flow).  That's not correct,
as that block can (and generally does) already ends in a jump.  Instead,
remember the insertion point that was current before the __finally got emitted,
and restore that.

Fixes two of the crashes in PR22553.

llvm-svn: 230460
2015-02-25 04:05:18 +00:00
Nico Weber ebf9a058c6 Add comments for two CleanupKinds.
llvm-svn: 230459
2015-02-25 03:58:36 +00:00
Peter Collingbourne 03054d489e docs: Document optimizations in control flow integrity design doc.
llvm-svn: 230458
2015-02-25 03:35:03 +00:00
Richard Smith 17ff680e42 Add some missing #includes and forward declarations found by modules build.
llvm-svn: 230457
2015-02-25 03:12:03 +00:00
Adrian Prantl b97f5c1eb2 Revert "Adapt clang-tools-extra to clang module format changes."
This reverts commit 230424.

llvm-svn: 230456
2015-02-25 02:46:37 +00:00
Adrian Prantl 2be16291ff Revert "Add a missing target requirement."
This reverts commit 230430.

llvm-svn: 230455
2015-02-25 02:46:29 +00:00
Adrian Prantl cbc368c5b5 Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
llvm-svn: 230454
2015-02-25 02:44:04 +00:00
Adrian Prantl 7153ce8a06 Revert "Add a missing target requirement."
llvm-svn: 230453
2015-02-25 02:43:38 +00:00
Saleem Abdulrasool 5285c12008 build: check if atomic routines are implicitly provided
It is possible for the atomic routines to be provided by the compiler without
requiring any additional libraries.  Check if that is the case before checking
for a library.

Patch by Matt Glazar!

llvm-svn: 230452
2015-02-25 02:38:03 +00:00
Jason Molenda 671a29d30d When FileSpec::Resolve is given a bare file like "ls",
and llvm::sys::fs::make_absolute prepends the current
working directory to that path, leave the original
bare file name unchanged if $cwd/ls doesn't exist.

http://reviews.llvm.org/D7477
<rdar://problem/18775190>

llvm-svn: 230451
2015-02-25 02:35:25 +00:00
Reid Kleckner b20cd673ff Fix bots failing on an explicit triple
Why do we need a registered target for this?

llvm-svn: 230450
2015-02-25 02:32:00 +00:00
Nico Weber fc3fe4f0a1 Don't crash on missing '{' after __except or __finally, PR22687.
Also add some general test/Parser coverage for SEH blocks.

llvm-svn: 230449
2015-02-25 02:22:06 +00:00
Reid Kleckner 64b04b9bdf Reland r230314 "Fix codegen for virtual methods that are (re-) exported from multiple modules."
This reverts the revert from commit r230406.

The changes in r230445 and r230446 make the test pass on Windows now.

llvm-svn: 230448
2015-02-25 02:19:56 +00:00
Reid Kleckner 7706f6a97b MS ABI: Add triple to test relying on key functions
llvm-svn: 230447
2015-02-25 02:16:15 +00:00
Reid Kleckner 3990db79c5 MS ABI: Try to respect external AST source record layouts
Covered by existing tests in test/CodeGen/override-layout.c and
test/CodeGenCXX/override-layout.cpp. Seriously, they found real bugs in
my code. :)

llvm-svn: 230446
2015-02-25 02:16:09 +00:00
Reid Kleckner 240ef5708e Add missing MD canonicalization to MS vtable builder
llvm-svn: 230445
2015-02-25 02:16:02 +00:00
Kostya Serebryany 63419712f8 [asan] one more attempt to fix windows build
llvm-svn: 230432
2015-02-25 02:00:26 +00:00