Commit Graph

140634 Commits

Author SHA1 Message Date
David Blaikie 5a6a020d9b Suppress GCC -Wreturn warning.
Modified from a patch by David Greene.

llvm-svn: 171982
2013-01-09 17:48:41 +00:00
Dmitry Vyukov a626d03266 tsan: detect races on fd passed to epoll_ctl
llvm-svn: 171981
2013-01-09 17:31:27 +00:00
Marshall Clow 4476100a2f Made test output iterators have value_type of 'void'; matches ones in library
llvm-svn: 171980
2013-01-09 17:20:02 +00:00
Adhemerval Zanella 1ae2248e14 PowerPC: EH adjustments
This patch adjust the r171506 to make all DWARF enconding pc-relative
for PPC64. It also adds the R_PPC64_REL32 relocation handling in MCJIT
(since the eh_frame will not generate PIC-relative relocation) and also
adds the emission of stubs created by the TTypeEncoding.

llvm-svn: 171979
2013-01-09 17:08:15 +00:00
Rafael Espindola 3bd836a58e Handle static functions being redeclared in function scope.
Fixes pr14861.

llvm-svn: 171978
2013-01-09 16:34:58 +00:00
Shankar Easwaran 9f64604e74 add hexagon flags in ELF.h
llvm-svn: 171977
2013-01-09 16:34:46 +00:00
David Tweed f42bdf7c77 For some LLVM-as-library uses it is convenient to create a
subclass of TargetMachine which "forwards" all operations to an
existing internal TargetMachine member variable. In the usage context the
specific-machine class derived from TargetMachine is not visible,
only a reference to the generic base class TargetMachine. Although
getSubtargetImpl() is public in specific-machine classes derived from
TargetMachine, the TargetMachine class unfortunately has
getSubtargetImpl() protected (and accessing non-const members makes
abusing getSubtarget() unsuitable). Making it public in the base class
allows this forwarding pattern.

llvm-svn: 171976
2013-01-09 16:21:47 +00:00
Dmitri Gribenko 06358bd078 Configure: if we compile with clang, check that it is not broken
Some linux distibutions (for example, Mageia 2, Fedora 17) ship Clang that is
essentially broken for the end user.  Clang can not find or compile libstdc++
headers.

The issue is that our configure prefers clang over gcc, thus selecting a broken
Clang when a working GCC is available.

Now we detect this issue by compiling a simple program.  If it does not
compile, configure stops with an error suggesting the user to select a
different compiler.

llvm-svn: 171975
2013-01-09 15:25:30 +00:00
Manuel Klimek 52b1515405 Enables layouting unwrapped lines around preprocessor directives.
Previously, we'd always start at indent level 0 after a preprocessor
directive, now we layout the following snippet (column limit 69) as
follows:

functionCallTo(someOtherFunction(
    withSomeParameters, whichInSequence,
    areLongerThanALine(andAnotherCall,
  B
                       withMoreParamters,
                       whichStronglyInfluenceTheLayout),
    andMoreParameters),
               trailing);

Note that the different jumping indent is a different issue that will be
addressed separately.

This is the first step towards handling #ifdef->#else->#endif chains
correctly.

llvm-svn: 171974
2013-01-09 15:25:02 +00:00
Kostya Serebryany 864ef315c0 [asan] make the slow unwinder a bit more robust. The unittests pass with fast_unwind_on_fatal=0, but I still observe some differences between the two unwinders
llvm-svn: 171973
2013-01-09 13:55:00 +00:00
Tim Northover ab7689ecee Check whether MCInst operand isImm before calling getImm.
When processing possible aliases, TableGen assumes that if an operand *can* be
an immediate, then it always *will* be. This is incorrect for the AArch64
backend. This patch inserts a check in the generated code to make sure isImm is
true first.

llvm-svn: 171972
2013-01-09 13:32:04 +00:00
Tim Northover f1450d8d7c Refactor to expose RTLIB calls to targets.
fp128 is almost but not quite completely illegal as a type on AArch64. As a
result it needs to have a register class (for argument passing mainly), but all
operations need to be lowered to runtime calls. Currently there's no way for
targets to do this (without duplicating code), as the relevant functions are
hidden in SelectionDAG. This patch changes that.

