Commit Graph

175216 Commits

Author SHA1 Message Date
Nikola Smiljanic a9c452121a Fix line endings.
llvm-svn: 209727
2014-05-28 11:19:43 +00:00
NAKAMURA Takumi 753d70ce53 Let clang/test/CodeGen/pr19841.cpp tolerant of MS mangler.
llvm-svn: 209726
2014-05-28 10:53:06 +00:00
Daniel Jasper d39312ec84 clang-format: Don't break before a case's colon.
Before (with just the right line length:
  switch (a) {
  case some_namespace::some_constant
      :
    return;
  }

After:
  switch (a) {
  case some_namespace::
      some_constant:
    return;
  }

llvm-svn: 209725
2014-05-28 10:09:11 +00:00
Evgeniy Stepanov 0651b561a6 [asan] Fix android test setup.
llvm-svn: 209724
2014-05-28 09:58:58 +00:00
Nick Lewycky 9b46eb8112 Add 'nonnull' parameter or return attribute when producing an llvm pointer type in a function type where the C++ type is a reference. Update the tests.
llvm-svn: 209723
2014-05-28 09:56:42 +00:00
Timur Iskhodzhanov a09b70579a [ASan tests] Move one more test to POSIX-only directory
llvm-svn: 209722
2014-05-28 09:38:51 +00:00
Evgeniy Stepanov 386b58d056 [asancov] Don't emit extra runtime calls when compiling without coverage.
llvm-svn: 209721
2014-05-28 09:26:46 +00:00
Daniel Jasper 335ff26631 clang-format: Format array and dict literals similar to blocks.
Especially, reduce the amount of indentation if it doesn't increase
readability.

Before:
  NSMutableDictionary* dictionary = [NSMutableDictionary
      dictionaryWithDictionary:@{
                                 aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
                                 bbbbbbbbbbbbbbbbbb : bbbbb,
                                 cccccccccccccccc : ccccccccccccccc
                               }];

After:
  NSMutableDictionary* dictionary =
      [NSMutableDictionary dictionaryWithDictionary:@{
        aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
        bbbbbbbbbbbbbbbbbb : bbbbb,
        cccccccccccccccc : ccccccccccccccc
      }];

llvm-svn: 209720
2014-05-28 09:11:53 +00:00
Timur Iskhodzhanov 82ee0433da [ASan/Win] Use clang rather than clang-cl by default for lit tests. Make Windows-only tests explicitly use clang-cl.
Reviewed at http://reviews.llvm.org/D3893

llvm-svn: 209719
2014-05-28 08:38:13 +00:00
Evgeniy Stepanov d74bdccafe [asan] Add a dll thunk for __sanitizer_cov_module_init.
llvm-svn: 209718
2014-05-28 08:34:53 +00:00
Evgeniy Stepanov a00ff194b7 [asan] Add a few stubs to fix windows build.
llvm-svn: 209717
2014-05-28 08:26:24 +00:00
Alexey Bataev 18b92eeacb [OPENMP] Additional checking for local vars in initial values for threadprivate vars
llvm-svn: 209716
2014-05-28 07:40:25 +00:00
Tilmann Scheller 7c747fc7c6 [AArch64] Add store post-index update folding regression tests for the load/store optimizer.
Add regression tests for the following transformation:

  str X, [x20]
   ...
  add x20, x20, #32
   ->
  str X, [x20], #32

with X being either w0, x0, s0, d0 or q0.

llvm-svn: 209715
2014-05-28 06:43:00 +00:00
Alexey Bataev a55ed26abf [OPENMP] Reformatting of parsing code for OpenMP constructs.
llvm-svn: 209714
2014-05-28 06:15:33 +00:00
Alexey Bataev ed09d24078 [OPENMP][C++11] Formatting and make more C++11 compliant of OpenMP sema.
llvm-svn: 209713
2014-05-28 05:53:51 +00:00
Justin Bogner dc30fbf7b6 utils: Teach lldbDataFormatters to load automatically
Add an __lldb_init_module function so that importing the
lldbDataFormatters script automatically adds the formatters.

llvm-svn: 209712
2014-05-28 05:45:17 +00:00
Tilmann Scheller 35e451461f [AArch64] Add load post-index update folding regression tests for the load/store optimizer.
Add regression tests for the following transformation:

 ldr X, [x20]
  ...
 add x20, x20, #32
  ->
 ldr X, [x20], #32

 with X being either w0, x0, s0, d0 or q0.

llvm-svn: 209711
2014-05-28 05:44:14 +00:00
Tobias Grosser 704e4dee0f Fix formatting
llvm-svn: 209710
2014-05-28 04:34:58 +00:00
Simon Atanasyan 7b3dd1789c [Mips] Do not mix _gp and _gp_disp symbols in relocation handling.
No functional changes.

llvm-svn: 209709
2014-05-28 04:10:01 +00:00
Richard Trieu c771d5d79f Move the logic for testing for namespace std into one location. This check can
be performed by using Decl::isInStdNamespace or DeclContext::isStdNamespace

llvm-svn: 209708
2014-05-28 02:16:01 +00:00
Nick Kledzik cda69a279d [mach-o] Add support for parsing of weak-def symbols
llvm-svn: 209707
2014-05-28 02:04:45 +00:00
Hans Wennborg 275efb9e50 Don't dllimport/export destructor variants implemented by thunks.
MSVC doesn't export these functions, so trying to import them doesnt' work.
Also, don't let any dll attributes on the CXXDestructorDecl influence the
thunk's linkage -- they should always be linkonce_odr.

This takes care of the FIXME's for this in Nico's tests.

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

llvm-svn: 209706
2014-05-28 01:52:23 +00:00
Nick Kledzik 8399d69cb2 [mach-o] rename test case
llvm-svn: 209705
2014-05-28 01:31:04 +00:00
Nick Kledzik 388f3d02de [mach-o] Support parsing of non-lazy-pointer sections
llvm-svn: 209704
2014-05-28 01:16:35 +00:00
Greg Clayton 23377e9fe6 Remove unused variable.
llvm-svn: 209703
2014-05-28 00:23:43 +00:00
Greg Clayton 641c23f332 Allow classes to be intialized using current lldb::SB objects. This can help to import/export the current process state.
llvm-svn: 209702
2014-05-28 00:21:15 +00:00
Nick Kledzik a4a08d31cf [mach-o] Add support for initializers and terminators in object files
llvm-svn: 209700
2014-05-27 23:20:52 +00:00
Greg Fitzgerald 329912f54c [asan] use relative line numbers in tests
llvm-svn: 209699
2014-05-27 23:13:52 +00:00
Alexey Samsonov bb2990df58 Change representation of instruction ranges where variable is accessible.
Use more straightforward way to represent the set of instruction
ranges where the location of a user variable is defined - vector of pairs
of instructions (defining start/end of each range),
instead of a flattened vector of instructions where some instructions
are supposed to start the range, and the rest are supposed to "clobber" it.

Simplify the code which generates actual .debug_loc entries.

No functionality change.

llvm-svn: 209698
2014-05-27 23:09:50 +00:00
Alexey Samsonov 8a86d6da26 Factor out looking for prologue end into a function
llvm-svn: 209697
2014-05-27 22:47:41 +00:00
Sebastian Pop e0d9f5a41a delinearize does not return a remainder
llvm-svn: 209696
2014-05-27 22:42:11 +00:00
Sebastian Pop bc9009a20a pass element size to delinearization
Instead of relying on the delinearization to infer the size of an element,
compute the element size from the base address type. This is a much more precise
way of computing the element size than before, as we would have mixed together
the size of an element with the strides of the innermost dimension.

llvm-svn: 209695
2014-05-27 22:42:09 +00:00
Sebastian Pop f93ef12330 avoid type mismatch when building SCEVs
This is a corner case I have stumbled upon when dealing with ARM64 type
conversions. I was not able to extract a testcase for the community codebase to
fail on. The patch conservatively discards a division that would have ended up
in an ICE due to a type mismatch when building a multiply expression. I have
also added code to a place that builds add expressions and in which we should be
careful not to pass in operands of different types.

llvm-svn: 209694
2014-05-27 22:42:00 +00:00
Sebastian Pop e30bd351cc do not use the GCD to compute the delinearization strides
We do not need to compute the GCD anymore after we removed the constant
coefficients from the terms: the terms are now all parametric expressions and
there is no need to recognize constant terms that divide only a subset of the
terms. We only rely on the size of the terms, i.e., the number of operands in
the multiply expressions, to sort the terms and recognize the parametric
dimensions.

llvm-svn: 209693
2014-05-27 22:41:56 +00:00
Sebastian Pop 28e6b97b5d remove BasePointer before delinearizing
No functional change is intended: instead of relying on the delinearization to
come up with the base pointer as a remainder of the divisions in the
delinearization, we just compute it from the array access and use that value.
We substract the base pointer from the SCEV to be delinearized and that
simplifies the work of the delinearizer.

llvm-svn: 209692
2014-05-27 22:41:51 +00:00
Sebastian Pop a6e5860513 remove constant terms
The delinearization is needed only to remove the non linearity induced by
expressions involving multiplications of parameters and induction variables.
There is no problem in dealing with constant times parameters, or constant times
an induction variable.

For this reason, the current patch discards all constant terms and multipliers
before running the delinearization algorithm on the terms. The only thing
remaining in the term expressions are parameters and multiply expressions of
parameters: these simplified term expressions are passed to the array shape
recognizer that will not recognize constant dimensions anymore: these will be
recognized as different strides in parametric subscripts.

The only important special case of a constant dimension is the size of elements.
Instead of relying on the delinearization to infer the size of an element,
compute the element size from the base address type. This is a much more precise
way of computing the element size than before, as we would have mixed together
the size of an element with the strides of the innermost dimension.

llvm-svn: 209691
2014-05-27 22:41:45 +00:00
Alexey Samsonov f0e0cca0c7 Don't pre-populate the set of keys in the map with variable locations history.
Current implementation of calculateDbgValueHistory already creates the
keys in the expected order (user variables are listed in order of appearance),
and should do so later by contract.

No functionality change.

llvm-svn: 209690
2014-05-27 22:35:00 +00:00
Arnaud A. de Grandmaison de5ff26865 No need for those tests to go thru llvm-as and/or llvm-dis.
opt can handle them by itself.

llvm-svn: 209689
2014-05-27 22:03:28 +00:00
Arnaud A. de Grandmaison 6a90dc4f30 Factor out comparison of Instruction "special" states.
No functional change.

llvm-svn: 209688
2014-05-27 21:35:46 +00:00
Reid Kleckner bffbcc596f Wording fix for llvm.global_dtors docs.
llvm-svn: 209687
2014-05-27 21:35:17 +00:00
Alexander Kornienko 83a4e18f4c Retain isImplicit flag for local variable declarations when instantiating
templates.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

llvm-svn: 209686
2014-05-27 21:29:22 +00:00
Nick Kledzik 81e105e8d6 [mach-o] Add checks that string literals in object files are zero terminated
llvm-svn: 209685
2014-05-27 20:37:08 +00:00
Nick Kledzik 3e90e5f187 [mach-o] Add support for reading utf16 string literal sections
llvm-svn: 209684
2014-05-27 20:25:06 +00:00
David Blaikie 6900674aaf DebugInfo: partially revert cleanup committed in r209680
I'm not sure exactly where/how we end up with an abstract DbgVariable
with a null DIE, but we do... looking into it & will add a test and/or
fix when I figure it out.

Currently shows up in selfhost or compiler-rt builds.

llvm-svn: 209683
2014-05-27 20:20:43 +00:00
Ben Langmuir 6fa878d86d Add a test that we don't store stale modtime in modules
The change from r209195 turned out to be important to avoid saving stale
modification time/expected size information in a module file when there
are 3 or more modules in a dependency chain and the bottom one is
rebuilt. So add a test for that.

rdar://problem/17038180

llvm-svn: 209682
2014-05-27 19:57:48 +00:00
Nick Kledzik 181ce5ee03 Add make_dynamic_error_code().
This is a short-term fix to allow lld Readers to return error messages
with dynamic content.  

The long term fix will be to enhance ErrorOr<> to work with errors other
than error_code.  Or to change the interface to Readers to pass down a
diagnostics object through which all error messages are written.

llvm-svn: 209681
2014-05-27 19:35:41 +00:00
David Blaikie b85f0080e7 DebugInfo: Simplify solution to avoid DW_AT_artificial on inlined parameters.
Originally committed in r207717, I clearly didn't look very closely at
the code to understand how existing things were working...

llvm-svn: 209680
2014-05-27 19:34:32 +00:00
James Dennett 1575cb49cd Add range accessors for captures of a LambdaExpr.
Summary:
This adds LambdaExpr::captures(), LambdaExpr::explicit_captures()
and LambdaExpr::implicit_captures() as simple wrappers over the underlying
*_begin()/*_end() functions.

Reviewers: aaron.ballman

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

llvm-svn: 209679
2014-05-27 19:13:04 +00:00
Sasa Stankovic e41db2fe31 [mips] Optimize long branch for MIPS64 by removing %higher and %highest.
%higher and %highest can have non-zero values only for offsets greater
than 2GB, which is highly unlikely, if not impossible when compiling a
single function. This makes long branch for MIPS64 3 instructions smaller.

Differential Revision: http://llvm-reviews.chandlerc.com/D3281.diff

llvm-svn: 209678
2014-05-27 18:53:06 +00:00
David Blaikie 482097d098 DebugInfo: Create abstract function definitions even when concrete definitions preceed inline definitions.
After much puppetry, here's the major piece of the work to ensure that
even when a concrete definition preceeds all inline definitions, an
abstract definition is still created and referenced from both concrete
and inline definitions.

Variables are still broken in this case (see comment in
dbg-value-inlined-parameter.ll test case) and will be addressed in
follow up work.

llvm-svn: 209677
2014-05-27 18:37:55 +00:00