Commit Graph

175774 Commits

Author SHA1 Message Date
Samuel Benzaquen f56a29924f Add hasLocalStorage/hasGlobalStorage matchers.
Summary:
Add hasLocalStorage/hasGlobalStorage matchers for VarDecl nodes.
Update the doc. Also add them to the dynamic registry.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 210278
2014-06-05 18:22:14 +00:00
Renato Golin 0d2f580200 Fix bot for named register test
llvm-svn: 210275
2014-06-05 16:52:20 +00:00
Renato Golin 2e31e4e47b Add pointer types to global named register
This patch adds support for pointer types in global named registers variables.
It'll be lowered as a pair of read/write_register and inttoptr/ptrtoint calls.
Also adds some early checks on types on SemaDecl to avoid the assert.

Tests changed accordingly. (PR19837)

llvm-svn: 210274
2014-06-05 16:45:22 +00:00
Yaron Keren eadc9b3f88 Document how to select build configuration with Visual C++ IDE or command line.
llvm-svn: 210273
2014-06-05 16:42:26 +00:00
Todd Fiala f032399bc4 Added gdb-remote test for software breakpoints.
Tests $Z0 and $z0.  Extends test exe get-code-address-hex:
to take a function name.

Enabled for debugserver, disabled for llgs.  Implementing
in llgs branch next.

llvm-svn: 210272
2014-06-05 16:34:13 +00:00
Bill Schmidt 82f9e8a62e [PPC64LE] Temporarily disable VSX support in little-endian mode
This is a preliminary patch for the PowerPC64LE support.  In stage 1
of the vector support, we will support the VMX (Altivec) instruction
set, but will not yet support the VSX instructions.  This is merely a
staging issue to provide functional vector support as soon as
possible.

llvm-svn: 210271
2014-06-05 16:21:13 +00:00
Matheus Almeida b84b37d606 [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by GCC).
Summary: The Linux Kernel is one example of a piece of software that relies on them.

Reviewers: atanasyan

Reviewed By: atanasyan

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

llvm-svn: 210270
2014-06-05 14:59:18 +00:00
Samuel Benzaquen 93d68595a9 Fix equalsNode() to accept pointers to derived types.
Summary:
Move the 'const' in the AST_*MATCHER_P* macros to the right of ParamType to
avoiad applying the constness on the wrong level when ParamType is a pointer.
Change equalsNode() to explicitly accept 'const Decl*' or 'const Stmt*'.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

llvm-svn: 210269
2014-06-05 14:47:08 +00:00
Todd Fiala 7f02cff20d Remove unused defines from lldb driver.
See http://reviews.llvm.org/D3965 for details.

Change by Thiago Farina.

llvm-svn: 210268
2014-06-05 14:46:04 +00:00
Evgeniy Stepanov 38c228a842 [asancov] Faster coverage in memory-mapped mode.
Use caller pc of __sanitizer_cov_module_init to figure out
when 2 sequential calls are from the same module; skip
.sancov.map file update in this case.

llvm-svn: 210267
2014-06-05 14:38:53 +00:00
Evgeniy Stepanov 493df136d9 [asancov] Fix coverage line info some more.
Now it should always point to the opening brace of the function (in
-asan-coverage=1 mode).

llvm-svn: 210266
2014-06-05 14:34:45 +00:00
Evgeniy Stepanov bec9dedf78 Add missing const specifier to a const method.
llvm-svn: 210265
2014-06-05 14:32:15 +00:00
Ulrich Weigand 53e8cd3dea XFAIL: test/DebugInfo/missing-abstract-variable.ll on s390x as well
llvm-svn: 210264
2014-06-05 14:20:54 +00:00
Ulrich Weigand 2c356f3a7a [SystemZ] Do not install IfConverter pass at -O0
When not optimizing, do not run the IfConverter pass, this makes
debugging more difficult (and causes a testsuite failure in
DebugInfo/unconditional-branch.ll).

llvm-svn: 210263
2014-06-05 14:20:10 +00:00
Sasa Stankovic 6781426130 [mips] Modify long branch for NaCl:
* Move the instruction that changes sp outside of the branch delay slot.
  * Bundle-align the target of indirect branch.

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

llvm-svn: 210262
2014-06-05 13:52:08 +00:00
Sasa Stankovic 56c12e679a Prevent hoisting the instruction whose def might be clobbered by the terminator.
llvm-svn: 210261
2014-06-05 13:42:48 +00:00
Alexander Kornienko a46952221e Allow per-file clang-tidy options.
Summary:
This patch makes it possible for clang-tidy clients to provide
different options for different translation units. The option, which doesn't
make sense to be file-dependent, was moved to a separate ClangTidyGlobalOptions
struct. Added parsing of ClangTidyOptions.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

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

llvm-svn: 210260
2014-06-05 13:31:45 +00:00
Evgeniy Stepanov 57eba53a01 [asan] asan_device_setup: extend search path
In standalone build asan-rt is stored in yet another path.

