Commit Graph

162595 Commits

Author SHA1 Message Date
Rui Ueyama ccb8f16891 Refactor tests by using short identifiers.
This patch is to improve the readability of the tests before making a change
to /merge option.

llvm-svn: 195863
2013-11-27 19:07:28 +00:00
Aaron Ballman 3a8e2d9136 Adding the Subjects entry back for the noreturn attributes. This caused some test cases to be updated because the original diagnostic was about applying to methods as well as functions, but the semantic checking disallowed methods.
llvm-svn: 195862
2013-11-27 18:53:58 +00:00
Rafael Espindola 3dc549dbe3 Remove dead code.
MO_ExternalSymbol and MO_JumpTableIndex don't show up in inline asm.

llvm-svn: 195861
2013-11-27 18:38:14 +00:00
Rafael Espindola 52434f9673 Convert two if sequences to switches.
llvm-svn: 195859
2013-11-27 18:26:51 +00:00
Dmitry Vyukov c03868615b tsan: clarify "thread ended with ignores enabled" message
llvm-svn: 195858
2013-11-27 18:23:52 +00:00
Rafael Espindola ed20f478bc Use a switch.
llvm-svn: 195857
2013-11-27 18:18:24 +00:00
Rui Ueyama a5e09c84ca [PECOFF] Implement /merge option.
/MERGE:foo=bar command line option merges section foo to section bar. If
section bar does not exist, foo is just renamed as bar.

llvm-svn: 195856
2013-11-27 18:03:34 +00:00
Rui Ueyama 951dd1d411 [PECOFF] Rename getFinalSectionName -> getOutputSectionName.
llvm-svn: 195855
2013-11-27 18:03:31 +00:00
Rui Ueyama 26c191aec6 [PECOFF] Remove extraneous command line options from tests.
llvm-svn: 195854
2013-11-27 17:43:54 +00:00
Rui Ueyama 60bbba6578 [PECOFF] Add a test for r195797.
llvm-svn: 195853
2013-11-27 17:34:24 +00:00
Rui Ueyama 878a8c90ea [PECOFF] Fix atom ordinals.
Atom ordinals are the indeces in a file. Currently the PECOFF reader assigns
ordinals for each section, so it's (incorrectly) assigning duplicate ordinals.

llvm-svn: 195852
2013-11-27 17:31:53 +00:00
Aaron Ballman 6a42b5a0c5 Enabling the subject list for the warn_unused attribute, and adding a test case. Previously, would issue a "warning ignored" diagnostic instead of the more specific "only applies to."
llvm-svn: 195851
2013-11-27 16:59:17 +00:00
Aaron Ballman 4a611153e1 Adding in the subject for the init_priority attribute.
llvm-svn: 195850
2013-11-27 16:34:09 +00:00
Rafael Espindola 3c8e147a6b Use the same tls section name as msvc.
We currently error in clang with:
"error: thread-local storage is unsupported for the current target", but we
can start to get the llvm level ready.

When compiling

template<typename T>
struct foo {
  static __declspec(thread) int bar;
};
template<typename T>
__declspec(therad) int foo<T>::bar;
template struct foo<int>;

msvc produces

SECTION HEADER #3
   .tls$ name
       0 physical address
       0 virtual address
       4 size of raw data
     12F file pointer to raw data (0000012F to 00000132)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
C0301040 flags
         Initialized Data
         COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA)
         4 byte align
         Read Write

gcc produces a ".data$__emutls_v.<symbol>" for the testcase with
__declspec(thread) replaced with thread_local.

llvm-svn: 195849
2013-11-27 15:52:11 +00:00
Aaron Ballman 6f9165a478 Refactored semantic handlers that would unilaterally apply the attribute to a Decl so they all go through a common interface. No functional change intended.
llvm-svn: 195848
2013-11-27 15:24:06 +00:00
Rafael Espindola c5c7bb6b20 Remove more dead code now that this is only used for inline asm.
MO_ConstantPoolIndex is handled in printLeaMemReference.
MO_JumpTableIndex and MO_ExternalSymbol don't show up in inline asm.

