Commit Graph

156971 Commits

Author SHA1 Message Date
Alexander Kornienko 22479f7d99 Trying to fix tests with in-tree builds, that contain a .clang-format files in
both tools/clang and llvm directories.

llvm-svn: 189761
2013-09-02 14:25:56 +00:00
Evgeniy Stepanov bbca4903c4 [msan] Update MSanDR build instructions.
llvm-svn: 189760
2013-09-02 14:21:12 +00:00
Renato Golin 47aeab5cbe Fix gnueeabi typo in tests
llvm-svn: 189759
2013-09-02 14:11:33 +00:00
Alexander Kornienko 632abb9b21 Store first and last newline position in the token text for string literals and comments.
Summary:
Store first and last newline position in the token text for string literals and
comments to avoid doing .find('\n') for each possible solution.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D1556

llvm-svn: 189758
2013-09-02 13:58:14 +00:00
Alexander Kornienko 9acf3dbf1d Test for empty .clang-format file.
Summary: Test clang-format's handling of empty .clang-format files.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D1562

llvm-svn: 189757
2013-09-02 13:44:16 +00:00
Tilmann Scheller f49c80178e ARM: Default to Swift when compiling for iOS 6 or later.
Test cases adjusted accordingly.

This fixes rdar://14871821.

llvm-svn: 189756
2013-09-02 12:01:58 +00:00
NAKAMURA Takumi 0212272ce2 FileCheck-ize three tests of llvm/test/CodeGen/X86/h-register(s).
llvm-svn: 189755
2013-09-02 12:00:53 +00:00
NAKAMURA Takumi ecd4552059 llvm/test/CodeGen/X86: Update tests with -mattr=-bmi not to take BMI, corresponding to Craig's r189742.
AMD Piledriver builder detected failures.

llvm-svn: 189754
2013-09-02 12:00:46 +00:00
Sergey Matveev 69931c5841 [sanitizer_common] Add internal_clone().
Add a wrapper for the clone syscall for use in StopTheWorld. We
implement it only for x86_64, so stop building StopTheWorld for other platforms
(no one uses it outside x86_64 anyway).

See https://code.google.com/p/address-sanitizer/issues/detail?id=214 for why we
can't use the glibc clone() wrapper.

llvm-svn: 189753
2013-09-02 11:36:19 +00:00
Joerg Sonnenberger 2bbc79039d Recognize -Bshareable as alias for -shared.
llvm-svn: 189752
2013-09-02 09:34:35 +00:00
Joerg Sonnenberger 354a2f30d4 ReaderWriter depends on Passes.
llvm-svn: 189751
2013-09-02 09:33:06 +00:00
Evgeniy Stepanov e3eaa7bb35 [msan] Intercept memalign, valloc, pvalloc.
PR17039

llvm-svn: 189750
2013-09-02 09:24:53 +00:00
Daniel Jasper 42401c8d13 clang-format: Fix segfault in overloaded operator parsing.
Before, constructs like:
  using A::operator+;

caused a segfault. This fixes llvm.org/PR17050.

llvm-svn: 189749
2013-09-02 09:20:39 +00:00
Alexey Samsonov bbd5f46696 [ASan] Make blacklist test more robust
llvm-svn: 189748
2013-09-02 09:17:51 +00:00
Alexey Samsonov f9ab351b8a [CMake] Add -O1 in debug builds with LLVM_USE_SANITIZER
llvm-svn: 189747
2013-09-02 09:15:01 +00:00
Pavel Labath d527cf89e6 [analyzer] Add very limited support for temporary destructors
This is an improved version of r186498. It enables ExprEngine to reason about
temporary object destructors.  However, these destructor calls are never
inlined, since this feature is still broken. Still, this is sufficient to
properly handle noreturn temporary destructors.

Now, the analyzer correctly handles expressions like "a || A()", and executes the
destructor of "A" only on the paths where "a" evaluted to false.

Temporary destructor processing is still off by default and one has to
explicitly request it by setting cfg-temporary-dtors=true.

Reviewers: jordan_rose

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1259

llvm-svn: 189746
2013-09-02 09:09:15 +00:00
Alexey Samsonov d95129060c [CMake] Don't build sanitizer runtimes if LLVM_USE_SANITIZER is specified
llvm-svn: 189745
2013-09-02 08:57:23 +00:00
Alexey Samsonov 4b16885839 Improve collecting malloc stats in ASan
Summary:
This change makes races between updates of thread-local stats and
merging all the thread-local stats together less harmful.

Reviewers: kcc

Reviewed By: kcc

CC: dvyukov, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1572

llvm-svn: 189744
2013-09-02 08:39:07 +00:00
Daniel Jasper 7240762504 clang-format: Fix case-indentation in macros.
Before:
  #define OPERATION_CASE(name)           \
    case OP_name:                        \
    return operations::Operation##name

