platform/upstream/llvm.git
11 years ago[analyzer] Do a better job describing C++ member functions in the call stack.
Jordan Rose [Fri, 18 Jan 2013 18:27:14 +0000 (18:27 +0000)]
[analyzer] Do a better job describing C++ member functions in the call stack.

Examples:
  Calling constructor for 'Foo'
  Entered call from 'Foo::create'

llvm-svn: 172832

11 years agoFix comment.
Manuel Klimek [Fri, 18 Jan 2013 18:24:28 +0000 (18:24 +0000)]
Fix comment.

llvm-svn: 172831

11 years agoFix a typo from r172289
Alexey Samsonov [Fri, 18 Jan 2013 17:03:47 +0000 (17:03 +0000)]
Fix a typo from r172289

llvm-svn: 172830

11 years agoCMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan
Alexey Samsonov [Fri, 18 Jan 2013 16:51:07 +0000 (16:51 +0000)]
CMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan

llvm-svn: 172829

11 years ago[ASan] Fix the log_path option to use different log files for parent and child proces...
Alexander Potapenko [Fri, 18 Jan 2013 16:44:27 +0000 (16:44 +0000)]
[ASan] Fix the log_path option to use different log files for parent and child processes after fork().

llvm-svn: 172828

11 years ago[sanitizer] Workaround broken mktemp on certain platforms.
Evgeniy Stepanov [Fri, 18 Jan 2013 16:24:50 +0000 (16:24 +0000)]
[sanitizer] Workaround broken mktemp on certain platforms.

llvm-svn: 172827

11 years agoCMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_l...
Alexey Samsonov [Fri, 18 Jan 2013 16:05:21 +0000 (16:05 +0000)]
CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function

llvm-svn: 172826

11 years ago[sanitizer] Enable cpplint for .inc files.
Evgeniy Stepanov [Fri, 18 Jan 2013 15:53:43 +0000 (15:53 +0000)]
[sanitizer] Enable cpplint for .inc files.

llvm-svn: 172825

11 years agoThe IR linker still depends on the bitcode reader.
Benjamin Kramer [Fri, 18 Jan 2013 15:03:03 +0000 (15:03 +0000)]
The IR linker still depends on the bitcode reader.

llvm-svn: 172824

11 years agollvm/test/CodeGen/X86/Atomics-64.ll: Tweak for 2nd RUN not to overwrite %t. It someti...
NAKAMURA Takumi [Fri, 18 Jan 2013 14:52:02 +0000 (14:52 +0000)]
llvm/test/CodeGen/X86/Atomics-64.ll: Tweak for 2nd RUN not to overwrite %t. It sometimes causes spurious failure on lit win32.

Feel free to prune or suppress each output.

llvm-svn: 172823

11 years agoFixes issues around pulling in the next line in simple if statements.
Manuel Klimek [Fri, 18 Jan 2013 14:46:43 +0000 (14:46 +0000)]
Fixes issues around pulling in the next line in simple if statements.

llvm-svn: 172822

11 years agoIntroduce llvm::sys::PrintStackTraceOnErrorSignal()
NAKAMURA Takumi [Fri, 18 Jan 2013 14:31:00 +0000 (14:31 +0000)]
Introduce llvm::sys::PrintStackTraceOnErrorSignal()

llvm-svn: 172821

11 years agoclang/test/CodeGen: Suppress a couple of tests on win32. It seems -fsanitize-blacklis...
NAKAMURA Takumi [Fri, 18 Jan 2013 14:11:04 +0000 (14:11 +0000)]
clang/test/CodeGen: Suppress a couple of tests on win32. It seems -fsanitize-blacklist doesn't accept DOSish pathnames.

llvm-svn: 172820

11 years agoFixes problems with line merging in the face of preprocessor directives.
Manuel Klimek [Fri, 18 Jan 2013 14:04:34 +0000 (14:04 +0000)]
Fixes problems with line merging in the face of preprocessor directives.

This patch prepares being able to test for and fix more problems (see
FIXME in the test for example).

Previously we would output unwrapped lines for preprocessor directives
at the point where we also parsed the hash token. Since often
projections only terminate (and thus output their own unwrapped line)
after peeking at the next token, this would lead to the formatter seeing
the preprocessor directives out-of-order (slightly earlier). To be able
to correctly identify lines to merge, the formatter needs a well-defined
order of unwrapped lines, which this patch introduces.