llvm-svn: 195847
2013-11-27 15:13:06 +00:00
Alexander Kornienko b4586f4217 Trivial fix: remove unused variable
llvm-svn: 195846
2013-11-27 15:02:03 +00:00
Timur Iskhodzhanov c085e99385 Add a DLL thunk for __asan_handle_no_return
llvm-svn: 195845
2013-11-27 14:36:44 +00:00
Jiangning Liu ee3e08799c Fix the AArch64 NEON bug exposed by checking constant integer argument range of ACLE intrinsics.
llvm-svn: 195844
2013-11-27 14:02:55 +00:00
Jiangning Liu 97aa8cf8b7 Fix the AArch64 NEON bug exposed by checking constant integer argument range of ACLE intrinsics.
llvm-svn: 195843
2013-11-27 14:02:25 +00:00
Aaron Ballman 2f47a517a2 Removing the description part of a subset subject. It is unused, and wouldn't be future-proof regarding translation issues. It is also covered by SubjectList's CustomDiag member.
llvm-svn: 195842
2013-11-27 13:56:12 +00:00
Aaron Ballman 74eeeae3d3 Laying the basic groundwork for table generating the diagnostics for attribute subjects. This makes some modifications to the way subjects are listed in Attr.td, and updates the attr emitter to handle the new constructs.
I have disabled some attribute subject lines on purpose in Attr.td;
this part is a WIP with the goal being to restore those subjects
incrementally. By commenting them out, it leaves the original behavior
the same as before for those attributes and so those are not
functionality changes.

llvm-svn: 195841
2013-11-27 13:27:02 +00:00
Alexey Samsonov e0e31c4a30 [ASan] Clarify that AsanThread objects are allocated only via mmap(). No functionality change.
llvm-svn: 195840
2013-11-27 13:22:21 +00:00
Evgeniy Stepanov b76b687628 [sanitizer] Intercept __xpg_strerror_r.
llvm-svn: 195839
2013-11-27 12:29:10 +00:00
Lorenzo Martignoni 085bf66e60 Added missing lib/dfsan/scripts/check_custom_wrappers.sh
llvm-svn: 195838
2013-11-27 11:50:44 +00:00
Alexey Samsonov 1c256cbcc4 [Sanitizer] Add rudimentary support for using libbacktrace in symbolizer.
More steps are needed to actually make it usable:
* sanitizer runtimes should be compiled with -DSANITIZER_LIBBACKTRACE.
* libbacktrace headers should be installed.
* user has to manually link in libbacktrace.a into the executable.

We can easily solve the first two problems in the build system, but
detecting/linking libbacktrace to all the tests we have and end-user programs
is more challenging (and will unlikely work w/o Driver support).

Based on the patch by Jakub Jelinek!

llvm-svn: 195837
2013-11-27 11:46:58 +00:00
Dmitry Vyukov 3238e1c913 tsan: better diagnostics if thread finishes with ignores enabled
print thread creation stack
and stacks where ignores were enabled.

llvm-svn: 195836
2013-11-27 11:30:28 +00:00
Dmitry Vyukov 44be414d69 asan: fix android build
android does not seem to have IOCB_CMD_PREADV

llvm-svn: 195835
2013-11-27 11:20:55 +00:00
Peter Zotov 40a5d378f6 [OCaml] Embed rpath into stub libraries and native executables
This commit embeds a set of linker flags with hardcoded paths to
the LLVM shared library on --enable-shared builds into .cmxa files
and stub dynamic libraries. This solution closely follows existing
rules for rpath in the LLVM tools, which had to be modified because
of differences in toolchain.

Without this patch, OCaml tests as well as opam bindings broke,
as neither of those updates LD_LIBRARY_PATH to include
the $prefix/lib directory.

llvm-svn: 195834
2013-11-27 11:03:18 +00:00
Dmitry Vyukov 89117e1fcc tsan: do not leave verbosity>0 in tests
llvm-svn: 195833
2013-11-27 10:05:22 +00:00
Dmitry Vyukov 51b35901fd tsan: minor refactoring
use common helper macro

llvm-svn: 195832
2013-11-27 09:59:11 +00:00
Dmitry Vyukov 7bd319cc08 tsan: fix flags parsing
- running_on_valgrind was not parsed in some contexts
- refactor code a bit
- add comprehensive tests for flags parsing

llvm-svn: 195831
2013-11-27 09:54:10 +00:00
Dmitry Vyukov ee882ba4a1 tsan: support synchronization by means of linux aio
http://llvm-reviews.chandlerc.com/D2269

