Commit Graph

142908 Commits

Author SHA1 Message Date
Tobias Grosser abfbe637bc ScopInfo: clang-format file
clang-format was able to format the entire file except the final
INITIALIZE_PASS_* macros.

llvm-svn: 174366
2013-02-05 12:09:06 +00:00
Tobias Grosser 0d1eee3298 ScopDetect: clang-format pointer types in templates
llvm-svn: 174365
2013-02-05 11:56:05 +00:00
Daniel Jasper 1ac3e05bbd Initial support for formatting ObjC method declarations/calls.
We can now format stuff like:
- (void)doSomethingWith:(GTMFoo *)theFoo
                   rect:(NSRect)theRect
               interval:(float)theInterval {
  [myObject doFooWith:arg1 //
                 name:arg2
                error:arg3];

}

This seems to fix everything mentioned in llvm.org/PR14939.

llvm-svn: 174364
2013-02-05 10:07:47 +00:00
Daniel Jasper b9ebd5d30e Fix some linebreak decisions in Google format.
Before:
f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa +
  aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(aaaaaaaaaaaaa, aaaaaaaaaaaaa, aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa,
                                                    aaaaaaaaaaaaaaaa));

After:
f(aaaaaaaaaaaaaaaaaaaa,
  aaaaaaaaaaaaaaaaaaaa,
  aaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaa);
aaaaaaa(aaaaaaaaaaaaa,
        aaaaaaaaaaaaa,
        aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaa));

llvm-svn: 174363
2013-02-05 09:41:21 +00:00
Tobias Grosser af3c00b87b ScopDetection: clang-format some more code
llvm-svn: 174362
2013-02-05 09:40:22 +00:00
Daniel Jasper a885dbeb96 Fix formatting regression introduced by r174307.
In preprocessor definitions, we would not parse all the tokens and thus
not annotate them anymore. This led to a wrong formatting of comments
in google style:

  #endif // HEADER_GUARD  -- requires two spaces

llvm-svn: 174361
2013-02-05 09:34:14 +00:00
Jack Carter 428a06cc75 This patch that sets the Mips ELF header flag for
MicroMips architectures. 

Contributer: Zoran Jovanovic
 
llvm-svn: 174360
2013-02-05 09:30:03 +00:00
Arnaud A. de Grandmaison 49c04467ea Fix typo in comment
llvm-svn: 174359
2013-02-05 09:06:17 +00:00
Jack Carter 9c1a027fe8 This patch that sets the EmitAlias flag in td files
and enables the instruction printer to print aliased 
instructions. 

Due to usage of RegisterOperands a change in common 
code (utils/TableGen/AsmWriterEmitter.cpp) is required 
to get the correct register value if it is a RegisterOperand.

Contributer: Vladimir Medic
 
llvm-svn: 174358
2013-02-05 08:32:10 +00:00
Michael J. Spencer 31876b4efd [Support][ErrorOr] Add support for convertable types.
llvm-svn: 174357
2013-02-05 08:22:27 +00:00
Bill Wendling b9c5b1a5c4 Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.
llvm-svn: 174356
2013-02-05 08:09:32 +00:00
Michael Gottesman 159630598a Changed in comment cxx -> C++. Thanks Richard Smith!.
llvm-svn: 174355
2013-02-05 08:01:22 +00:00
Jack Carter 10be6aef15 This patch changes a static_cast to dyn_cast
for MipsELFStreamer objects.

Contributer: Jack Carter
 
llvm-svn: 174354
2013-02-05 07:47:41 +00:00
NAKAMURA Takumi 0120178909 TextDiagnostic.cpp: Suppress a warning to use ptrdiff_t on i686-clang. [-Wsign-compare]
llvm-svn: 174353
2013-02-05 07:37:07 +00:00
Eric Christopher 411e674557 Construct a skeleton cu for each compile unit in the module, not just
for the first compile unit.

llvm-svn: 174352
2013-02-05 07:32:03 +00:00
Eric Christopher 6a421a944d Add support for testing the output of the abbrev table for the
skeleton CU as part of the DWARF5 split dwarf proposal.