llvm-svn: 210259
2014-06-05 12:49:35 +00:00
Simon Atanasyan 8065fb761e [Mips] Make dynlib-dynsym.test self contained.
llvm-svn: 210258
2014-06-05 12:39:12 +00:00
Evgeniy Stepanov 474e70aeb7 [asan] Add 'asan' to asan test deps.
This sound like a good idea in general.
Also, without this on Android we get add_lit_testsuite() with empty DEPENDS
list, and it does not work well.

llvm-svn: 210257
2014-06-05 12:31:22 +00:00
Evgeniy Stepanov 785108b0fc [asan] Fix lit tests setup on Android.
Pass cflags in a way that's compatible with standalone compiler-rt build.

llvm-svn: 210256
2014-06-05 12:29:47 +00:00
Evgeniy Stepanov 3641cd43b2 [asan] Use -pthread instead of -lpthread in tests.
llvm-svn: 210255
2014-06-05 12:22:37 +00:00
Matheus Almeida 39796a2ec5 [mips] Fix triple.
Mips2 is a 32-bit architecture.

llvm-svn: 210254
2014-06-05 12:07:14 +00:00
Evgeniy Stepanov dad9206564 Fix driver warning about -pthread on Android.
-pthread is no-op on Android. Suppress the unused argument warning.

llvm-svn: 210253
2014-06-05 11:41:39 +00:00
Evgeniy Stepanov 6f0ae18a59 Fix driver warning about -shared-libasan on Android.
Asan runtime library is always shared on Android, and -shared-libasan is no-op.
Suppress the unused argument warning.

llvm-svn: 210252
2014-06-05 11:14:00 +00:00
Robert Lytton 6adb20f720 XCore target: Fix 'typestring' binding qualifier to the array and not the type
Differential Revision: http://reviews.llvm.org/D3949

llvm-svn: 210250
2014-06-05 09:06:21 +00:00
Iain Sandoe 5248f9f0a5 lld (build with configur and make) Enable build
r210177 added Makefiles to the lld project. 
This revision enables the automatic build of lld when the sources are found in tools/lld.

llvm-svn: 210245
2014-06-05 08:49:55 +00:00
Matt Arsenault 3e332a4862 R600: Fix test. Using wrong check prefix.
llvm-svn: 210244
2014-06-05 08:00:36 +00:00
Rui Ueyama 0291dd2c8a Revert "[PECOFF] Support COMDAT associative sections."
This reverts accidental commit r210240.

llvm-svn: 210243
2014-06-05 07:40:59 +00:00
Rui Ueyama 733b45f3b0 Add SymbolTable::isCoalescedAway
isCoalescedAway(x) is faster than replacement(x) != x as the former
does not follow the replacement atom chain. Also it's easier to use.

llvm-svn: 210242
2014-06-05 07:37:29 +00:00
Rui Ueyama 52edc49031 Print error message in LinkOnce handler.
Rather than outside of the handler function to make the code simple.

llvm-svn: 210241
2014-06-05 07:37:25 +00:00
Rui Ueyama f3cb9d1d57 [PECOFF] Support COMDAT associative sections.
COFF supports a feature similar to ELF's section groups. This
patch implements it.

In ELF, section groups are identified by their names, and they are
treated somewhat differently from regular symbols. In COFF, the
feature is realized in a more straightforward way. A section can
have an annotation saying "if Nth section is linked, link this
section too."

Implementing such feature is easy. We can add a reference from a
target atom to an original atom, so that if the target is linked,
the original atom is also linked. If not linked, both will be
dead-stripped. So they are treated as a group.

I added a new reference type, kindAssociate. It does nothing except
preventing referenced atoms from being dead-stripped.

No change to the Resolver is needed.

Reviewers: Bigcheese, shankarke, atanasyan

Subscribers: llvm-commits

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

llvm-svn: 210240
2014-06-05 07:37:20 +00:00
Nick Lewycky ff114dae5a Fix coverage for files with global constructors again. Adds a testcase to the commit from r206671, as requested by David Blaikie.
llvm-svn: 210239
2014-06-05 04:31:43 +00:00
Puyan Lotfi 54741fe603 Changing this line of code back to the way it was before Alp's config.h clean up changes.
I've already spoken to Alp and he signed off on making this one change, so that our buildbots
go green in the short term.

llvm-svn: 210238
2014-06-05 04:29:21 +00:00
David Blaikie 72c3aa39b7 Revert r210221 again, due to a crash Richard Smith has provided involving self-hosting LLVM with libc++.
Test case coming, once I reduce it.

llvm-svn: 210236
2014-06-05 02:04:59 +00:00
Dan Albert f4239c7707 Remove's uses of sys/timeb.h for Android.
Android is removing sys/timeb.h because it was removed in POSIX 2008.