llvm-svn: 195830
2013-11-27 09:10:47 +00:00
Argyrios Kyrtzidis 3701f5465c [libclang] Check for LIBCLANG_DISABLE_CRASH_RECOVERY before enabling crash recovery.
Suggested by Alp Toker.

llvm-svn: 195829
2013-11-27 08:58:09 +00:00
Argyrios Kyrtzidis 91486222d5 [Sema] Don't look for the instantiation of a local extern decl in a different
dependent context that the one we are instantiating, otherwise there will be an assertion.

rdar://15464547

llvm-svn: 195828
2013-11-27 08:34:14 +00:00
David Majnemer 192d1798b2 Sema: Instantiate local class and their members appropriately
We would fail to instantiate them when the surrounding function was
instantiated. Instantiate the class and add it's members to the list of
pending instantiations, they should be resolved when we are finished
with the function's body.

This fixes PR9685.

llvm-svn: 195827
2013-11-27 08:20:38 +00:00
Rafael Espindola e370147b8c Convert more methods in static helpers.
llvm-svn: 195826
2013-11-27 07:34:09 +00:00
Rafael Espindola 7caa135677 Convert these methods into static functions.
llvm-svn: 195825
2013-11-27 07:14:26 +00:00
Rafael Espindola 09cf06c75e Cleanup and test X86AsmPrinter::printPCRelImm.
It is only used for asm printing.

On X86 we put basic block addresses on register before passing them to inline
asm, so the MO_MachineBasicBlock case was dead.

MO_ExternalSymbol was dead since any symbol being passed to inline asm
is represented as MO_GlobalAddress.

The MO_GlobalAddress and MO_Register cases were not tested.

llvm-svn: 195824
2013-11-27 06:53:13 +00:00
Argyrios Kyrtzidis 50126f1259 [libclang] Make sure we don't access past the tokens buffer while token annotation.
Also disable crash recovery using 'LIBCLANG_DISABLE_CRASH_RECOVERY' environment variable.

llvm-svn: 195819
2013-11-27 05:50:55 +00:00
Alp Toker 965f882588 Remove a whole lot of unused variables
There are about 30 removed in this patch, generated by a new FixIt I haven't
got round to submitting yet.

llvm-svn: 195814
2013-11-27 05:22:15 +00:00
Alp Toker d35031ee92 Add a triple to fix this test on Windows
The warning from cmake-clang-x64-msc16-R was:

  test\SemaCXX\old-style-cast.cpp Line 6: cast to 'void **' from smaller integer type 'long'

llvm-svn: 195813
2013-11-27 04:59:03 +00:00
Sean Silva 6cda6dc6cf [docs] Mention gotcha regarding implicit BB numbering
Impetus for the clarification by Mikael Lyngvig.

llvm-svn: 195812
2013-11-27 04:55:23 +00:00
Richard Smith 41c35d6d2f Unify lookup from within not-yet-defined defaulted special members: use common
code for handling triviality, deletedness and constexpr. Fix a few bugs in
these, particularly related to mutable members, and remove some dead code.

llvm-svn: 195809
2013-11-27 03:39:20 +00:00
Alp Toker c7c1ebe660 Implement -Wold-style-cast
Based on a patch by Ondřej Hošek!

llvm-svn: 195808
2013-11-27 03:18:17 +00:00
Hal Finkel 8081ae9134 Fix comment in PPCA2Model
llvm-svn: 195807
2013-11-27 03:12:56 +00:00
Rafael Espindola d0ed730f92 Remove dead argument.
llvm-svn: 195806
2013-11-27 02:25:20 +00:00
Richard Smith 852e9ce3dd Remove 'DistinctSpellings' support from Attr.td and change its only user to
look at the attribute spelling instead. The 'ownership_*' attributes should
probably be split into separate *Attr classes, but that's more than I wanted to
do here.

llvm-svn: 195805
2013-11-27 01:46:48 +00:00
Chad Rosier 9e59285cc8 [AArch64] Add support for NEON scalar floating-point absolute difference.
llvm-svn: 195804
2013-11-27 01:46:19 +00:00
Chad Rosier 75290c6307 [AArch64] Add support for NEON scalar floating-point absolute difference.
llvm-svn: 195803
2013-11-27 01:45:58 +00:00