Commit Graph

140927 Commits

Author SHA1 Message Date
Michael J. Spencer 7d1b7c4c38 Fix LLP64 build.
llvm-svn: 172357
2013-01-13 16:00:51 +00:00
Dmitri Gribenko 462462e98d Update links to "Itanium C++ ABI: Exception Handling" document
llvm-svn: 172356
2013-01-13 15:53:09 +00:00
Daniel Jasper 22cf462234 Format unions like structs and classes.
Note that I don't know whether we should put {} on a single line in this
case, but it is probably a theoretical issue as in practice such
structs, classes or unions won't be empty.

Before: union A {}
        a;
After:  union A {} a;
llvm-svn: 172355
2013-01-13 14:39:04 +00:00
Chandler Carruth 953fb087e5 Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
flag information down from the Clang driver into the Gold linker plugin
for LTO. This allows specifying -march on the linker commandline and
should hopefully have it pass all the way through to the LTO optimizer.

Fixes PR14697.

llvm-svn: 172354
2013-01-13 11:46:33 +00:00
Benjamin Kramer bcd14a0f26 X86: Add patterns for X86ISD::VSEXT in registers.
Those can occur when something between the sextload and the store is on the same
chain and blocks isel. Fixes PR14887.

llvm-svn: 172353
2013-01-13 11:37:04 +00:00
NAKAMURA Takumi 7ab4fbf5c2 CGBuiltin.cpp: Fix abuse of ArrayRef in EmitOverflowIntrinsic().
In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly;

  llvm::Type *XTy = X->getType();
  ArrayRef<llvm::Type *> Ty(XTy);
  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty);

Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten;

  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType()));

ArrayRef<T> has an implicit constructor to create uni-entry of T;

  llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType());

MSVC-generated clang.exe crashed.

llvm-svn: 172352
2013-01-13 11:26:44 +00:00
Daniel Jasper 48cb3b97c7 Always put a space after ",".
I am not aware of a case where that would be wrong. The specific case I
am fixing are function parameters wrapped in parenthesis (e.g. in
macros).

Before: function(a,(b));
After:  function(a, (b));
llvm-svn: 172351
2013-01-13 08:19:51 +00:00
Daniel Jasper 5ef433fc0c Don't put spaces around hyphens in include paths.
Before: #include <a - a>
After:  #include <a-a>
llvm-svn: 172350
2013-01-13 08:12:18 +00:00
Daniel Jasper ef906a9c67 Improve identification of c-style casts.
A ")" before any of "=", "{" or ";" won't be a cast. This fixes issues
with the formatting of unnamed parameters.

Before: void f(int *){}
After:  void f(int *) {}
llvm-svn: 172349
2013-01-13 08:01:36 +00:00
Nadav Rotem 40e45eeae2 Fix PR14547. Handle induction variables of small sizes smaller than i32 (i8 and i16).
llvm-svn: 172348
2013-01-13 07:56:29 +00:00
Michael Gottesman 1a89fe554b [ObjCARC] Even more debug messages!
llvm-svn: 172347
2013-01-13 07:47:32 +00:00
Michael Gottesman af2113ffb5 [ObjCARC] More debug messages.
llvm-svn: 172346
2013-01-13 07:00:51 +00:00
Michael Gottesman c5cc9f154d Updated documentation to reflect new multiprecision builtin functions.
llvm-svn: 172345
2013-01-13 04:35:31 +00:00
NAKAMURA Takumi 4b7d1ce9c1 clang/test/CodeGen/builtins-multiprecision.c: Enhance for each test to run on theree targets, i686, amd64, win64.
llvm-svn: 172344
2013-01-13 03:55:21 +00:00
Michael Gottesman 987226696e Fixed spelling of test name: builtins-multipercision.c => builtins-multiprecision.c.
llvm-svn: 172343
2013-01-13 03:44:31 +00:00
Michael Gottesman 0cd8b78916 Added a triple to the test builtins-multiprecision.c.
llvm-svn: 172342
2013-01-13 03:40:23 +00:00
Michael Gottesman 54398015bf Added builtins for multiprecision adds.
We lower all of these intrinsics into a 2x chained usage of
uadd.with.overflow.