llvm-svn: 171971
2013-01-09 13:18:15 +00:00
Timur Iskhodzhanov 1d1f74cbf5 [ASan/Win] Satisfy lint
llvm-svn: 171970
2013-01-09 12:43:16 +00:00
Guy Benyei 6313f780e1 Enable intel_ocl_bicc for x86_64 target. This was missed in r171056.
llvm-svn: 171969
2013-01-09 12:21:44 +00:00
Timur Iskhodzhanov 73e484aa8a [ASan/Win] Unbreak the 32-bit RTL build
llvm-svn: 171968
2013-01-09 12:03:27 +00:00
Dmitry Vyukov a681c01b69 tsan: fix crash when user defines own fopen/fileno
llvm-svn: 171967
2013-01-09 11:54:52 +00:00
Daniel Jasper bcab430fee Only align after assignments on the top level.
This fixes llvm.org/PR14870 and we no longer mess up:
template <typename T1, typename T2 = char, typename T3 = char,
          typename T4 = char>
void f();

It removes the nice aligment for assignments inside other expressions,
but I am not sure those are actually practically relevant. If so, we can
fix those later.

llvm-svn: 171966
2013-01-09 10:40:23 +00:00
Manuel Klimek 652b9ab7df Incrase the number of parameters for AlignedCharArrayUnion.
We need this to correctly fix ASTMatchers/ASTTypeTraits.h in clang.

llvm-svn: 171965
2013-01-09 10:39:16 +00:00
Daniel Jasper 2df93311da Don't simply give up when exceeding 80cols, choose an "ok" option.
This addresses llvm.org/PR14847.

We can now format something like:
int aaaaaaaaaaaaaaaaaaaaaaaaaaa =
    // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

clang-format unavoidably exceeds the column limit, but does not just
flush everything into a single line. Moreover, it tries to minimize the
number of characters beyond the column limit.

llvm-svn: 171964
2013-01-09 10:16:05 +00:00
Daniel Jasper 890589414b Correctly format wrapped function call parameters in templated functions.
This fixes llvm.org/PR14846.

Before:
template <typename T>
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
        int aaaaaaaaaaaaaaaaa);

After:
template <typename T>
void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
    int aaaaaaaaaaaaaaaaa);

llvm-svn: 171963
2013-01-09 09:50:48 +00:00
Manuel Klimek cdd5c2397a Fixes dump_ast_matchers to parse all matcher macros and updates the
docs.

llvm-svn: 171962
2013-01-09 09:38:21 +00:00
Daniel Jasper d8bb2db242 Allow comments in the middle of statements to be on their own line.
This fixes llvm.org/PR14860.

Before, we messed up the format of:
if (DeclaratorInfo.isFunctionDeclarator() &&
    //getDeclSpecContextFromDeclaratorContext(Context) == DSC_top_level &&
    Tok.is(tok::semi) && NextToken().is(tok::l_brace)) {
}

llvm-svn: 171961
2013-01-09 09:33:39 +00:00
Bill Wendling f927ad34e7 Alter the hasing computation when inserting into the folding set.
llvm-svn: 171960
2013-01-09 09:26:23 +00:00
Daniel Jasper fb3f2482e5 Fix ObjC block declarations.
Before: int ( ^ Block1) (int, int) = ^ (int i, int j)
After:  int (^Block1) (int, int) = ^(int i, int j)
llvm-svn: 171959
2013-01-09 08:36:49 +00:00
Dmitry Vyukov b4ede780b0 tsan: fix crash when user defines own fopen/fileno
llvm-svn: 171958
2013-01-09 08:22:06 +00:00
Daniel Jasper 399d24bc7d Improve formatting of conditional operators.
This addresses llvm.org/PR14864.

We used to completely mess this up and now format as:
Diag(NewFD->getLocation(),
     getLangOpts().MicrosoftExt ? diag::ext_function_specialization_in_class :
         diag::err_function_specialization_in_class)
    << NewFD->getDeclName();

llvm-svn: 171957
2013-01-09 07:06:56 +00:00
Nadav Rotem 3f5825c6c1 add -march to the test
llvm-svn: 171956
2013-01-09 07:04:23 +00:00
Will Dietz b50565b21a [ubsan] Drop use of __atomic_exchange_n for now to fix build for some.
Need a more reliable way to check for support of this intrinsic.

llvm-svn: 171955
2013-01-09 06:18:40 +00:00
Sean Silva cc951b284b tblgen: use an early return to reduce indentation.
llvm-svn: 171954
2013-01-09 05:28:12 +00:00
Nadav Rotem 977e0be4a0 Efficient lowering of vector sdiv when the divisor is a splatted power of two constant.
PR 14848. The lowered sequence is based on the existing sequence the target-independent
DAG Combiner creates for the scalar case.

Patch by Zvi Rackover.

llvm-svn: 171953
2013-01-09 05:14:33 +00:00
Nico Weber 69dce49c76 Don't mention -fno-diagnostics-print-source-range-info in manual.
Clang doesn't understand it.