llvm-svn: 174351
2013-02-05 07:32:00 +00:00
Eric Christopher 7a2cdf798b Add support for emitting a stub DW_AT_GNU_dwo_id as part of the
DWARF5 split dwarf proposal.

llvm-svn: 174350
2013-02-05 07:31:55 +00:00
Eric Christopher 2ba5fcb759 Driver and option support for -gsplit-dwarf. This is a part of
the DWARF5 split dwarf proposal.

llvm-svn: 174349
2013-02-05 07:29:57 +00:00
Eric Christopher c4b0be9700 Spaces instead of tabs.
llvm-svn: 174348
2013-02-05 07:29:49 +00:00
Bill Wendling 952e5c3e61 Use the do-while(0) thing for this #define.
llvm-svn: 174347
2013-02-05 07:19:31 +00:00
Alexey Samsonov 741c688fe1 Print error messages from MemoryBuffer::getFile() in llvm-symbolizer
llvm-svn: 174346
2013-02-05 07:01:34 +00:00
Michael Gottesman e2376cdf71 Add code to GlobalVariable.h so that global variables marked as
externally_initialized return false for hasDefiniteInitializer and
hasUniqueInitializer.

rdar://12580965.

llvm-svn: 174345
2013-02-05 06:53:26 +00:00
Ted Kremenek 653f523664 Revert "Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users."
I changed my mind.  We should just document these in the man page.

llvm-svn: 174344
2013-02-05 06:33:47 +00:00
Owen Anderson a47fdbb032 When the target-independent DAGCombiner inferred a higher alignment for a load,
it would replace the load with one with the higher alignment.  However, it did
not place the new load in the worklist, which prevented later DAG combines in
the same phase (for example, target-specific combines) from ever seeing it.

This patch corrects that oversight, and updates some tests whose output changed
due to slightly different DAGCombine outputs.

llvm-svn: 174343
2013-02-05 06:25:30 +00:00
Ted Kremenek 03cb13751f Remove dead code related to the now defunct PCH stat cache.
llvm-svn: 174342
2013-02-05 06:21:59 +00:00
Nick Lewycky 192542ce38 Test for virtual instead of pure here. It has the exact same effect, and John
claims it will improve performance.

llvm-svn: 174341
2013-02-05 06:20:31 +00:00
Michael Gottesman 27e7ef326a Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.
llvm-svn: 174340
2013-02-05 05:57:38 +00:00
Richard Smith 9ca910111c PR15095: Use more correct source locations for the InitListExpr we fake up for
vector initialization. Patch by John Stratton!

llvm-svn: 174339
2013-02-05 05:55:57 +00:00
Ted Kremenek e2af9b5d2c Remove sparse text on diagnostic options. These are not really documented anywhere, and they really aren't for normal users.
llvm-svn: 174338
2013-02-05 05:55:21 +00:00
Richard Smith 6b21696ee8 Add some missing diagnostics for C++11 narrowing conversions.
llvm-svn: 174337
2013-02-05 05:52:24 +00:00
Manman Ren 86b1d868ba [Stack Alignment] emit warning instead of a hard error
Per discussion in rdar://13127907, we should emit a hard error only if
people write code where the requested alignment is larger than achievable
and assumes the low bits are zeros. A warning should be good enough when
we are not sure if the source code assumes the low bits are zeros.

rdar://13127907

llvm-svn: 174336
2013-02-04 23:45:08 +00:00
Bill Wendling 56aecccee0 Initial cleanups of the param-attribute code in the bitcode reader/writer.
Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.

llvm-svn: 174335
2013-02-04 23:32:23 +00:00
Jason Molenda 18257c4106 Remove the m_images(NULL) hack in the Target ctor now
that the original issue has been fixed by r174222.

llvm-svn: 174334
2013-02-04 23:30:05 +00:00
Enrico Granata 3b1b2dabda <rdar://problem/12953018>
Synthetic children and summary for std::vector<bool> (for both libcxx and libstdcpp).
std::vector<bool> is a special case and is custom-implemented to be a vector of bits, which means we failed to handle it with the standard std::vector<T> formatter.
This checkin provides custom formatters that work correctly