llvm-svn: 172341
2013-01-13 02:22:39 +00:00
Richard Smith 1f5a4323e9 Remove some duplication in the handling of __attribute__((ext_vector_size(N))).
llvm-svn: 172340
2013-01-13 02:11:23 +00:00
Michael J. Spencer ca20ffbab2 [test] Fix tests on Windows.
llvm-svn: 172339
2013-01-13 01:09:51 +00:00
Michael J. Spencer 74ba722be1 [YAML] Fix undefined behavior.
llvm-svn: 172338
2013-01-13 01:09:39 +00:00
Nico Weber 2827a7ec6b Formatter: Don't insert a space before unary operators after selector names.
Before:
  [color getRed: &r green: &g blue: &b alpha: &a];

Now:
  [color getRed:&r green:&g blue:&b alpha:&a];

llvm-svn: 172337
2013-01-12 23:48:49 +00:00
Chandler Carruth 7e31c8f0ae Fix an editor goof in r171738 that Bill spotted. He may even have a test
case, but looking at the diff this was an obviously unintended change.

Thanks for the careful review Bill! =]

llvm-svn: 172336
2013-01-12 23:46:04 +00:00
Nico Weber 5c8709bc5e Formatter: Add a test for @selector in an ObjC method expression, which happens to work already.
llvm-svn: 172335
2013-01-12 23:41:33 +00:00
Nico Weber 92c0539135 Formatter: Remove debugging junk I accidentally landed in r172333.
llvm-svn: 172334
2013-01-12 22:51:13 +00:00
Nico Weber c9d7361173 Formatter: Prefer breaking before ObjC selector names over breaking at their ':'
Before:
  if ((self = [super initWithContentRect:contentRect styleMask:
                  styleMask backing:NSBackingStoreBuffered defer:YES])) {

Now:
  if ((self = [super initWithContentRect:contentRect styleMask:styleMask
                  backing:NSBackingStoreBuffered defer:YES])) {

llvm-svn: 172333
2013-01-12 22:48:47 +00:00
Dmitri Gribenko 813985b073 Add a comment to test to clarify the intention here
Comment is taken from the commit message of r151080, by Jean-Daniel Dupas

llvm-svn: 172332
2013-01-12 22:39:30 +00:00
Dmitri Gribenko 4b84153da2 Prune an unused diagnostic, detected after improving the script in r172330
llvm-svn: 172331
2013-01-12 21:58:21 +00:00
Benjamin Kramer 6590abb384 Speed up find-unused-diagnostics. Now runs in less than a second instead of more than a minute.
llvm-svn: 172330
2013-01-12 21:39:06 +00:00
Dmitri Gribenko e392a9f2b0 Remove unused diagnostics
llvm-svn: 172326
2013-01-12 20:32:43 +00:00
Tim Northover 4694b54f3f Use more canonical exception-handling link in docs.
llvm-svn: 172325
2013-01-12 19:54:21 +00:00
Bob Wilson 1b53bc78a3 Fix cross-compiling problems in build-llvm.pl script. <rdar://problem/12986905>
As with llvm svn r172138, this patch is basically copying some changes that
we've been using for building clang at Apple. Besides cleaning it up to use
xcrun to locate the proper versions of tools, especially for cross compiling,
it fixes the build to work with newer versions of clang that honor SDKROOT
settings in the environment.

llvm-svn: 172324
2013-01-12 19:33:08 +00:00
Dmitri Gribenko f857950d39 Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h

llvm-svn: 172323
2013-01-12 19:30:44 +00:00
Benjamin Kramer 5ea0349ef5 When lowering an inreg sext first shift left, then right arithmetically.
Shifting right two times will only yield zero. Should fix
SingleSource/UnitTests/SignlessTypes/factor.

llvm-svn: 172322
2013-01-12 19:06:44 +00:00
Arnaud A. de Grandmaison 3128a11ee8 Fix spurious output in JSONCompilationDatabase
llvm-svn: 172321
2013-01-12 18:37:52 +00:00
Dmitri Gribenko 1737bd3a92 Add missing includes and forward declarations so that headers don't depend on
other headers included before them.

llvm-svn: 172320
2013-01-12 16:54:37 +00:00
NAKAMURA Takumi de45c3a485 MipsDisassembler.cpp: Prune DecodeHWRegs64RegisterClass() to suppress a warning. [-Wunused-function]
llvm-svn: 172319
2013-01-12 15:37:00 +00:00
Benjamin Kramer 64a857ac69 GlobalOpt: Avoid jump on uninitialized value.
Found by valgrind.

llvm-svn: 172318
2013-01-12 15:34:31 +00:00
Rafael Espindola 6239e05adc comment
llvm-svn: 172317
2013-01-12 15:27:44 +00:00
Rafael Espindola c48f7341cc bar
llvm-svn: 172316
2013-01-12 15:27:43 +00:00
NAKAMURA Takumi 956c123ab6 MipsAsmParser: Try to unbreak tests to add extra check.
llvm-svn: 172315
2013-01-12 15:19:10 +00:00
Rafael Espindola 8f1187a11b Remove unused private field.
llvm-svn: 172314
2013-01-12 14:22:42 +00:00
Benjamin Kramer 410780b82c Add a unit test to verifies that attribute uniquing works so it doesn't break again.
The folding set details can be subtle and broke twice in the last couple of weeks.

llvm-svn: 172313
2013-01-12 14:13:45 +00:00
Tim Northover 53acb32afc Fix broken links around Itanium C++ ABI in documentation.
llvm-svn: 172312
2013-01-12 12:38:54 +00:00
Jason Molenda d7dc554c87 Recognize LOG_WATCHPOINTS in the QSetLogging gdb-remote packet.
llvm-svn: 172311
2013-01-12 08:32:28 +00:00
Daniel Jasper 7b7877ad7d Fix incorrect comparison operator causing loooong formatting times.
llvm-svn: 172308
2013-01-12 07:36:22 +00:00
Nico Weber cb465dcb1d Formatter: Remove an always-false condition.
canBreakBefore() does not allow breaking after ':' for LT_ObjCMethodDecl lines,
so if Newline is true in addTokenToState() for ':' then LT_ObjCMethodDecl
cannot be set. No functionality change.

llvm-svn: 172307
2013-01-12 07:05:25 +00:00
Nico Weber c7a56342bd Formatter: Remove a redundant CurrentLineType check.
The containing if checks for this already. No functionality change.

llvm-svn: 172306
2013-01-12 07:00:16 +00:00
Rafael Espindola 19de5613ea Disable caching of visibility.
The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).

Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).

llvm-svn: 172305
2013-01-12 06:42:30 +00:00
Nico Weber a7252d836a Formatter: Initial support for formatting Objective-C method expressions.
This follows the approach suggested by djasper in PR14911: When a '[' is         
seen that's at the start of a line, follows a binary operator, or follows one    
of : [ ( return throw, that '[' and its closing ']' are marked as
TT_ObjCMethodExpr and every ':' in that range that isn't part of a ternary
?: is marked as TT_ObjCMethodExpr as well.

Update the layout routines to not output spaces around ':' tokens that are
marked TT_ObjCMethodExpr, and only allow breaking after such tokens, not
before.

Before:
    [self adjustButton : closeButton_ ofKind : NSWindowCloseButton];

Now:
    [self adjustButton:closeButton_ ofKind:NSWindowCloseButton];

llvm-svn: 172304
2013-01-12 06:18:40 +00:00
Nico Weber eee7b81a16 Formatter: * and & are binary operators before ( and [.
llvm-svn: 172303
2013-01-12 05:50:48 +00:00