After:
  #define OPERATION_CASE(name)           \
    case OP_name:                        \
      return operations::Operation##name

llvm-svn: 189743
2013-09-02 08:26:29 +00:00
Craig Topper b25f0f5538 Create BEXTR instructions for (and ((sra or srl) x, imm), (2**size - 1)). Fixes PR17028.
llvm-svn: 189742
2013-09-02 07:53:17 +00:00
Chandler Carruth bc36e6e099 Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust
variable names appropriately.

Update the editor integration pieces that specify a '-style' option to
specify it as '-style=file'. I left the functionality in place because
even if the preferred method is to use '.clang-format' files, this way
if someone needs to clobber the style in their editor we show how to do
so in these examples.

Also check in a '.clang-format' file for Clang to ensure that separate
checkouts and builds of Clang from LLVM can still get the nice
formatting. =] This unfortunately required nuking the test for the
absence of a '.clang-format' file as now the directory happening to be
under your clang source tree will cause there to always be a file. ;]

llvm-svn: 189741
2013-09-02 07:42:02 +00:00
Elena Demikhovsky 402ee64f13 AVX-512: updated the list of high-latency instructions.
llvm-svn: 189740
2013-09-02 07:41:01 +00:00
Michael Gottesman b422ecc7de [cmake] Provide an option to not install the support headers so that the cmake build can match the make build if requested.
llvm-svn: 189739
2013-09-02 07:28:05 +00:00
Michael Gottesman 05c4b550c9 [cmake] Make libcxx standalone compile on Mac OS X.
llvm-svn: 189738
2013-09-02 07:28:03 +00:00
Chandler Carruth 06c50a5b9b Add a clang-format file so that the tool can automatically detect the
correct style for the LLVM tree as well as projects checked out under
projects and tools.

llvm-svn: 189737
2013-09-02 07:19:04 +00:00
Elena Demikhovsky 534015e550 AVX-512: gather-scatter tests; added foldable instructions;
Specify GATHER/SCATTER as heavy instructions.

llvm-svn: 189736
2013-09-02 07:12:29 +00:00
Elena Demikhovsky 843657c311 llvm interpreter: select, shuffle and insertelement instructions.
This patch implements vector support for  select instruction and adds specific vector instructions : shuffle and insertelement. (tests are also included)
and functions lle_X_memset, lle_X_memcpy added.

Done by Veselov, Yuri (mailto:Yuri.Veselov@intel.com)

llvm-svn: 189735
2013-09-02 06:40:09 +00:00
Chandler Carruth 14aae04029 Fix some rather confusing indentation and control flow in the errno
printing routine. This is made harder to see due to the surprising
formatting, inconsistent brace usage, and repeated conditions that all
test the same thing.

The only "consequence" of this bug is re-assigning 'str' to an empty
string when computing the error string for an error number of 0 in the
event of a non-GNU strerror_r routine. So, nothing to see here other
than cleanup. It did help me find PR17055 in clang-format though.

llvm-svn: 189734
2013-09-02 05:55:10 +00:00
Dmitri Gribenko 6e0520e9d9 Added std:: qualifier to find() invocation
Iterator of std::vector may be implemented as a raw pointer. In
this case ADL does not find the find() function in the std namespace.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev.

llvm-svn: 189733
2013-09-02 01:18:56 +00:00
Chandler Carruth baf3fdb86b Nuke the hilariously out of date suggestion to unpack llvm-gcc 4.2 as
part of getting started with LLVM.

The LLVM getting started document is in woeful need of attention. I may
get to some of this, but some random notes for folks interested:

1) We need to separate the getting started steps for folks who are
   interested in the core LLVM libs and nothing else, folks interested
   in a nifty C++ toolchain and nothing else, and folks interested in
   both.
2) We should include documentation for both release archives, svn, and
   git in equal portion, and we should document all of the various
   repositories of interest: llvm, clang, clang-tools-extra,
   compiler-rt, lld, libcxx, test-suite.
3) We should document the CMake build. We should probably document the
   CMake build first, and give a fall-back set of docs for the Makefile
   build for the use cases where that is still the preferred solution.
   This would more closely match the use cases that folks in the open
   source community are likely to have, and would remove a point of
   discrepancy between Linux, Windows, and Mac instructions.
4) Probably a ton of other modernization stuff that I've not thought of
   here.

Anyways, if anyone at all is interested, please help clean up this
document. It is much needed.

llvm-svn: 189732
2013-09-01 23:42:27 +00:00
Aaron Ballman 5e13985df8 Improving objc_ownership attribute test coverage.
llvm-svn: 189731
2013-09-01 19:11:23 +00:00
Chris Lattner 4fe2746c5f Revert r189704, which removed the guidance about not duplicating doc comments.
This is under active discussion.