If someone wants to teach clang about that flag instead, please also add
support for -fno-diagnostics-parseable-fixits for consistency.

Until then, let the documentation match the current behavior.

llvm-svn: 171952
2013-01-09 05:06:41 +00:00
Sean Silva cb1a75e730 tblgen: Factor out common code.
llvm-svn: 171951
2013-01-09 04:49:14 +00:00
Eric Christopher bf7bc4966c Last in the series of removing unnecessary '0' arguments for
address space. Reordered the EmitULEB128IntValue arguments to
make this easier.

llvm-svn: 171949
2013-01-09 03:52:05 +00:00
Will Dietz 765c266892 [ubsan] Add deduplication functionality, always enabled.
llvm-svn: 171948
2013-01-09 03:40:03 +00:00
Will Dietz 450f1a1f45 [ubsan] Make static check data non-const so it can be used for deduplication.
llvm-svn: 171947
2013-01-09 03:39:41 +00:00
Andrew Trick 9f0b95f260 MIsched: add an ILP window property to machine model.
This was an experimental option, but needs to be defined
per-target. e.g. PPC A2 needs to aggressively hide latency.

I converted some in-order scheduling tests to A2. Hal is working on
more test cases.

llvm-svn: 171946
2013-01-09 03:36:49 +00:00
Jim Ingham 196bbc2571 Add a "--reverse" or "-r" option to the "list" with no options command. This will list backwards from the
last source point listed.
Also fix the setting of the default file & line to the file containing main, when you do a plain "list".

<rdar://problem/12685226>

llvm-svn: 171945
2013-01-09 03:27:33 +00:00
Eli Friedman c52435b4a2 Make sure clang puts tokens from different files on separate lines in "-E -P" mode. <rdar://problem/12774044>
llvm-svn: 171944
2013-01-09 03:16:42 +00:00
NAKAMURA Takumi d7678c6af5 [Object, DebugInfo] Make DWARFContext BE-aware.
test/DebugInfo/member-pointers.ll would not fail in targetting BE any more.

llvm-svn: 171943
2013-01-09 02:45:05 +00:00
Sean Silva 45e4147345 TableGen/LangRef: link bang operators into the productionlist
Now BangOperator should be nicely hyperlinked.

Pointed out by Joel Jones.

llvm-svn: 171942
2013-01-09 02:20:31 +00:00
Sean Silva 543fd7f8be TableGen/LangRef: discuss specific C-like escapes
Suggested by Joel Jones.

llvm-svn: 171941
2013-01-09 02:20:30 +00:00
Sean Silva dce94d3bd2 docs: Fix mention of DefmID to MultiClassID.
llvm-svn: 171940
2013-01-09 02:20:24 +00:00
Eli Friedman ec94b61745 Make __has_include a bit more resilient in the presence of macros. <rdar://problem/12748859>.
llvm-svn: 171939
2013-01-09 02:20:00 +00:00
Sean Silva 0657b40b3c Inline this into its only caller.
It's clearer and additionally this gets rid of the usage of `DefmID`,
which doesn't really correspond to anything in the language (it was just
used in the name of this parsing function which parsed a `MultiClassID`
and returned that multiclass's record).

This area of the code still needs a lot of work.

llvm-svn: 171938
2013-01-09 02:17:14 +00:00
Sean Silva 28f3721aa0 tblgen: Reuse function that is 2 lines above.
llvm-svn: 171937
2013-01-09 02:17:13 +00:00
Sean Silva 710c3ae5e6 fix copy-paste-o
llvm-svn: 171936
2013-01-09 02:11:57 +00:00
Sean Silva c95fe2804d docs: Bring TableGen syntax a bit closer to reality.
It's not just def's but actually a limited subset of Object's that are
allowed inside a multiclass.

Spotted by Joel Jones.

llvm-svn: 171935
2013-01-09 02:11:55 +00:00
Greg Clayton 89f255e426 Updated documentation on the "register_data_addr" key that can be supplied in the "thread" dictionary return value for the python OS plug-ins.
llvm-svn: 171934
2013-01-09 02:05:38 +00:00
Eric Christopher e3ab3d0e2c These functions have default arguments of 0 for the last arg. Use
them.

llvm-svn: 171933
2013-01-09 01:57:54 +00:00
Eric Christopher ce0cfce775 These functions have default arguments of 0 for the last arg. Use
them and add one where it seemed obvious that we wanted one.

llvm-svn: 171932
2013-01-09 01:35:34 +00:00