Roman Divacky [Thu, 18 Dec 2014 23:12:34 +0000 (23:12 +0000)]
Instead of explicitely comparing both lowercase and uppercase variants.
.lower() the Name and compare only the lowecase. Removing 81 compares/lines of
code. This changes the accepted string to be mixed lower/upper case but it
should be ok.
Discussed with Jim Grosbach.
llvm-svn: 224547
Reid Kleckner [Thu, 18 Dec 2014 23:07:04 +0000 (23:07 +0000)]
Revert "Change -save-temps to emit unoptimized bitcode files."
This reverts commit r224503.
It broke compilation of fortran through the Clang driver. Previously
`clang -c t.f` would invoke `gcc t.f` and `clang -cc1as`, but now it
tries to call `clang -cc1 t.f` which fails for obvious reasons.
llvm-svn: 224546
Alexey Samsonov [Thu, 18 Dec 2014 21:40:39 +0000 (21:40 +0000)]
[CMake] Add check-asan-dynamic command to external compiler-rt setup.
llvm-svn: 224545
Jean-Daniel Dupas [Thu, 18 Dec 2014 21:33:38 +0000 (21:33 +0000)]
[macho] -rpath support
Summary:
Work on adding -rpath support to the mach-o linker.
This patch is based on the ld64 behavior for the command line option validation.
It includes a basic test to check that the LC_RPATH load commands are properly generated when that option is used.
It also add LC_RPATH support to the binary reader, but I don't know how to test it though.
Reviewers: kledzik
Subscribers: llvm-commits
Projects: #lld
Differential Revision: http://reviews.llvm.org/D6724
llvm-svn: 224544
Zachary Turner [Thu, 18 Dec 2014 21:25:53 +0000 (21:25 +0000)]
Always use python-based SWIG generation script for CMake.
As a first step in addressing Bug #21921 this patch prefers
the python-based SWIG generation by default rather than the
shell-based SWIG generation any time python is enabled
(e.g. LLDB_DISABLE_PYTHON is 0).
Additionally, this patch changes the default value of
LLDB_DISABLE_PYTHON from 1 to 0 on Windows.
Anyone not using the CMake build is unaffected by this patch.
llvm-svn: 224543
Sanjay Patel [Thu, 18 Dec 2014 21:11:09 +0000 (21:11 +0000)]
fix formatting; NFC
llvm-svn: 224542
Chris Bieneman [Thu, 18 Dec 2014 21:03:49 +0000 (21:03 +0000)]
Have llvm-c-test only use libLLVM if libLLVM has all the right components.
Summary: We should only have llvm-c-test use libLLVM if the library is built with the default set of components or if LLVM_DYLIB_COMPONENTS includes all the LLVM_LINK_COMPONENTS required for llvm-c-test. Making libLLVM always used causes build failures if libLLVM doesn't include all
Reviewers: chapuni, ributzka
Reviewed By: ributzka
Subscribers: ributzka, llvm-commits
Differential Revision: http://reviews.llvm.org/D6668
llvm-svn: 224541
Stephane Sezer [Thu, 18 Dec 2014 20:24:32 +0000 (20:24 +0000)]
Display local kernel version only when non-remote in PlatformLinux.
Summary:
This is part of the Linux remote platform work. Displaying the local
kernel information when remote debugging doesn't make sense, so we
should verify if we are in host mode before doing so.
Test Plan:
Connect to a remote linux platform mode daemon with `platform select
remote-linux` followed by `platform connect ...`, and look at the output
of `platform status`.
Reviewers: tfiala, clayborg, vharron, compnerd
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D5928
llvm-svn: 224540
Colin LeMahieu [Thu, 18 Dec 2014 20:15:32 +0000 (20:15 +0000)]
[NFC] Removing extra semicolon.
llvm-svn: 224539
Matthias Braun [Thu, 18 Dec 2014 19:58:52 +0000 (19:58 +0000)]
LiveIntervalAnalysis: Cleanup computeDeadValues
- This also fixes a bug introduced in r223880 where values were not
correctly marked as Dead anymore.
- Cleanup computeDeadValues(): split up SubRange code variant, simplify
arguments.
llvm-svn: 224538
Enrico Granata [Thu, 18 Dec 2014 19:43:29 +0000 (19:43 +0000)]
We don't really handle printing embedded NULs in strings, but if we were to, we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings...
llvm-svn: 224537
Fariborz Jahanian [Thu, 18 Dec 2014 19:41:11 +0000 (19:41 +0000)]
Objective-C. Provide group name for warning
on multiple selector names found during lookup.
rdar://
19265296
llvm-svn: 224536
Ulrich Weigand [Thu, 18 Dec 2014 19:27:50 +0000 (19:27 +0000)]
Add myself as SystemZ code owner
As agreed with Richard Sandiford, I'm taking over code ownership
for the SystemZ back end from him.
llvm-svn: 224535
Kevin Enderby [Thu, 18 Dec 2014 19:24:35 +0000 (19:24 +0000)]
Add printing the LC_SUB_FRAMEWORK load command with llvm-objdump’s -private-headers.
llvm-svn: 224534
Hans Wennborg [Thu, 18 Dec 2014 19:19:00 +0000 (19:19 +0000)]
ModuleBuilder: assert that all deferred inline method defs get handled
While we're here, also move the declaration of DeferredInlineMethodDefinitions
closer to the other member vars and make it a SmallVector. NFC.
llvm-svn: 224533
Dmitry Vyukov [Thu, 18 Dec 2014 18:40:52 +0000 (18:40 +0000)]
tsan: add an additional test for signal handlers
the test passes now, but signal handling during thread creation
and shutdown is tricky
llvm-svn: 224532
Dmitry Vyukov [Thu, 18 Dec 2014 18:39:55 +0000 (18:39 +0000)]
tsan: disable __tls_get_addr interceptor
see the added comments for details, it's messy
llvm-svn: 224531
Dmitry Vyukov [Thu, 18 Dec 2014 18:31:47 +0000 (18:31 +0000)]
tsan: fix data races between signal handler and sigaction
signal handler reads sa_sigaction when a concurrent sigaction call can modify it
as the result in could try to call SIG_DFL or a partially overwritten function pointer
llvm-svn: 224530
Filipe Cabecinhas [Thu, 18 Dec 2014 18:25:18 +0000 (18:25 +0000)]
Fix suppressions file usage
Summary:
Always quote suppressions files given to *_OPTIONS.
This will make it not break when given full Windows paths (otherwise,
parsing would stop after the drive's letter + ':').
Also fix one or two cases where the suppression files' extensions were
not *.supp.
Reviewers: samsonov, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6680
llvm-svn: 224529
Zachary Turner [Thu, 18 Dec 2014 18:21:33 +0000 (18:21 +0000)]
Only compile RegisterContextWindows_x86.cpp for x86 host architecture.
This fixes compilation failures in the 64-bit build of LLDB on Windows.
Patch by Aidan Dodds
Differential Revision: http://reviews.llvm.org/D6704
llvm-svn: 224528
Juergen Ributzka [Thu, 18 Dec 2014 18:19:47 +0000 (18:19 +0000)]
Add missing implementation of 'sys::path::is_other' to the support library.
The header claims that this function exists, but the linker wasn't too happy
about it not being in the library.
llvm-svn: 224527
Reid Kleckner [Thu, 18 Dec 2014 18:17:42 +0000 (18:17 +0000)]
Revert "Don't build invalid AST nodes during recovery"
This reverts commit r224451. It caused us to reject some valid existing
code.
This code appears to run in non-error cases as well as error cases. If
the scope of a DependentScopeDeclRefExpr is still incomplete it probably
means we still have more instantiation to do.
llvm-svn: 224526
Fariborz Jahanian [Thu, 18 Dec 2014 17:13:56 +0000 (17:13 +0000)]
[Objective-C]. Patch to unify code generation for ObjCMsgSend and ObjCBoxedExpr.
Patch by Alex Denisov. NFC.
llvm-svn: 224525
Jozef Kolek [Thu, 18 Dec 2014 16:39:29 +0000 (16:39 +0000)]
[mips][microMIPS] Fix bugs related to atomic SC/LL instructions
Fix bugs related to atomic microMIPS SC/LL instructions: While expanding atomic
operations the mips32r2 encoding was emitted instead of microMIPS.
Differential Revision: http://reviews.llvm.org/D6659
llvm-svn: 224524
Richard Barton [Thu, 18 Dec 2014 16:31:18 +0000 (16:31 +0000)]
Correction to -mfu=neon-vfpv4 to pass the correct backend feature name
Change-Id: I4dbfe1d97670fc4e626368ef1f91fc008778dfca
llvm-svn: 224523
Jay Foad [Thu, 18 Dec 2014 16:24:01 +0000 (16:24 +0000)]
[Sanitizer] Fix GetRSS on Linux with non-4k pages
Summary:
The numbers in /proc/self/statm are in pages, not in fixed 4k units.
This fixes Linux/hard_rss_limit_mb_test.cc on my PowerPC64 box which
has 64k pages.
Reviewers: kcc, willschm
Reviewed By: willschm
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6717
llvm-svn: 224522
Saleem Abdulrasool [Thu, 18 Dec 2014 16:16:53 +0000 (16:16 +0000)]
ARM: fix an off-by-one in the register list access
Fix an off-by-one access introduced in 224502 for push.w and pop.w with single
register operands. Add test cases for both scenarios.
Thanks to Asiri Rathnayake for pointing out the failure!
llvm-svn: 224521
Dmitry Vyukov [Thu, 18 Dec 2014 14:05:34 +0000 (14:05 +0000)]
tsan: fix deadlock reporting
currently deadlock detector reports effectively random stacks in report after flush
because it looks at old edges with wrong stacks
llvm-svn: 224519
Dmitry Vyukov [Thu, 18 Dec 2014 14:02:28 +0000 (14:02 +0000)]
tsan: fix failing CHECK In deadlock detector
and re-enable the test
llvm-svn: 224518
Toma Tabacu [Thu, 18 Dec 2014 13:03:51 +0000 (13:03 +0000)]
[mips] Clean up the CodeGen/Mips/inlineasmmemop.ll test. NFC.
Summary:
Improve comments and remove a redundant attribute list.
There are no functional changes (to the CHECK's or to the code).
Part of these changes were suggested in http://reviews.llvm.org/D6637.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6705
llvm-svn: 224517
Robert Khasanov [Thu, 18 Dec 2014 12:28:22 +0000 (12:28 +0000)]
[AVX512] Enable FP arithmetic lowering for AVX512VL subsets.
Added RegOp2MemOpTable4 to transform 4th operand from register to memory in merge-masked versions of instructions.
Added lowering tests.
llvm-svn: 224516
Yaron Keren [Thu, 18 Dec 2014 12:13:14 +0000 (12:13 +0000)]
Enabling this test again on mingw. The problem seems to happen when
two identical module.modulemap are available on the include path and
so should be fixed in the mingw driver include dies, when we'll have it.
llvm-svn: 224515
Viktor Kutuzov [Thu, 18 Dec 2014 12:12:59 +0000 (12:12 +0000)]
[Msan] Generalize instrumentation code to support FreeBSD mapping
Differential Revision: http://reviews.llvm.org/D6666
llvm-svn: 224514
Daniel Jasper [Thu, 18 Dec 2014 12:11:01 +0000 (12:11 +0000)]
clang-format: Fix incorrect detection of ObjC "in" keyword.
Before:
for (auto v : in [1]) { ..
After:
for (auto v : in[1]) { ..
llvm-svn: 224513
Serge Pavlov [Thu, 18 Dec 2014 11:14:21 +0000 (11:14 +0000)]
Fixed warnings on redefine keywords and reserved ids.
Repared support for warnings -Wkeyword-macro and -Wreserved-id-macro.
The warning -Wkeyword-macro now is not issued in patterns that are used
in configuration scripts:
#define inline
also for 'const', 'extern' and 'static'. If macro repalcement is identical
to macro name, the warning also is not issued:
#define volatile volatile
And finally if macro replacement is also a keyword identical to the replaced
one but decorated with leading/trailing underscores:
#define inline __inline
#define inline __inline__
#define inline _inline // in MSVC compatibility mode
Warning -Wreserved-id-macro is off by default, it could help catching
things like:
#undef __cplusplus
llvm-svn: 224512
Dmitry Vyukov [Thu, 18 Dec 2014 10:55:41 +0000 (10:55 +0000)]
tsan: disable the test even harder
currently it fails in cmake build with weird errors:
/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__clang_call_terminate':
/ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x12): undefined reference to `__cxa_begin_catch'
/ssd/src/llvm/projects/compiler-rt/test/tsan/real_deadlock_detector_stress_test.cc:(.text.__clang_call_terminate[__clang_call_terminate]+0x17): undefined reference to `std::terminate()'
/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `std::vector<int, std::allocator<int> >::_M_check_len(unsigned long, char const*) const':
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_vector.h:1339: undefined reference to `std::__throw_length_error(char const*)'
/tmp/real_deadlock_detector_stress_test-68a5ae.o: In function `__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)':
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/ext/new_allocator.h:102: undefined reference to `std::__throw_bad_alloc()'
/tmp/real_deadlock_detector_stress_test-68a5ae.o:(.eh_frame+0x63): undefined reference to `__gxx_personality_v0'
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)
llvm-svn: 224511
Dmitry Vyukov [Thu, 18 Dec 2014 10:32:48 +0000 (10:32 +0000)]
tsan: add a stress test for deadlock detector
currently disabled because fails
llvm-svn: 224509
Dmitry Vyukov [Thu, 18 Dec 2014 10:19:32 +0000 (10:19 +0000)]
tsan: don't crash with NULL deref during reporting
tctx==NULL crash observed during deadlock reporting.
There seems to be some bugs in the deadlock detector,
but it is still useful to be more robust during reporting.
llvm-svn: 224508
Dmitry Vyukov [Thu, 18 Dec 2014 10:17:01 +0000 (10:17 +0000)]
tsan: disable flaky debug check
see the comment for details
llvm-svn: 224507
Yaron Keren [Thu, 18 Dec 2014 10:03:35 +0000 (10:03 +0000)]
Fix Visual C++ error "'llvm::make_unique' : ambiguous call to overloaded function".
llvm-svn: 224506
David Majnemer [Thu, 18 Dec 2014 09:57:31 +0000 (09:57 +0000)]
Parse: Don't parse after the eof has been consumed
ParseCXXNonStaticMemberInitializer stashes away all the tokens for the
initializer and an additional EOF token to denote where the initializer
ends. However, it is possible for ParseLexedMemberInitializer to get
its hands on the "real" EOF token; since the two tokens are
indistinguishable, we end up consuming the EOF and descend into madness.
Instead, make it possible to tell which EOF token we are looking at.
This fixes PR21872.
llvm-svn: 224505
Alexey Bataev [Thu, 18 Dec 2014 06:54:53 +0000 (06:54 +0000)]
Fix for PR21915: assert on multidimensional VLA in function arguments.
Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA
Differential Revision: http://reviews.llvm.org/D6655
llvm-svn: 224504
Bob Wilson [Thu, 18 Dec 2014 06:08:26 +0000 (06:08 +0000)]
Change -save-temps to emit unoptimized bitcode files.
It is often convenient to use -save-temps to collect the intermediate
results of a compilation, e.g., when triaging a bug report. Besides the
temporary files for preprocessed source and assembly code, this adds the
unoptimized bitcode files as well.
This adds a new BackendJobAction, which is mostly mechanical, to run after
the CompileJobAction. When not using -save-temps, the BackendJobAction is
combined into one job with the CompileJobAction, similar to the way the
integrated assembler is handled. I've implemented this entirely as a
driver change, so under the hood, it is just using -disable-llvm-optzns
to get the unoptimized bitcode.
Based in part on a patch by Steven Wu.
rdar://problem/
18909437
llvm-svn: 224503
Saleem Abdulrasool [Thu, 18 Dec 2014 05:24:38 +0000 (05:24 +0000)]
ARM: improve instruction validation for thumb mode
The ARM Architecture Reference Manual states the following:
LDM{,IA,DB}:
The SP cannot be in the list.
The PC can be in the list.
If the PC is in the list:
• the LR must not be in the list
• the instruction must be either outside any IT block, or the last
instruction in an IT block.
POP:
The PC can be in the list.
If the PC is in the list:
• the LR must not be in the list
• the instruction must be either outside any IT block, or the last
instruction in an IT block.
PUSH:
The SP and PC can be in the list in ARM instructions, but not in Thumb
instructions.
STM:{,IA,DB}:
The SP and PC can be in the list in ARM instructions, but not in Thumb
instructions.
llvm-svn: 224502
Saleem Abdulrasool [Thu, 18 Dec 2014 05:24:32 +0000 (05:24 +0000)]
test: avoid unnecessary temporary files
Use pipes and redirect the error output to FileCheck directly. NFC.
llvm-svn: 224501
Chandler Carruth [Thu, 18 Dec 2014 05:19:47 +0000 (05:19 +0000)]
[SROA] Cleanup - remove the use of std::mem_fun_ref nonsense and use
a lambda now that we have them.
llvm-svn: 224500
Rafael Espindola [Thu, 18 Dec 2014 05:08:43 +0000 (05:08 +0000)]
Modernize the getStreamedBitcodeModule interface a bit. NFC.
llvm-svn: 224499
Craig Topper [Thu, 18 Dec 2014 05:02:14 +0000 (05:02 +0000)]
[PowerPC] Use MCPhysReg for tables of registers. Const-correct the tables. Only put the anonymous namespace around classes. NFC.
llvm-svn: 224498
Craig Topper [Thu, 18 Dec 2014 05:02:12 +0000 (05:02 +0000)]
[X86] Use correct opsize on indirect call and jump aliases.
llvm-svn: 224497
Craig Topper [Thu, 18 Dec 2014 05:02:10 +0000 (05:02 +0000)]
[X86] Don't use PS prefix on LDMXCSR/STMXCSR.
Near as I can tell prefixes are ignored on these instructions except for a comment in the Intel docs about 0xf3. Binutils disassembler seems to ignore prefixes on these instructions. Our disassembler still doesn't distinguish PS and "no prefix" well enough for this to make a functional change, but it helps with experiments I'm doing on a potential new disassembler table builder.
llvm-svn: 224496
Craig Topper [Thu, 18 Dec 2014 05:02:08 +0000 (05:02 +0000)]
[X86] Remove unnecessary 'In64BitMode' predicate for instructions that already indicate use of REX.W.
llvm-svn: 224495
Justin Hibbits [Thu, 18 Dec 2014 03:06:37 +0000 (03:06 +0000)]
Add a corresponding '@LOCAL' parse to match r224415.
Pointed out by Jim Grosbach.
llvm-svn: 224494
Eric Christopher [Thu, 18 Dec 2014 02:23:27 +0000 (02:23 +0000)]
Update for llvm front end change and use the TargetOptions struct
for ABI.
llvm-svn: 224493
Eric Christopher [Thu, 18 Dec 2014 02:20:58 +0000 (02:20 +0000)]
Add a new string member to the TargetOptions struct for the name
of the abi we should be using. For targets that don't use the
option there's no change, otherwise this allows external users
to set the ABI via string and avoid some of the -backend-option
pain in clang.
Use this option to move the ABI for the ARM port from the
Subtarget to the TargetMachine and update the testcases
accordingly since it's no longer valid to set via -mattr.
llvm-svn: 224492
Eric Christopher [Thu, 18 Dec 2014 02:08:55 +0000 (02:08 +0000)]
Make sure that arm-linux-gnu is still the apcs-gnu ABI when we
use clang -cc1 matching the front end and backend. Fix up a couple
of tests that were testing aapcs for arm-linux-gnu.
The test that removes the aapcs abi calling convention removes
them because the default triple matches what the backend uses
for the calling convention there and so it doesn't need to be
explicitly stated - see the code in TargetInfo.cpp.
llvm-svn: 224491
Eric Christopher [Thu, 18 Dec 2014 02:08:51 +0000 (02:08 +0000)]
Reinstate aapcs as the default arm abi.
llvm-svn: 224490
Eric Christopher [Thu, 18 Dec 2014 02:08:45 +0000 (02:08 +0000)]
Model ARM backend ABI selection after the front end code doing the
same. This will change the "bare metal" ABI from APCS to AAPCS.
The only difference between the front and back end code is that
the code for Triple::GNU was added for environment. That will migrate
to the front end shortly.
Tests updated with the ABI they were originally testing in the case
of bare metal (e.g. -mtriple armv7) or with a -gnu for arm-linux
triples.
llvm-svn: 224489
Petar Jovanovic [Thu, 18 Dec 2014 01:21:33 +0000 (01:21 +0000)]
Do not define CRT_HAS_128BIT for MIPS64
Do not define it for MIPS64 until its backend supports it.
See the bug report [1] for more information.
[1] http://llvm.org/bugs/show_bug.cgi?id=20098
Differential Revision: http://reviews.llvm.org/D6703
llvm-svn: 224488
Duncan P. N. Exon Smith [Thu, 18 Dec 2014 01:05:33 +0000 (01:05 +0000)]
Reapply "Linker: Drop superseded subprograms"
This reverts commit r224416, reapplying r224389. The buildbots hadn't
recovered after my revert, waiting until David reverted a couple of his
commits. It looks like it was just bad timing (where we were both
modifying code related to the same assertion). Trying again...
Here's the original text:
When a function gets replaced by `ModuleLinker`, drop superseded
subprograms. This ensures that the "first" subprogram pointing at a
function is the same one that `!dbg` references point at.
This is a stop-gap fix for PR21910. Notably, this fixes Release+Asserts
bootstraps that are currently asserting out in
`LexicalScopes::initialize()` due to the explicit instantiations in
`lib/IR/Dominators.cpp` eventually getting replaced by -argpromotion.
llvm-svn: 224487
Duncan P. N. Exon Smith [Thu, 18 Dec 2014 00:54:39 +0000 (00:54 +0000)]
IR: Make DICompositeType mutators private
Make `DICompositeType` mutators private to prevent misuse. All calls to
`setArrays()` and `setContainingType()` should go through
`DIBuilder::replaceArrays()` and `DIBuilder::replaceVTableHolder()`.
This is a follow-up to r224482 (now that clang has been updated in
r224483).
llvm-svn: 224486
Kevin Enderby [Thu, 18 Dec 2014 00:53:40 +0000 (00:53 +0000)]
Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers.
Also corrected the name of the load command to not end in an ’S’ as well as corrected
the name of the MachO::linker_option_command struct and other places that had the
word option as plural which did not match the Mac OS X headers.
llvm-svn: 224485
Duncan P. N. Exon Smith [Thu, 18 Dec 2014 00:48:56 +0000 (00:48 +0000)]
CGDebugInfo: Use DIBuilder API for self-referencing DICompositeTypes
Use new `DIBuilder` API from LLVM r224482 to mutate `DICompositeType`s,
rather than changing them directly. This allows `DIBuilder` to track
otherwise orphaned cycles when `CollectContainingType()` creates a
self-reference.
Fixes PR21941.
llvm-svn: 224483
Duncan P. N. Exon Smith [Thu, 18 Dec 2014 00:46:16 +0000 (00:46 +0000)]
IR: Handle self-referencing DICompositeTypes in DIBuilder
Add API to DIBuilder to handle self-referencing `DICompositeType`s.
Self-references aren't expected in the debug info graph, and we take
advantage of that by only calling `resolveCycles()` on nodes that were
once forward declarations (otherwise, DIBuilder needs an expensive
tracking reference to every unresolved node it creates, which in cyclic
graphs is *all of them*).
However, clang seems to create self-referencing `DICompositeType`s. Add
API to manage this safely. The paired commit to clang will include the
regression test.
I'll make the `DICompositeType` API `private` in a follow-up to prevent
misuse (I've separated that to prevent build failures from missing the
clang commit).
llvm-svn: 224482
Alexey Samsonov [Thu, 18 Dec 2014 00:45:32 +0000 (00:45 +0000)]
[dsymutil] Fix missing member initializer.
This bug was found by the MSan bootstrap bot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/5330/steps/check-llvm%20msan/logs/stdio
llvm-svn: 224481
Reid Kleckner [Thu, 18 Dec 2014 00:42:51 +0000 (00:42 +0000)]
Fix diagnostic for static methods referencing fields from using decls
Previously we thought the instance member was a function, not a field,
and we'd say something silly like:
t.cpp:4:27: error: call to non-static member function without an object argument
static int f() { return n; }
^
Noticed in PR21923.
llvm-svn: 224480
Fariborz Jahanian [Thu, 18 Dec 2014 00:30:54 +0000 (00:30 +0000)]
[Objective-C]. Modern property getters have side-effects.
So, place warning about property getter should not be used for side-effect
under its own group so warning can be turned off.
rdar://
19137815
llvm-svn: 224479
Richard Trieu [Thu, 18 Dec 2014 00:06:45 +0000 (00:06 +0000)]
Fix a function that only calls itself. The const_cast needs to remove the
const so that the other overloaded function will be called.
llvm-svn: 224478
Dan Albert [Thu, 18 Dec 2014 00:03:57 +0000 (00:03 +0000)]
[libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.
Summary:
Fixes PR21738.
The implementation for this is handled by __cxa_thread_atexit_impl,
which is supplied by libc.
More information:
https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
Reviewers: mclow.lists, EricWF, jroelofs
Reviewed By: jroelofs
Subscribers: majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D6708
llvm-svn: 224477
Justin Bogner [Wed, 17 Dec 2014 23:55:04 +0000 (23:55 +0000)]
InstrProf: Simplify/reduce state in CoverageMapping (NFC)
This state object makes things harder to reason about and isn't really
useful, since we can just emit the mappings before the state changes
rather than holding on to it.
llvm-svn: 224476
Rafael Espindola [Wed, 17 Dec 2014 23:49:22 +0000 (23:49 +0000)]
Revert "Put static local variables of inline functions in the function comdat."
This reverts commit r224369.
Thanks to Reid Kleckner for pointing out that we need a bigger gun to fix this
case.
llvm-svn: 224475
Alexey Samsonov [Wed, 17 Dec 2014 23:46:53 +0000 (23:46 +0000)]
[ASan] Mark test for -fsized-delete as XFAIL for dynamic runtime.
-fsized-delete is implemented via weak symbols, and doesn't work
properly when malloc/free replacements are provided in shared
ASan runtime.
llvm-svn: 224474
Alexey Samsonov [Wed, 17 Dec 2014 23:46:49 +0000 (23:46 +0000)]
[ASan] Add -ldl to linker invocation to lit tests that require it.
This fixes these tests under dynamic ASan runtime.
llvm-svn: 224473
Renato Golin [Wed, 17 Dec 2014 23:43:39 +0000 (23:43 +0000)]
Fix obvious cut&paste error on AArch64 Compiler-RT settings
llvm-svn: 224472
Reid Kleckner [Wed, 17 Dec 2014 23:40:46 +0000 (23:40 +0000)]
Don't assume friended C++ method decls have qualifiers
There are a few cases where unqualified lookup can find C++ methods.
Unfortunately, none of them seem to have illegal access paths, so I
can't excercise the diagnostic source range code that I am changing
here.
Fixes PR21851, which was a crash on valid.
llvm-svn: 224471
Alexey Samsonov [Wed, 17 Dec 2014 23:14:01 +0000 (23:14 +0000)]
[ASan] Always build shared ASan runtime on Linux.
This commit changes the strategy for building shared ASan runtime
and the way we test it:
- COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now
always build shared ASan runtime (it is the default on Android,
Windows and Mac, and not the default on Linux and FreeBSD).
- Platforms, which use static runtime by default now have
"check-asan-dynamic" testsuite. This testsuite contains instrumented
unit tests, and ASan lit tests, and runs them with shared ASan
runtime. This testsuite is *not* a part of "check-asan" and
*not* a part of "check-all", as adding 1000 more test cases, which
duplicate existing ones is costly. However, you're welcome to
add this command to your buildbot.
llvm-svn: 224470
Kostya Serebryany [Wed, 17 Dec 2014 23:06:36 +0000 (23:06 +0000)]
[sanitizer] add CombinedAllocator::InitIfLinkerInitialized and use it in lsan: speeds up lsan start-up time by ~25%
llvm-svn: 224469
Eric Christopher [Wed, 17 Dec 2014 22:26:32 +0000 (22:26 +0000)]
Fix a format string warning by noting that StringIsBreakpointName
will set the error accordingly and so there's no need to set it
again.
llvm-svn: 224468
Eric Christopher [Wed, 17 Dec 2014 22:25:37 +0000 (22:25 +0000)]
Fix initialization order to match that of the source.
llvm-svn: 224467
Duncan P. N. Exon Smith [Wed, 17 Dec 2014 22:05:42 +0000 (22:05 +0000)]
LTO: Lazy-load LTOModule in local contexts
Start lazy-loading `LTOModule`s that own their contexts. These can only
really be used for parsing symbols, so its unnecessary to ever
materialize their functions.
I looked into using `IRObjectFile::create()` and optionally calling
`materializAllPermanently()` afterwards, but this turned out to be
awkward.
- The default target triple and data layout logic needs to happen
*before* the call to `IRObjectFile::IRObjectFile()`, but after
`Module` was created.
- I tried passing a lambda in to do the module initialization, but
this seemed to require threading the error message from
`TargetRegistry::lookupTarget()` through `std::error_code`.
- I also looked at setting `errMsg` directly from within the lambda,
but this didn't look any better.
(I guess there's a reason we weren't already using that function.)
llvm-svn: 224466
Aaron Ballman [Wed, 17 Dec 2014 21:57:17 +0000 (21:57 +0000)]
Adding a -Wunused-value warning for expressions with side effects used in an unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case.
llvm-svn: 224465
Kostya Serebryany [Wed, 17 Dec 2014 21:51:07 +0000 (21:51 +0000)]
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, compiler-rt part
llvm-svn: 224464
Kostya Serebryany [Wed, 17 Dec 2014 21:50:04 +0000 (21:50 +0000)]
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, llvm part
llvm-svn: 224463
Kostya Serebryany [Wed, 17 Dec 2014 21:46:33 +0000 (21:46 +0000)]
[sanitizer] allow -fsanitize-coverage=N w/ -fsanitize=leak, clang part
llvm-svn: 224462
Matthias Braun [Wed, 17 Dec 2014 21:25:20 +0000 (21:25 +0000)]
RegisterCoalescer: Fix stripCopies() picking up main range instead of subregister range
This fixes a problem where stripCopies() would switch to values in the
main liverange when it crossed a copy instruction. However when joining
subranges we need to stay in the respective subregister ranges.
llvm-svn: 224461
Enrico Granata [Wed, 17 Dec 2014 21:18:43 +0000 (21:18 +0000)]
Provide CreateValueFromData,Expression at the SBTarget level as well as the SBValue level; and also make all the implenentations agree on using the matching ValueObject::Create instead of doing code copypastas
llvm-svn: 224460
Tobias Grosser [Wed, 17 Dec 2014 21:13:55 +0000 (21:13 +0000)]
Dead code elimination: Update dependences after eliminating code
Without updating dependences we may lose implicit transitive dependences for
which all explicit dependences have gone through the statement iterations we
have just eliminated.
No test case. We should probably implement a -verify-dependences option.
This fixes llvm.org/PR21227
llvm-svn: 224459
Matt Arsenault [Wed, 17 Dec 2014 21:04:08 +0000 (21:04 +0000)]
R600/SI: Fix f64 inline immediates
llvm-svn: 224458
Richard Smith [Wed, 17 Dec 2014 20:42:37 +0000 (20:42 +0000)]
[c++1z] Fixes for generalized non-type template argument support: check for
exact type match for deduced template arguments, and be sure to produce correct
canonical TemplateArgument representations to enable correct redeclaration
matching.
llvm-svn: 224456
Colin LeMahieu [Wed, 17 Dec 2014 20:35:11 +0000 (20:35 +0000)]
[Hexagon] Reconfiguring register alternate names.
llvm-svn: 224455
Reid Kleckner [Wed, 17 Dec 2014 20:23:11 +0000 (20:23 +0000)]
Destroy the diagnostic client first in ~DiagnosticEngine
Add a comment and a test to ~DiagnosticEngine about the ordering
requirements on the teardown of DiagnosticConsumer. This could also be
accomplished by rearranging the fields of ~DiagnosticEngine, but I felt
that this was a better, more explicit solution.
This fixes PR21911, an issue that occurred after the unique_ptr
migration in r222193.
llvm-svn: 224454
Yaron Keren [Wed, 17 Dec 2014 20:12:29 +0000 (20:12 +0000)]
This test does not pass for -target i686-pc-windows-gnu (-mingw32)
when clang is built with mingw-w64 4.9.1 or according to
http://llvm.org/PR20995 , mingw-w64 4.7.2 as well.
llvm-svn: 224453
Will Schmidt [Wed, 17 Dec 2014 19:56:29 +0000 (19:56 +0000)]
Enable the P8Model entry
This was missed last time around, for the P8 Instruction Scheduling
changes (223257). This will hook the P8Model entry in so those
changes will actually be used.
llvm-svn: 224452
Reid Kleckner [Wed, 17 Dec 2014 19:34:15 +0000 (19:34 +0000)]
Don't build invalid AST nodes during recovery
A DependentScopeDeclRefExpr should always have a nested name specifier.
During template instantiation, if we found that the named context was
incomplete, we would previously build a DependentScopeDeclRefExpr with
an empty qualifier.
This error recovery path has been asserting for some time. The other
error codepaths use ExprError, so we can do the same.
Fixes PR21864.
llvm-svn: 224451
Alexey Samsonov [Wed, 17 Dec 2014 19:31:39 +0000 (19:31 +0000)]
[ASan] Move flag parsing logic to asan_flags.cc. NFC.
llvm-svn: 224450
Richard Smith [Wed, 17 Dec 2014 19:24:30 +0000 (19:24 +0000)]
Support constant evaluation for member calls on std::initializer_list
temporaries.
llvm-svn: 224449
Ed Maste [Wed, 17 Dec 2014 19:14:57 +0000 (19:14 +0000)]
lld self-hosts on FreeBSD too
llvm-svn: 224448
Matthias Braun [Wed, 17 Dec 2014 19:13:47 +0000 (19:13 +0000)]
ExecutionDepsFix: Correctly handle wide registers.
The ExecutionDepsFix previously mapped each register to 1 or zero
registers of the register class it was called with and therefore
simulating liveness for. This was problematic for cases involving wider
registers like Q0 on ARM where ExecutionDepsFix gets invoked for the Dxx
registers. In these cases the wide register would get mapped to the last
matching D register, while it should have been all matching D registers.
This commit changes the AliasMap to use a SmallVector to map registers
to potentially multiple destination regclass registers. This is required
to avoid regressions with subregister liveness tracking enabled.
llvm-svn: 224447
David Blaikie [Wed, 17 Dec 2014 19:11:27 +0000 (19:11 +0000)]
Revert "Fix test cases given Clang's improved location information."
The Clang improevments were reverted due to failures created in an asan
bootstrap.
This reverts commit r224387.
llvm-svn: 224446
JF Bastien [Wed, 17 Dec 2014 18:12:10 +0000 (18:12 +0000)]
Random Number Generator Refactoring (removing from Module)
This patch removes the RNG from Module. Passes should instead create a new RNG for their use as needed.
Patch by Stephen Crane @rinon.
Differential revision: http://reviews.llvm.org/D4377
llvm-svn: 224444
Zachary Turner [Wed, 17 Dec 2014 18:02:36 +0000 (18:02 +0000)]
Work around an internal compiler error in MSVC.
For some reason MSVC ICEs when trying to index into a map using
a temporary object. Work around this by separating out the call
into multiple lines.
Patch by Aidan Dodds
Differential Revision: http://reviews.llvm.org/D6702
Reviewed by: Zachary Turner, Greg Clayton
llvm-svn: 224443