llvm-svn: 189730
2013-09-01 15:48:08 +00:00
Elena Demikhovsky 4def4b088f AVX-512: Added GATHER and SCATTER instructions.
llvm-svn: 189729
2013-09-01 14:24:41 +00:00
Charles Davis 8bdfafd505 Move everything depending on Object/MachOFormat.h over to Support/MachO.h.
llvm-svn: 189728
2013-09-01 04:28:48 +00:00
Reed Kotler 5fdadcef7a Make sure we don't generate stubs for any of these functions because they
don't exist in libc. This is really not the right way to solve this problem;
but it's not clear to me at this time exactly what is the right way.
If we create stubs here, they will cause link errors because these functions
do not exist in libc.

llvm-svn: 189727
2013-09-01 04:12:59 +00:00
Benjamin Kramer bda73fff49 Mark an unreachable code path with llvm_unreachable. Pacifies GCC.
llvm-svn: 189726
2013-08-31 21:20:04 +00:00
Benjamin Kramer 59a7fc1796 Free PressureDiffs instead of leaking.
Found by valgrind.

llvm-svn: 189725
2013-08-31 20:10:01 +00:00
Benjamin Kramer 2702caad08 SimplifyLibCalls: When emitting an overloaded fp function check that it's available.
The existing code missed some edge cases when e.g. we're going to emit sqrtf but
only the availability of sqrt was checked. This happens on odd platforms like
windows.

llvm-svn: 189724
2013-08-31 18:19:35 +00:00
Howard Hinnant dda6f242fb Forgot to svn add the test for r189722.
llvm-svn: 189723
2013-08-31 17:03:02 +00:00
Howard Hinnant 69bc206547 SFINAE out duration converting constructor if the constructor would otherwise cause a ratio compile-time overflow. This fixes LWG 2094.
llvm-svn: 189722
2013-08-31 16:51:56 +00:00
Benjamin Kramer b5e6300be5 Clean out unused diagnostics.
llvm-svn: 189721
2013-08-31 14:37:34 +00:00
Shankar Easwaran df4f12bb65 [lld][test] organize test directory. No change in functionality
* Renames few tests which had extension objtxt to test
* created core directory that contains all the core tests

llvm-svn: 189720
2013-08-31 05:59:52 +00:00
Shankar Easwaran 2e4424b431 [lld][ELF] Add Init/Fini support
This creates .init_array/.fini_array section for X86_64 ELF
targets and executes init/fini functions specified by the
-init/-fini options respectively.

llvm-svn: 189719
2013-08-31 05:27:44 +00:00
Shankar Easwaran d26c8e3463 [lld][LinkingContext] Atoms created from command line options should be available in YAML
This adds an API to the LinkingContext for flavors to add Internal files
containing atoms that need to appear in the YAML output as well, when -emit-yaml
switch is used.

Flavors can add more internal files for other options that are needed.

llvm-svn: 189718
2013-08-31 05:27:38 +00:00
Andrew Trick 2c4f8b7ee8 Fix my previous checkin to updatePressureDiffs.
There was one case that we could hit a DebugValue where I didn't think
to check. DebugValues are evil. No checkinable test case, sorry. It's
an obvious fix.

llvm-svn: 189717
2013-08-31 05:17:58 +00:00
Richard Trieu ad00e83ae4 The diagnostic err_init_conversion_failed uses the enum
InitializedEntity::EntityKind as an index for one of its %select.  Over time,
EntityKind has been expanded, but the diagnostic text has not been updated.
This adds additional text to the %select to cover the new enum values.  A
comment has been added to the end of the enum regarding this situation.  This
fixes the crasher in PR17043.

llvm-svn: 189716
2013-08-31 03:50:47 +00:00
Bill Schmidt eb8d6f7da0 [PowerPC] Fast-isel cleanup patch.
Here are a few miscellaneous things to tidy up the PPC64 fast-isel
implementation.  I corrected a couple of commentary lapses, and added
documentation of future opportunities.  I also implemented
TargetMaterializeAlloca, which I somehow forgot when I split up the
original huge patch.

Finally, I decided to delete SelectCmp.  I hadn't previously hooked it
in to TargetSelectInstruction(), and when I did I realized it wasn't
serving any useful purpose.  This is only useful for compares that
don't feed a branch in the same block, and to handle that we would
have to have logic to interpret i1 as a condition register.  This
could probably be done, but would require Unseemly Hackery, and
honestly does not seem worth the hassle.

This ends the current patch series.

llvm-svn: 189715
2013-08-31 02:33:40 +00:00
Rui Ueyama 981892ab71 Fix build breakage
llvm-svn: 189714
2013-08-31 01:36:36 +00:00
Rui Ueyama e45f37d238 Remove #include, for we don't need the definitions of these classes.
llvm-svn: 189713
2013-08-31 01:28:45 +00:00
Aaron Ballman 4d236845e9 Possibly appeasing the build bots from r189711
llvm-svn: 189712
2013-08-31 01:22:55 +00:00