llvm-svn: 174333
2013-02-04 22:54:42 +00:00
Alexey Samsonov d6cef10af8 Replace global std::string with const char[]
llvm-svn: 174332
2013-02-04 15:55:26 +00:00
Jyotsna Verma 7ab68fbd1d Hexagon: Add V4 combine instructions and some more Def Pats for V2.
llvm-svn: 174331
2013-02-04 15:52:56 +00:00
Benjamin Kramer c35d526489 Disable a couple more vector splat optimizations on PPC.
I didn't see those because the test case used "not grep". FileCheck the test and
XFAIL it, preserving the old optimization, so this can be fixed eventually.

llvm-svn: 174330
2013-02-04 15:52:32 +00:00
Tobias Grosser 428b3e48e2 ScopDetection: Improve printing of alias sets
We now show the all members of the alias set that may couse possible aliasing.
In case a alias set member is not a named instruction (unnamed instructions or
constant expressions), we show the expression itself.

This improves our error message

from:

  Possible aliasing for value: .reg2mem

to:

  Possible aliasing: ".reg2mem",
                     "[0 x double]* inttoptr (i64 47255179264 to [0 x double]*)

llvm-svn: 174329
2013-02-04 15:46:25 +00:00
Tim Northover 24937c12eb Fix some abuses of StringRef
We were taking a StringRef to a temporary result, which can go horribly wrong.

llvm-svn: 174328
2013-02-04 15:44:38 +00:00
Benjamin Kramer 2c9da989c2 X86: Open up some opportunities for constant folding by postponing shift lowering.
Fixes PR15141.

llvm-svn: 174327
2013-02-04 15:19:33 +00:00
Benjamin Kramer 0611298446 X86: Simplify code. No functionality change.
llvm-svn: 174326
2013-02-04 15:19:25 +00:00
Benjamin Kramer 548ffa274a SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following:
input:
x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16>
lowered to:
tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8>
x = ADD tmp, tmp

The add now gets folded immediately and we're back at the BUILD_VECTOR we
started from. I don't see a way to fix this currently so I left it disabled
for now.

Fix some trivially foldable X86 tests too.

llvm-svn: 174325
2013-02-04 15:19:18 +00:00
Tim Northover aefc30f2a4 Give explicit suffix to integer constant over 32-bits.
llvm-svn: 174324
2013-02-04 14:14:58 +00:00
Tim Northover 43852f20ef Enable AArch64 as a target built by default.
llvm-svn: 174322
2013-02-04 12:32:21 +00:00
Tim Northover 37b131f607 Update debugging test for change in expected metadata.
llvm-svn: 174321
2013-02-04 12:15:00 +00:00
Manuel Klimek abf4371339 Implements the convenience matcher findAll.
We found that findAll has been implemented incorrectly multiple times
by various people using the matchers. To prevent further wasted
development effort, it makes sense to add it as convenience matcher
implemented as eachOf(m, forEachDescendant(m)).

This patch also updates the docs with the new matchers.

llvm-svn: 174320
2013-02-04 10:59:20 +00:00
Dmitry Vyukov fa67ed47e1 asan/tsan: fix failing CHECK on windows
llvm-svn: 174319
2013-02-04 10:42:38 +00:00
Alexey Samsonov 576e270287 [Sanitizer] use proper casting in *stat functions on Mac
llvm-svn: 174318
2013-02-04 10:31:39 +00:00
Dmitri Gribenko a84c59c95a Coding standards: don't use ``inline`` when defining a function in a class
definition

Current practice is not to use 'inline' in:

  class Foo {
  public:
    inline void bar() {
      // ...
    }
  };

llvm-svn: 174317
2013-02-04 10:24:58 +00:00
Alexey Samsonov 2c5cbd2b38 [Sanitizer] extend internal libc with stat/fstat/lstat functions
llvm-svn: 174316
2013-02-04 10:16:50 +00:00