llvm-svn: 210235
2014-06-05 02:00:24 +00:00
David Blaikie 367fb01d70 DebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than looking it up through the DebugLoc.
No functional change intended, just streamlines the abstract variable
lookup/construction to use a common entry point.

llvm-svn: 210234
2014-06-05 01:30:50 +00:00
David Blaikie 087e7203a9 DebugInfo: Roll argument insertion into variable insertion to ensure arguments are correctly handled in all cases.
No functional change intended.

llvm-svn: 210233
2014-06-05 01:04:20 +00:00
Alexey Samsonov 1c9a921a04 [Deadlock detector] Fix CMake build rules for shared runtime
llvm-svn: 210232
2014-06-05 00:58:28 +00:00
David Blaikie bb6a4e2fea PR19388: DebugInfo: Emit dead arguments in their originally declared order.
Unused arguments were not being added to the argument list, but instead
treated as arbitrary scope variables. This meant they weren't carefully
added in the original argument order.

In this particular example, though, it turns out the argument is only
/mostly/ unused (well, actually it's entirely used, but in a specific
way). It's a struct that, due to ABI reasons, is decomposed into chunks
(exactly one chunk, since it has one member) and then passed. Since only
one of those chunks is used (SROA, etc, kill the original reconstitution
code) we don't have a location to describe the whole variable.

In this particular case, since the struct consists of just the one int,
once we have partial location information, this should have a location
that describes the entire variable (since the piece is the entirety of
the object).

And at some point we'll need to describe the location of even /entirely/
unused arguments so that they can at least be printed on function entry.

llvm-svn: 210231
2014-06-05 00:51:35 +00:00
Richard Smith 599bed75ed Bugfix: don't assert if someone manages to declare an operator new/delete template before the builtin operator new/delete.
llvm-svn: 210230
2014-06-05 00:43:02 +00:00
Alexey Samsonov ad81f0f419 Use AArch64 instead of now removed ARM64 in test configs
llvm-svn: 210229
2014-06-05 00:25:30 +00:00
David Blaikie 6cfa9e1a6d DebugInfo: Add comments/assert description to r209674 based on Eric Christopher's post-commit review feedback.
llvm-svn: 210228
2014-06-05 00:25:26 +00:00
Eric Christopher 21a5e5c1c7 We've got a getSlotSize call already that we use everywhere else,
use it here too.

llvm-svn: 210227
2014-06-05 00:22:13 +00:00
Matt Arsenault 151304691c R600/SI: Match rsq instructions
llvm-svn: 210226
2014-06-05 00:15:55 +00:00
Reid Kleckner e931c06b21 Flush C stdio streams upon process termination
Due to what can only be described as a CRT bug, stdout and amazingly
even stderr are not always flushed upon process termination, especially
when the system is under high threading pressure.  I have found two
repros for this:

1) In lib\Support\Threading.cpp, change sys::Mutex to an
std::recursive_mutex and run check-clang.  Usually between 30 and 40
tests will fail.

2) Add OutputDebugStrings in code that runs during static initialization
and static shutdown.  This will sometimes generate similar failures.

After a substantial amount of troubleshooting and debugging, I found
that I could reproduce this from the command line without running
check-clang.  Simply make the mutex change described in #1, then
manually run the following command many times by running it once, then
pressing Up -> Enter very quickly:

D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1      -Xclang -error-on-deserialized-decl=TopVar    | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1

Sporadically they will fail, and attaching a debugger to a failed
instance indicates that stdin of FileCheck.exe is empty.

Note that due to the repro in #2, we can rule out a bug in the STL's
mutex implementation, and instead conclude that this is a real flake in
the windows test harness.

Test Plan:
Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run.
With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs.

Reviewers: rnk

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

Patch by Zachary Turner!

llvm-svn: 210225
2014-06-05 00:13:43 +00:00
Eric Christopher 52fa6599e8 80-columns.
llvm-svn: 210224
2014-06-05 00:09:08 +00:00
Eric Christopher 11b05cccfa Remove uses of the TargetMachine from X86FrameLowering.
llvm-svn: 210223
2014-06-05 00:09:05 +00:00
Matt Arsenault c6f338dd5e Use nullptr
llvm-svn: 210222
2014-06-05 00:01:12 +00:00
David Blaikie 36408e7569 DebugInfo: Reapply r209984 (reverted in r210143), asserting that abstract DbgVariables have DIEs.
Abstract variables within abstract scopes that are entirely optimized
away in their first inlining are omitted because their scope is not
present so the variable is never created. Instead, we should ensure the
scope is created so the variable can be added, even if it's been
optimized away in its first inlining.

This fixes the incorrect debug info in missing-abstract-variable.ll
(added in r210143) and passes an asserts self-hosting build, so
hopefully there's not more of these issues left behind... *fingers
crossed*.

llvm-svn: 210221
2014-06-04 23:50:52 +00:00