llvm-svn: 172819

11 years agoclang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()
NAKAMURA Takumi [Fri, 18 Jan 2013 13:46:48 +0000 (13:46 +0000)]
clang-check: Introduce llvm::sys::PrintStackTraceOnErrorSignal()

llvm-svn: 172818

11 years ago[sanitizer] lint
Evgeniy Stepanov [Fri, 18 Jan 2013 13:12:56 +0000 (13:12 +0000)]
[sanitizer] lint

llvm-svn: 172817

11 years agoCMake: start to generalize rules for non-x86 architectures
Alexey Samsonov [Fri, 18 Jan 2013 13:10:42 +0000 (13:10 +0000)]
CMake: start to generalize rules for non-x86 architectures

llvm-svn: 172816

11 years ago[asan] kill some dead code
Kostya Serebryany [Fri, 18 Jan 2013 13:01:44 +0000 (13:01 +0000)]
[asan] kill some dead code

llvm-svn: 172815

11 years ago[sanitizer] Rename 2 files *.h->*.inc as appropriate.
Evgeniy Stepanov [Fri, 18 Jan 2013 13:01:18 +0000 (13:01 +0000)]
[sanitizer] Rename 2 files *.h->*.inc as appropriate.

Also add a missing include.

llvm-svn: 172814

11 years ago80 columns
Alexey Samsonov [Fri, 18 Jan 2013 12:49:06 +0000 (12:49 +0000)]
80 columns

llvm-svn: 172813

11 years agoCMake variables renaming: X86_64->x86_64 I386->i386
Alexey Samsonov [Fri, 18 Jan 2013 12:45:44 +0000 (12:45 +0000)]
CMake variables renaming: X86_64->x86_64 I386->i386

llvm-svn: 172812

11 years ago[sanitizer] Remove an unused variable.
Evgeniy Stepanov [Fri, 18 Jan 2013 12:32:02 +0000 (12:32 +0000)]
[sanitizer] Remove an unused variable.

llvm-svn: 172811

11 years ago[ASan] Fix compilation on Mac.
Alexander Potapenko [Fri, 18 Jan 2013 12:31:16 +0000 (12:31 +0000)]
[ASan] Fix compilation on Mac.

llvm-svn: 172810

11 years ago[sanitizer] Fix Mac build.
Evgeniy Stepanov [Fri, 18 Jan 2013 11:38:23 +0000 (11:38 +0000)]
[sanitizer] Fix Mac build.

llvm-svn: 172809

11 years ago[ubsan] Add support for -fsanitize-blacklist
Will Dietz [Fri, 18 Jan 2013 11:30:38 +0000 (11:30 +0000)]
[ubsan] Add support for -fsanitize-blacklist

llvm-svn: 172808

11 years ago[asan] fix two off-by-one errors that seem to affect only PowerPC because only there...
Kostya Serebryany [Fri, 18 Jan 2013 11:30:36 +0000 (11:30 +0000)]
[asan] fix two off-by-one errors that seem to affect only PowerPC because only there the stack top may be equal to the address space top. Noted by Andreas Schwab in gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c11 . Also make swapcontext interceptor a bit more robust

llvm-svn: 172807

11 years agoMove Blacklist.h to include/ to enable use from clang.
Will Dietz [Fri, 18 Jan 2013 11:29:21 +0000 (11:29 +0000)]
Move Blacklist.h to include/ to enable use from clang.

llvm-svn: 172806

11 years ago[sanitizer] Common *scanf interceptors.
Evgeniy Stepanov [Fri, 18 Jan 2013 11:17:23 +0000 (11:17 +0000)]
[sanitizer] Common *scanf interceptors.

llvm-svn: 172805

11 years agoReduce penalty for splitting between ")" and ".".
Daniel Jasper [Fri, 18 Jan 2013 10:56:38 +0000 (10:56 +0000)]
Reduce penalty for splitting between ")" and ".".

').' is likely part of a builder pattern statement.
This is based upon a patch developed by Nico Weber. Thank you!

Before:
int foo() {
  return llvm::StringSwitch<Reference::Kind>(name).StartsWith(
      ".eh_frame_hdr", ORDER_EH_FRAMEHDR).StartsWith(
      ".eh_frame", ORDER_EH_FRAME).StartsWith(".init", ORDER_INIT).StartsWith(
      ".fini", ORDER_FINI).StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT);
}

After:
int foo() {
  return llvm::StringSwitch<Reference::Kind>(name)
         .StartsWith(".eh_frame_hdr", ORDER_EH_FRAMEHDR)
         .StartsWith(".eh_frame", ORDER_EH_FRAME)
         .StartsWith(".init", ORDER_INIT).StartsWith(".fini", ORDER_FINI)
         .StartsWith(".hash", ORDER_HASH).Default(ORDER_TEXT);
}

Probably not ideal, but makes many cases much more readable.

The changes to overriding-ftemplate-comments.cpp don't seem better or
worse. We should address those soon.

llvm-svn: 172804

11 years agoRemove references to pthread_workqueue_additem_np(), which isn't in the official...
Alexander Potapenko [Fri, 18 Jan 2013 10:27:31 +0000 (10:27 +0000)]
Remove references to pthread_workqueue_additem_np(), which isn't in the official libdispatch API.

llvm-svn: 172802

11 years agoAdd basic command line parsing to TestMain.
Manuel Klimek [Fri, 18 Jan 2013 10:18:50 +0000 (10:18 +0000)]
Add basic command line parsing to TestMain.

Summary:
This allows unit tests for components that use Support/Debug.h to print
debug information from test runs by specifying -debug when running the
test.

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D301

llvm-svn: 172801

11 years ago[ASan] fixes for Android build
Alexey Samsonov [Fri, 18 Jan 2013 09:20:06 +0000 (09:20 +0000)]
[ASan] fixes for Android build

llvm-svn: 172800

11 years agoAlso align trailing line comments in include directives.
Daniel Jasper [Fri, 18 Jan 2013 09:19:33 +0000 (09:19 +0000)]
Also align trailing line comments in include directives.

Before:
  #include <a> // for x
  #include <a/b/c> // for yz
After:
  #include <a>     // for x
  #include <a/b/c> // for yz

llvm-svn: 172799

11 years agoLet the formatter align trailing line comments where possible.
Daniel Jasper [Fri, 18 Jan 2013 08:44:07 +0000 (08:44 +0000)]
Let the formatter align trailing line comments where possible.

Before:
int a; // comment
int bbbbb; // comment

After:
int a;     // comment
int bbbbb; // comment

llvm-svn: 172798

11 years agoCalculate vector element size more directly for VINSERTF128/VEXTRACTF128 immediate...
Craig Topper [Fri, 18 Jan 2013 08:41:28 +0000 (08:41 +0000)]
Calculate vector element size more directly for VINSERTF128/VEXTRACTF128 immediate handling. Also use MVT since this only called on legal types during pattern matching.

llvm-svn: 172797

11 years agoMinor formatting fix. No functional change.
Craig Topper [Fri, 18 Jan 2013 07:27:20 +0000 (07:27 +0000)]
Minor formatting fix. No functional change.

llvm-svn: 172795

11 years agoRemove support for Tcl test format since nobody uses it
Dmitri Gribenko [Fri, 18 Jan 2013 06:57:01 +0000 (06:57 +0000)]
Remove support for Tcl test format since nobody uses it

llvm-svn: 172794

11 years agoSpelling fix: extened->extended. Trailing whitespace in same function.
Craig Topper [Fri, 18 Jan 2013 06:50:59 +0000 (06:50 +0000)]
Spelling fix: extened->extended. Trailing whitespace in same function.

llvm-svn: 172793

11 years agoMake more use of is128BitVector/is256BitVector in place of getSizeInBits() == 128...
Craig Topper [Fri, 18 Jan 2013 06:44:29 +0000 (06:44 +0000)]
Make more use of is128BitVector/is256BitVector in place of getSizeInBits() == 128/256.

llvm-svn: 172792

11 years ago[sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on...
Kostya Serebryany [Fri, 18 Jan 2013 06:43:13 +0000 (06:43 +0000)]
[sanitizer] reapply r172719, r172721-172723, r172725, and also fix the warning on Mac.

llvm-svn: 172791

11 years agoFormatter: After case blocks, "break" goes on the same line as the "}", PR14907.
Nico Weber [Fri, 18 Jan 2013 05:50:57 +0000 (05:50 +0000)]
Formatter: After case blocks, "break" goes on the same line as the "}", PR14907.

Before:
switch (foo) {
case a: {
  int a = g();
  h(a);
}
  break;
}

Now:
switch (foo) {
case a: {
  int a = g();
  h(a);
} break;
}

llvm-svn: 172789

11 years agoCheck for less than 0 in shuffle mask instead of -1. It's more consistent with other...
Craig Topper [Fri, 18 Jan 2013 05:30:07 +0000 (05:30 +0000)]
Check for less than 0 in shuffle mask instead of -1. It's more consistent with other code related to shuffles and easier to implement in compiled code.

llvm-svn: 172788

11 years agoFormatter: Enable @encode test.
Nico Weber [Fri, 18 Jan 2013 05:11:47 +0000 (05:11 +0000)]
Formatter: Enable @encode test.

This doesn't work right with pointers to pointers, but that's likely just a
dupe of PR14884.

llvm-svn: 172785

11 years agoRemove trailing whitespace. Remove new lines between closing brace and 'else'
Craig Topper [Fri, 18 Jan 2013 05:09:16 +0000 (05:09 +0000)]
Remove trailing whitespace. Remove new lines between closing brace and 'else'

llvm-svn: 172784

11 years agoRevert Clang r172620 and r172629, which caused a hang when building
Douglas Gregor [Fri, 18 Jan 2013 04:34:14 +0000 (04:34 +0000)]
Revert Clang r172620 and r172629, which caused a hang when building
complicated modules (<rdar://problem/13038265>). Unfortunately, this
un-fixes <rdar://problem/13016031>.

llvm-svn: 172783

11 years agoFixed 80+ violation.
Michael Gottesman [Fri, 18 Jan 2013 03:08:39 +0000 (03:08 +0000)]
Fixed 80+ violation.

llvm-svn: 172782

11 years agoFormatter: The contents of @selector() should be formatted as a selector.
Nico Weber [Fri, 18 Jan 2013 02:43:57 +0000 (02:43 +0000)]
Formatter: The contents of @selector() should be formatted as a selector.

Before: @selector(foo: )
Now: @selector(foo:)
llvm-svn: 172781

11 years agoWhen checking the parameter types of an Objective-C method, don't
Douglas Gregor [Fri, 18 Jan 2013 01:41:40 +0000 (01:41 +0000)]
When checking the parameter types of an Objective-C method, don't
decay the parameter type immediately; let CheckParameter() do its
job. Fixes <rdar://problem/12071218>.

llvm-svn: 172780

11 years ago[MC/Mach-O] Add support for linker options in Mach-O files.
Daniel Dunbar [Fri, 18 Jan 2013 01:26:07 +0000 (01:26 +0000)]
[MC/Mach-O] Add support for linker options in Mach-O files.

llvm-svn: 172779

11 years ago[MC/Mach-O] Add AsmParser support for .linker_option directive.
Daniel Dunbar [Fri, 18 Jan 2013 01:25:48 +0000 (01:25 +0000)]
[MC/Mach-O] Add AsmParser support for .linker_option directive.

llvm-svn: 172778

11 years ago[MC] Expose ParseEscapedString to target AsmParser implementations.
Daniel Dunbar [Fri, 18 Jan 2013 01:25:33 +0000 (01:25 +0000)]
[MC] Expose ParseEscapedString to target AsmParser implementations.

llvm-svn: 172777

11 years ago[MC] Fix 80-col violas.
Daniel Dunbar [Fri, 18 Jan 2013 01:25:25 +0000 (01:25 +0000)]
[MC] Fix 80-col violas.

llvm-svn: 172776

11 years ago<rdar://problem/12243932>
Jason Molenda [Fri, 18 Jan 2013 01:20:12 +0000 (01:20 +0000)]
<rdar://problem/12243932>
Change RNBSocket from using lockdown's lockdown_secure_checkin()
function to using lockdown's secure_lockdown_checkin() function.

llvm-svn: 172775

11 years ago[ms-inline asm] Test case for r172773.
Chad Rosier [Fri, 18 Jan 2013 00:51:29 +0000 (00:51 +0000)]
[ms-inline asm] Test case for r172773.

llvm-svn: 172774

11 years ago[ms-inline asm] Make the error message more generic now that we support the
Chad Rosier [Fri, 18 Jan 2013 00:50:59 +0000 (00:50 +0000)]
[ms-inline asm] Make the error message more generic now that we support the
'SIZE' and 'LENGTH' operators.

llvm-svn: 172773

11 years agowww: Add kernelgen publications
Tobias Grosser [Fri, 18 Jan 2013 00:26:39 +0000 (00:26 +0000)]
www: Add kernelgen publications

Contributed by: Dmitry Mikushin <dmitry@kernelgen.org>

llvm-svn: 172772

11 years agoAdd missing __isl_give
Tobias Grosser [Fri, 18 Jan 2013 00:09:42 +0000 (00:09 +0000)]
Add missing __isl_give

Contributed by: Sameer Abu Asal <sameer.abuasal@gmail.com>

llvm-svn: 172771

11 years agoOne can override an Objective-C ARC ownership qualifier that came from
Douglas Gregor [Thu, 17 Jan 2013 23:59:28 +0000 (23:59 +0000)]
One can override an Objective-C ARC ownership qualifier that came from
a template parameter; make that also include one that came from
'auto'. Fixes <rdar://problem/12078752>.

llvm-svn: 172770

11 years agoSome builtins do not evaluate their arguments. Teach EvaluatedExprVisitor not
Richard Smith [Thu, 17 Jan 2013 23:46:04 +0000 (23:46 +0000)]
Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor not
to visit them.

llvm-svn: 172769

11 years agoIn Objective-C ARC, completely ignore ownership qualifiers on the
Douglas Gregor [Thu, 17 Jan 2013 23:36:45 +0000 (23:36 +0000)]
In Objective-C ARC, completely ignore ownership qualifiers on the
return type of a function by canonicalizing them away. They are
useless anyway, and conflict with our rules for template argument
deduction and __strong. Fixes <rdar://problem/12367446>.

llvm-svn: 172768

11 years ago[analyzer] DirectIvarAssignment: allow suppression annotation on Ivars.
Anna Zaks [Thu, 17 Jan 2013 23:24:58 +0000 (23:24 +0000)]
[analyzer] DirectIvarAssignment: allow suppression annotation on Ivars.

llvm-svn: 172766

11 years agoDefer checking for unsequenced operations on the RHS of && and || in order to
Richard Smith [Thu, 17 Jan 2013 23:18:09 +0000 (23:18 +0000)]
Defer checking for unsequenced operations on the RHS of && and || in order to
reduce stack usage and hopefully bring back the linux x86_64 buildbot.

llvm-svn: 172765

11 years agoThe wchar_t and char1632_t test cases were erroneously running as x86_64 only even...
Enrico Granata [Thu, 17 Jan 2013 23:11:12 +0000 (23:11 +0000)]
The wchar_t and char1632_t test cases were erroneously running as x86_64 only even if you tried to run them in i386 mode

Courtesy of Daniel Malea for discovering this.

llvm-svn: 172764

11 years agoRevert r172719, r172721-172723, and r172725.
Jakob Stoklund Olesen [Thu, 17 Jan 2013 22:51:56 +0000 (22:51 +0000)]
Revert r172719, r172721-172723, and r172725.

The r172719 patch broke the build on Mac, the others depended on it.

compiler-rt/lib/asan/asan_interceptors.cc:78:13: error: unused function
      'SetThreadName' [-Werror,-Wunused-function]
      static void SetThreadName(const char *name) {

Orignal headlines:

  [asan] attempting to fix the Mac build
  [asan] restructure read/pread/pread64 tests
  [sanitizer] move write/pwrite/pwrite64 interceptors to common
  [msan] start using common interceptors in msan
  [tsan] move prctl interceptor from asan to common_interceptors thus enabling it for tsan too

llvm-svn: 172763

11 years agoFormat strings: don't ever convert %+d to %lu.
Jordan Rose [Thu, 17 Jan 2013 22:34:10 +0000 (22:34 +0000)]
Format strings: don't ever convert %+d to %lu.

Presumably, if the printf format has the sign explicitly requested, the user
wants to treat the data as signed.

This is a fix-up for r172739, and also includes several test changes that
didn't make it into that commit.

llvm-svn: 172762

11 years agoParsing support for C11's _Noreturn keyword. No semantics yet.
Richard Smith [Thu, 17 Jan 2013 22:16:11 +0000 (22:16 +0000)]
Parsing support for C11's _Noreturn keyword. No semantics yet.

llvm-svn: 172761

11 years ago-Wunsequenced: if the LHS of an &&, || or ?: is not constant, check for
Richard Smith [Thu, 17 Jan 2013 22:06:26 +0000 (22:06 +0000)]
-Wunsequenced: if the LHS of an &&, || or ?: is not constant, check for
unsequenced operations in the RHS. We don't compare the RHS with the rest of
the expression yet; such checks will need care to avoid diagnosing unsequenced
operations which are both in conditionally-evaluated subexpressions which
actually can't occur together, such as in '(b && ++x) + (!b && ++x)'.

llvm-svn: 172760

11 years ago[Linker] Drop some now-dead component dependencies.
Daniel Dunbar [Thu, 17 Jan 2013 22:05:18 +0000 (22:05 +0000)]
[Linker] Drop some now-dead component dependencies.

llvm-svn: 172759

11 years agoWe want the dwarf AT_producer for assembly source files to match clang's
Kevin Enderby [Thu, 17 Jan 2013 21:38:06 +0000 (21:38 +0000)]
We want the dwarf AT_producer for assembly source files to match clang's
AT_producer.  Which includes clang's version information so we can tell
which version of the compiler was used.

This is second of the two steps to allow us to do this.  The first was a
change to llvm-mc with revision 172630 to provide a method to set the
AT_producer string.  This second step has the clang driver passing the value
of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking
the integrated assembler on assembly source files.  Then using the new
setDwarfDebugProducer() method to set the AT_producer string.

rdar://12888242

llvm-svn: 172758

11 years ago<rdar://problem/12786725>
Enrico Granata [Thu, 17 Jan 2013 21:36:19 +0000 (21:36 +0000)]
<rdar://problem/12786725>

If there is any alive process being debugged, the user is asked for confirmation before quitting LLDB
This should prevent situations where the user mistakenly types "q" and LLDB slaughters their process without any mercy whatsoever
Since it can quickly get tedious, there is a new setting on the command interpreter to disable this and replicate the previous behavior

llvm-svn: 172757

11 years agoReverting r171325 & r172363. This was causing a mis-compile on the self-hosted LTO...
Bill Wendling [Thu, 17 Jan 2013 21:28:46 +0000 (21:28 +0000)]
Reverting r171325 & r172363. This was causing a mis-compile on the self-hosted LTO build bots.

Okay, here's how to reproduce the problem:

1) Build a Release (or Release+Asserts) version of clang in the normal way.

2) Using the clang & clang++ binaries from (1), build a Release (or
   Release+Asserts) version of the same sources, but this time enable LTO ---
   specify the `-flto' flag on the command line.

3) Run the ARC migrator tests:

    $ arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ ./src/tools/clang/test/ARCMT/cxx-rewrite.mm

You'll see that the output isn't correct (the whitespace is off).

The mis-compile is in the function `RewriteBuffer::RemoveText' in the
clang/lib/Rewrite/Core/Rewriter.cpp file. When that function and RewriteRope.cpp
are compiled with LTO and the `arcmt-test' executable is regenerated, you'll see
the error. When those files are not LTO'ed, then the output of the `arcmt-test'
is fine.

It is *really* hard to get a testcase out of this. I'll file a PR with what I
have currently.

--- Reverse-merging r172363 into '.':
U    include/llvm/Analysis/MemoryBuiltins.h
U    lib/Analysis/MemoryBuiltins.cpp

--- Reverse-merging r171325 into '.':
U    test/Transforms/InstCombine/objsize.ll
G    include/llvm/Analysis/MemoryBuiltins.h
G    lib/Analysis/MemoryBuiltins.cpp

llvm-svn: 172756

11 years agoConverting lambdas to plain old static function pointers
Enrico Granata [Thu, 17 Jan 2013 20:24:11 +0000 (20:24 +0000)]
Converting lambdas to plain old static function pointers

llvm-svn: 172755

11 years agoDo not pass -pie flag to linker if -shared specified. This matches
Peter Collingbourne [Thu, 17 Jan 2013 20:17:16 +0000 (20:17 +0000)]
Do not pass -pie flag to linker if -shared specified.  This matches
the gcc driver and makes it possible to add -pie to $CC or similar and
have it apply in the right places.

llvm-svn: 172753

11 years agoHarden this test a bit to work on the mac with ancient gdbs.
Eric Christopher [Thu, 17 Jan 2013 20:09:50 +0000 (20:09 +0000)]
Harden this test a bit to work on the mac with ancient gdbs.

llvm-svn: 172752

11 years agoReverting back to the fallback instead of using the 64-bit popcnt instruction as...
Aaron Ballman [Thu, 17 Jan 2013 20:04:28 +0000 (20:04 +0000)]
Reverting back to the fallback instead of using the 64-bit popcnt instruction as it doesn't exist on all x64 CPU architectures.

llvm-svn: 172751

11 years ago[Linker] Drop support for IR-level extended linking support (archives, etc.).
Daniel Dunbar [Thu, 17 Jan 2013 19:52:25 +0000 (19:52 +0000)]
[Linker] Drop support for IR-level extended linking support (archives, etc.).

 - This code is dead, and the "right" way to get this support is to use the
   platform-specific linker-integrated LTO mechanisms, or the forthcoming LLVM
   linker.

llvm-svn: 172749

11 years agoHave ReExec read environment from /proc/self/environ
Peter Collingbourne [Thu, 17 Jan 2013 19:50:42 +0000 (19:50 +0000)]
Have ReExec read environment from /proc/self/environ

It is possible for ReExec to be called before the C standard library
has initialised itself sufficiently for execv to work properly.
Fix this by parsing the environment ourselves and using execve.

Differential Revision: http://llvm-reviews.chandlerc.com/D304

llvm-svn: 172748

11 years agoRestore reverted test case, this time with REQUIRES: asserts
Bill Schmidt [Thu, 17 Jan 2013 19:46:51 +0000 (19:46 +0000)]
Restore reverted test case, this time with REQUIRES: asserts

llvm-svn: 172747

11 years agoRemove bad test case
Bill Schmidt [Thu, 17 Jan 2013 19:39:36 +0000 (19:39 +0000)]
Remove bad test case

llvm-svn: 172746

11 years agoThis patch fixes PR13626 by providing i128 support in the return
Bill Schmidt [Thu, 17 Jan 2013 19:34:57 +0000 (19:34 +0000)]
This patch fixes PR13626 by providing i128 support in the return
calling convention.  128-bit integers are now properly returned
in GPR3 and GPR4 on PowerPC.

llvm-svn: 172745

11 years ago[ms-inline asm] Updates and test case for r172743.
Chad Rosier [Thu, 17 Jan 2013 19:22:48 +0000 (19:22 +0000)]
[ms-inline asm] Updates and test case for r172743.
Part of rdar://12576868

llvm-svn: 172744

11 years ago[ms-inline asm] Add support for the 'SIZE' and 'LENGTH' operators.
Chad Rosier [Thu, 17 Jan 2013 19:21:48 +0000 (19:21 +0000)]
[ms-inline asm] Add support for the 'SIZE' and 'LENGTH' operators.
Part of rdar://12576868

llvm-svn: 172743

11 years ago[ms-inline asm] Extend the Sema interface to get the size and length of a
Chad Rosier [Thu, 17 Jan 2013 19:21:24 +0000 (19:21 +0000)]
[ms-inline asm] Extend the Sema interface to get the size and length of a
VarDecl.
Part of rdar://12576868

llvm-svn: 172742

11 years ago[docs] Get rid of some UTF8 characters (non-breaking space maybe).
Daniel Dunbar [Thu, 17 Jan 2013 18:57:32 +0000 (18:57 +0000)]
[docs] Get rid of some UTF8 characters (non-breaking space maybe).

llvm-svn: 172741

11 years ago[utils] Update find-rev utility to take a branch argument (name of the git-svn
Daniel Dunbar [Thu, 17 Jan 2013 18:57:21 +0000 (18:57 +0000)]
[utils] Update find-rev utility to take a branch argument (name of the git-svn
branch).

llvm-svn: 172740

11 years agoFormat strings: correct signedness if already correcting width (%d,%u).
Jordan Rose [Thu, 17 Jan 2013 18:47:16 +0000 (18:47 +0000)]
Format strings: correct signedness if already correcting width (%d,%u).

It is valid to do this:
  printf("%u", (int)x);

But if we see this:
  printf("%lu", (int)x);

...our fixit should suggest %d, not %u.

llvm-svn: 172739

11 years agoConvert test/FixIt/format-darwin.m to use relative line numbers.
Jordan Rose [Thu, 17 Jan 2013 18:47:12 +0000 (18:47 +0000)]
Convert test/FixIt/format-darwin.m to use relative line numbers.

llvm-svn: 172738

11 years agoAdd indexed load/store instructions for offset validation check.
Jyotsna Verma [Thu, 17 Jan 2013 18:42:37 +0000 (18:42 +0000)]
Add indexed load/store instructions for offset validation check.
This patch fixes bug 14902 - http://llvm.org/bugs/show_bug.cgi?id=14902

llvm-svn: 172737

11 years agoAdded missing const from my last commit.
Michael Gottesman [Thu, 17 Jan 2013 18:36:17 +0000 (18:36 +0000)]
Added missing const from my last commit.

llvm-svn: 172736

11 years ago[ObjCARC] Implemented operator<< for InstructionClass and changed a ``Visited'' Debug...
Michael Gottesman [Thu, 17 Jan 2013 18:32:34 +0000 (18:32 +0000)]
[ObjCARC] Implemented operator<< for InstructionClass and changed a ``Visited'' Debug message to use it.

llvm-svn: 172735

11 years agoReverting back to the fallback instead of using popcnt; this instruction doesn't...
Aaron Ballman [Thu, 17 Jan 2013 18:27:30 +0000 (18:27 +0000)]
Reverting back to the fallback instead of using popcnt; this instruction doesn't exist on all CPU architectures.  Fixes PR14982

llvm-svn: 172734

11 years agoThis patch fixes the PPC calling convention to handle returns of
Bill Schmidt [Thu, 17 Jan 2013 17:45:19 +0000 (17:45 +0000)]
This patch fixes the PPC calling convention to handle returns of
_Complex float and _Complex long double, by simply increasing the
number of floating point registers available for return values.

The test case verifies that the correct registers are loaded.

llvm-svn: 172733

11 years agoAdd some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not...
Joey Gouly [Thu, 17 Jan 2013 17:35:00 +0000 (17:35 +0000)]
Add some semantic checks for OpenCL. Variadic macros, VLAs and bitfields are not supported.

llvm-svn: 172732

11 years agoFormatter: Get bit tests in ifs right.
Nico Weber [Thu, 17 Jan 2013 17:17:19 +0000 (17:17 +0000)]
Formatter: Get bit tests in ifs right.

It's generally not possible to know if 'a' '*' 'b' is a multiplication
expression or a variable declaration with a purely lexer-based approach. The
formatter currently uses a heuristic that classifies this token sequence as a
multiplication in rhs contexts (after '=' or 'return') and as a declaration
else.

Because of this, it gets bit tests in ifs, such as "if (a & b)" wrong. However,
declarations in ifs always have to be followed by '=', so this patch changes
the formatter to classify '&' as an operator if it's at the start of an if
statement.

Before:
  if (a& b)
  if (int* b = f())

Now:
  if (a & b)
  if (int* b = f())

llvm-svn: 172731

11 years ago[ubsan] Add SANITIZER_INTERFACE_ATTRIBUTE to __ubsan_vptr_type_cache
Will Dietz [Thu, 17 Jan 2013 17:14:12 +0000 (17:14 +0000)]
[ubsan] Add SANITIZER_INTERFACE_ATTRIBUTE to __ubsan_vptr_type_cache

Missed this one previously.

llvm-svn: 172730

11 years agoDocumentation: formatting
Dmitri Gribenko [Thu, 17 Jan 2013 17:04:54 +0000 (17:04 +0000)]
Documentation: formatting

llvm-svn: 172729

11 years agoUnder GNU/Linux & HURD, add a soname to the liblldb shared library.
Sylvestre Ledru [Thu, 17 Jan 2013 16:59:32 +0000 (16:59 +0000)]
Under GNU/Linux & HURD, add a soname to the liblldb shared library.

llvm-svn: 172728

11 years ago[ASan] minor changes to swapcontext handling: don't clear shadow memory if context...
Alexey Samsonov [Thu, 17 Jan 2013 15:45:28 +0000 (15:45 +0000)]
[ASan] minor changes to swapcontext handling: don't clear shadow memory if context stack is too large

llvm-svn: 172727

11 years agoASan: Allow __asan_get_allocated_size(malloc(0)) to be 0 or 1
Alexey Samsonov [Thu, 17 Jan 2013 15:26:47 +0000 (15:26 +0000)]
ASan: Allow __asan_get_allocated_size(malloc(0)) to be 0 or 1

llvm-svn: 172726

11 years ago[asan] attempting to fix the Mac build
Kostya Serebryany [Thu, 17 Jan 2013 15:14:20 +0000 (15:14 +0000)]
[asan] attempting to fix the Mac build

llvm-svn: 172725