platform/upstream/llvm.git
11 years agoRe-format comments (and check commit access)
Yiannis Tsiouris [Thu, 28 Feb 2013 16:59:10 +0000 (16:59 +0000)]
Re-format comments (and check commit access)

llvm-svn: 176270

11 years agoUpdate CMakeLists.txt as per removed file
Daniel Malea [Thu, 28 Feb 2013 16:53:22 +0000 (16:53 +0000)]
Update CMakeLists.txt as per removed file

llvm-svn: 176269

11 years agoRemove LLDB dependency on xcodeworkspace (on Linux) for version number
Daniel Malea [Thu, 28 Feb 2013 16:51:15 +0000 (16:51 +0000)]
Remove LLDB dependency on xcodeworkspace (on Linux) for version number
- make LLDB version number match Clang (and the Debian package)
- use the same revision detection magic that Clang uses to report SVN/Git revisions
- update test case as per above

Example output:

  $ lldb -v
  lldb version 3.3 (https://dmalea@llvm.org/svn/llvm-project/lldb/trunk revision 176211 clang revision 176208 llvm revision 176208)
ss

This line, and those below, will be ignored--

M    source/lldb.cpp
M    test/help/TestHelp.py
M    source/Makefile

llvm-svn: 176268

11 years agoAdd doxygen support for the tools in clang-tools-extra
Dmitri Gribenko [Thu, 28 Feb 2013 16:46:40 +0000 (16:46 +0000)]
Add doxygen support for the tools in clang-tools-extra

Patch by Ariel Bernal.

llvm-svn: 176267

11 years agoIntroducing Use-Auto transform for cpp11-migrate
Edwin Vane [Thu, 28 Feb 2013 16:29:24 +0000 (16:29 +0000)]
Introducing Use-Auto transform for cpp11-migrate

The new Use-Auto transform replaces the type specifier for variable
declarations with the special C++11 'auto' type specifier. For now, the
replacement is done only for variables that are iterators of any of the
std containers and only if the type used is one of those explicitly
allowed by the standard (i.e. not an implementation-specific type).

Reviewers: gribozavr, silvas, klimek
llvm-svn: 176266

11 years ago[asan] Lower memory usage in LargeMallocTest on Android.
Evgeniy Stepanov [Thu, 28 Feb 2013 15:54:58 +0000 (15:54 +0000)]
[asan] Lower memory usage in LargeMallocTest on Android.

llvm-svn: 176264

11 years agoReduce penalty for splitting after "{" in static initializers.
Daniel Jasper [Thu, 28 Feb 2013 15:04:12 +0000 (15:04 +0000)]
Reduce penalty for splitting after "{" in static initializers.

This fixes llvm.org/PR15379.

Before:
const uint8_t aaaaaaaaaaaaaaaaaaaaaa[0] = { 0x00, 0x00, 0x00, 0x00, 0x00,
                                            0x00,                  // comment
                                            0x00, 0x00, 0x00, 0x00, 0x00,
                                            0x00,                  // comment
                                            0x00, 0x00, 0x00, 0x00 // comment
};

After:
const uint8_t aaaaaaaaaaaaaaaaaaaaaa[0] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // comment
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // comment
  0x00, 0x00, 0x00, 0x00              // comment
};

llvm-svn: 176262

11 years agoAArch64: remove post-encoder method from FCMP (immediate) instructions.
Tim Northover [Thu, 28 Feb 2013 14:46:14 +0000 (14:46 +0000)]
AArch64: remove post-encoder method from FCMP (immediate) instructions.

The work done by the post-encoder (setting architecturally unused bits to 0 as
required) can be done by the existing operand that covers the "#0.0". This
removes at least one use of the discouraged PostEncoderMethod uses.

llvm-svn: 176261

11 years agoDont break between (( in __attribute__((.
Daniel Jasper [Thu, 28 Feb 2013 14:44:25 +0000 (14:44 +0000)]
Dont break between (( in __attribute__((.

Before:
void aaaaaaaaaaaaaaaaaa() __attribute__(
    (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
     aaaaaaaaaaaaaaaaaaaaaaaaa));

After:
void aaaaaaaaaaaaaaaaaa()
    __attribute__((aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                   aaaaaaaaaaaaaaaaaaaaaaaaa));

llvm-svn: 176260

11 years agoAArch64: be more careful resorting to inefficient addressing for weak vars.
Tim Northover [Thu, 28 Feb 2013 14:36:31 +0000 (14:36 +0000)]
AArch64: be more careful resorting to inefficient addressing for weak vars.

If an otherwise weak var is actually defined in this unit, it can't be
undefined at runtime so we can use normal global variable sequences (ADRP/ADD)
to access it.

llvm-svn: 176259

11 years agoAArch64: don't drop GlobalAddress offset when handling extern_weak decls.
Tim Northover [Thu, 28 Feb 2013 14:36:24 +0000 (14:36 +0000)]
AArch64: don't drop GlobalAddress offset when handling extern_weak decls.

llvm-svn: 176258

11 years agoAdd the -disable-opt option to LTO. This adds:
Bill Wendling [Thu, 28 Feb 2013 14:11:10 +0000 (14:11 +0000)]
Add the -disable-opt option to LTO. This adds:

- Consistency with opt (which supports the same option with the same meaning and
  description).
- Debugging gold plugin-based linking without optimizations getting in the way.
- Debugging programs linked with the gold plugin while preserving the original
  debug info.
- Fine-grained control over LTO passes using the gold plugin in combination with
  opt (or clang/dragonegg).

Patch by Cristiano Giuffrida!

llvm-svn: 176257

11 years ago[ASan] Add the memcmp_strict flag (1 by default) that controls the behavior of access...
Alexander Potapenko [Thu, 28 Feb 2013 14:09:30 +0000 (14:09 +0000)]
[ASan] Add the memcmp_strict flag (1 by default) that controls the behavior of accessibility checks in memcmp.
1: memcmp(p1, p2, n) always checks n bytes
0: memcmp checks up to n bytes depending on whether the memory contents differ.

llvm-svn: 176256

11 years ago[asan] Enable allocator2 on Android.
Evgeniy Stepanov [Thu, 28 Feb 2013 14:07:01 +0000 (14:07 +0000)]
[asan] Enable allocator2 on Android.

llvm-svn: 176255

11 years agoImprove property metadata generation with the GNUstep runtime.
David Chisnall [Thu, 28 Feb 2013 13:59:29 +0000 (13:59 +0000)]
Improve property metadata generation with the GNUstep runtime.

llvm-svn: 176254

11 years agoAArch64: Use cbnz instead of cmp/b.ne pair for atomic operations.
Tim Northover [Thu, 28 Feb 2013 13:52:07 +0000 (13:52 +0000)]
AArch64: Use cbnz instead of cmp/b.ne pair for atomic operations.

llvm-svn: 176253

11 years agoNo spaces around pointers to members.
Daniel Jasper [Thu, 28 Feb 2013 13:40:17 +0000 (13:40 +0000)]
No spaces around pointers to members.

Before: (a ->* f)()
After:  (a->*f)()
llvm-svn: 176252

11 years agoFirst step towards adding a parent map to the ASTContext.
Manuel Klimek [Thu, 28 Feb 2013 13:21:39 +0000 (13:21 +0000)]
First step towards adding a parent map to the ASTContext.

This does not yet implement the LimitNode approach discussed.

The impact of this is an O(n) in the number of nodes in the AST
reduction of complexity for certain kinds of matchers (as otherwise the
parent map gets recreated for every new MatchFinder).

See FIXMEs in the comments for the direction of future work.

llvm-svn: 176251

11 years ago[asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses addresses...
Kostya Serebryany [Thu, 28 Feb 2013 12:28:37 +0000 (12:28 +0000)]
[asan] bump kMidMemEnd to 0x4fffffffffULL since in rare cases prelink uses addresses higher than 0x3fffffffff

llvm-svn: 176250

11 years ago[Sanitizer] Relax ThreadLister tests to allow possible pre-existing threads. Do prope...
Alexey Samsonov [Thu, 28 Feb 2013 11:33:51 +0000 (11:33 +0000)]
[Sanitizer] Relax ThreadLister tests to allow possible pre-existing threads. Do proper mutex destruction. Patch by Sergey Matveev

llvm-svn: 176249

11 years ago[msan] Lit tests for __attribute__((no_sanitize_memory)).
Evgeniy Stepanov [Thu, 28 Feb 2013 11:25:54 +0000 (11:25 +0000)]
[msan] Lit tests for __attribute__((no_sanitize_memory)).

llvm-svn: 176248

11 years ago[msan] Implement sanitize_memory attribute.
Evgeniy Stepanov [Thu, 28 Feb 2013 11:25:14 +0000 (11:25 +0000)]
[msan] Implement sanitize_memory attribute.

Shadow checks are disabled and memory loads always produce fully initialized
values in functions that don't have a sanitize_memory attribute. Value and
argument shadow is propagated as usual.

This change also updates blacklist behaviour to match the above.

llvm-svn: 176247

11 years agoImprove formatting of #defines.
Daniel Jasper [Thu, 28 Feb 2013 11:05:57 +0000 (11:05 +0000)]
Improve formatting of #defines.

Two improvements:
1) Always leave at least one space before "\". Otherwise is can look bad
   and there is a risk of unwillingly joining to characters to a different
   token.
2) Use the full column limit for single-line #defines.
   Fixes llvm.org/PR15148

llvm-svn: 176245

11 years agoFix bug when formatting "A<A<A>>".
Daniel Jasper [Thu, 28 Feb 2013 10:06:05 +0000 (10:06 +0000)]
Fix bug when formatting "A<A<A>>".

Before:
A<A<A>> ReadKansas(int aaaaaaaaaaaaaaaaaaaaaaaaaaa,
                     int aaaaaaaaaaaaaaaaaaaaaaa);
Before:
A<A<A>> ReadKansas(int aaaaaaaaaaaaaaaaaaaaaaaaaaa,
                   int aaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 176244

11 years agoCorrections for XFAIL armv5 tests
Renato Golin [Thu, 28 Feb 2013 10:05:10 +0000 (10:05 +0000)]
Corrections for XFAIL armv5 tests

Most of the tests that behave differently on llvm-arm-linux buildbot
did so becase the triple wasn't set correctly to armv5, so we can
revert most of the special behaviour added previously. Some tests
still need the special treatment, though.

llvm-svn: 176243

11 years agoFix incorrect recognition of bin-packing.
Daniel Jasper [Thu, 28 Feb 2013 09:39:12 +0000 (09:39 +0000)]
Fix incorrect recognition of bin-packing.

Before (in Google style):
Constructor()
    : aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(
          aaaaaa) {}

After:
Constructor()
    : aaaaa(aaaaaa),
      aaaaa(aaaaaa),
      aaaaa(aaaaaa),
      aaaaa(aaaaaa),
      aaaaa(aaaaaa) {}

llvm-svn: 176242

11 years agoFix spacing after binary operator as macro parameter.
Daniel Jasper [Thu, 28 Feb 2013 09:21:10 +0000 (09:21 +0000)]
Fix spacing after binary operator as macro parameter.

Before: COMPARE(a, == , b);
After:  COMPARE(a, ==, b);
llvm-svn: 176241

11 years agoRemove unused leftover declarations.
Evgeniy Stepanov [Thu, 28 Feb 2013 08:42:11 +0000 (08:42 +0000)]
Remove unused leftover declarations.

llvm-svn: 176240

11 years agoFix global overflow in types::lookupTypeForTypeSpecifier.
Evgeniy Stepanov [Thu, 28 Feb 2013 07:53:32 +0000 (07:53 +0000)]
Fix global overflow in types::lookupTypeForTypeSpecifier.

memcpy() is allowed to read entire contents of both memory areas.

Found with AddressSanitizer.

llvm-svn: 176237

11 years agoHoly macaroons, somebody made a copy of llvm/runtime/profile/GCDAProfiling.c,
Nick Lewycky [Thu, 28 Feb 2013 07:00:13 +0000 (07:00 +0000)]
Holy macaroons, somebody made a copy of llvm/runtime/profile/GCDAProfiling.c,
didn't delete the original, and now they've diverged. I have no idea what's
going on. Apply my patch in r176173 to this one too, this one looks newer?

llvm-svn: 176236

11 years agoEnable syntax highlighting for reStructuredText files.
Bill Wendling [Thu, 28 Feb 2013 06:43:24 +0000 (06:43 +0000)]
Enable syntax highlighting for reStructuredText files.
Patch by Journeyer J. Joh!

llvm-svn: 176235

11 years agoAdd the libdebugserver.cpp for creating a library that does debugserver
Jason Molenda [Thu, 28 Feb 2013 04:25:38 +0000 (04:25 +0000)]
Add the libdebugserver.cpp for creating a library that does debugserver
work.  There isn't any target in the xcode project file which will build
this yet.

llvm-svn: 176234

11 years agoFixed some problems with type deportation:
Sean Callanan [Thu, 28 Feb 2013 03:12:58 +0000 (03:12 +0000)]
Fixed some problems with type deportation:

  - made sure we tell Clang not to try to
    complete the type since it can't be
    completed from its origin any more; and

  - fixed a silly bug where we tried to
    forget about the original decl's origins
    rather than the deported decl's origin.

These produced some crashes in ptr_refs,
especially under libgmalloc.

<rdar://problem/13256150>

llvm-svn: 176233

11 years agoFixing the log line for SBValue::MightHaveChildren() to report the correct function...
Enrico Granata [Thu, 28 Feb 2013 02:26:12 +0000 (02:26 +0000)]
Fixing the log line for SBValue::MightHaveChildren() to report the correct function name

llvm-svn: 176232

11 years agothe log entry for SBThread::GetProcess() would not include the pointer to the process...
Enrico Granata [Thu, 28 Feb 2013 02:18:49 +0000 (02:18 +0000)]
the log entry for SBThread::GetProcess() would not include the pointer to the process because we were using the value of the (otherwise unused) process_sp - instead of fetching the SP from sb_process

llvm-svn: 176231

11 years ago[analyzer] RegionStore: collectSubRegionKeys -> collectSubRegionBindings
Jordan Rose [Thu, 28 Feb 2013 01:53:08 +0000 (01:53 +0000)]
[analyzer] RegionStore: collectSubRegionKeys -> collectSubRegionBindings

By returning the (key, value) binding pairs, we save lookups afterwards.
This also enables further work later on.

No functionality change.

llvm-svn: 176230

11 years ago[analyzer] Mark the root SVal class as isPodLike.
Jordan Rose [Thu, 28 Feb 2013 01:53:03 +0000 (01:53 +0000)]
[analyzer] Mark the root SVal class as isPodLike.

Pure optimization, no functionality change. Probably does not make much
of a difference, but it's free.

llvm-svn: 176229

11 years ago[Support][ErrorOr] Add support for implicit conversion from error code/condition...
Michael J. Spencer [Thu, 28 Feb 2013 01:44:26 +0000 (01:44 +0000)]
[Support][ErrorOr] Add support for implicit conversion from error code/condition enums.

llvm-svn: 176228

11 years agoAdd a test case, to make sure there is no crash on IRGen when using PCH
Argyrios Kyrtzidis [Thu, 28 Feb 2013 01:13:53 +0000 (01:13 +0000)]
Add a test case, to make sure there is no crash on IRGen when using PCH

Related to rdar://13114142

llvm-svn: 176227

11 years ago[PathV2] In llvm::sys::fs::unique_file, make sure it doesn't fall into an infinite...
Argyrios Kyrtzidis [Thu, 28 Feb 2013 00:38:19 +0000 (00:38 +0000)]
[PathV2] In llvm::sys::fs::unique_file, make sure it doesn't fall into an infinite loop by constantly trying
to create the parent path.

This can happen if the path is a relative filename and the current directory was removed.
Thanks to Daniel D. for the hint in fixing it.

llvm-svn: 176226

11 years agoFix a problem in alias analysis. It is about the misinterpretation of "Object".
Shuxin Yang [Thu, 28 Feb 2013 00:24:45 +0000 (00:24 +0000)]
Fix a problem in alias analysis. It is about the misinterpretation of "Object".

This problem is exposed by r171325 which is already reverted. It is rather
hard to fabricate a testing case without it.

r171325 should *NOT* be resurrected as it has a potential problem although
this problem dosen't directly contribute to PR14988.

The bug is tracked by:
  - rdar://13063553, and
  - http://llvm.org/bugs/show_bug.cgi?id=14988

Thank Arnold for coming up a better solution to this problem. After
comparing this solution and my original proposal, I decided to ditch mine.

llvm-svn: 176225

11 years agoRemove unnecessary check against isGlobalVariable. We check it
Eric Christopher [Wed, 27 Feb 2013 23:49:50 +0000 (23:49 +0000)]
Remove unnecessary check against isGlobalVariable. We check it
a few lines above.

llvm-svn: 176224

11 years agoRework comment slightly and fix a few typos.
Eric Christopher [Wed, 27 Feb 2013 23:49:47 +0000 (23:49 +0000)]
Rework comment slightly and fix a few typos.

llvm-svn: 176223

11 years agoRemove unnecessary cast to void.
Eric Christopher [Wed, 27 Feb 2013 23:49:45 +0000 (23:49 +0000)]
Remove unnecessary cast to void.

llvm-svn: 176222

11 years agoAvoiding flamewars
Renato Golin [Wed, 27 Feb 2013 23:21:44 +0000 (23:21 +0000)]
Avoiding flamewars

llvm-svn: 176221

11 years agoDebug Info: for static member variables, always put AT_MIPS_linkage_name to the
Manman Ren [Wed, 27 Feb 2013 23:21:02 +0000 (23:21 +0000)]
Debug Info: for static member variables, always put AT_MIPS_linkage_name to the
definition DIE (TAG_variable), and put AT_MIPS_linkage_name to TAG_member when
DarwinGDBCompat is true.

Darwin GDB needs AT_MIPS_linkage_name at both places to work.

Follow-up patch to r176143.
rdar://problem/13291234

llvm-svn: 176220

11 years agoSilence the unused variable warning.
Nadav Rotem [Wed, 27 Feb 2013 22:52:54 +0000 (22:52 +0000)]
Silence the unused variable warning.

llvm-svn: 176218

11 years agoFixed a case where the result of std::string's c_str() method was being called on...
Greg Clayton [Wed, 27 Feb 2013 22:51:58 +0000 (22:51 +0000)]
Fixed a case where the result of std::string's c_str() method was being called on a local variable and returned as a const char * incorrectly. We used to cache the thread names for threads in the current host process, but we shoudn't be caching that as the names can change over time, so now a std::string is returned from Host::GetThreadName().

llvm-svn: 176217

11 years agoPR15360: nullptr as a non-type template argument to a function type non-type template...
David Blaikie [Wed, 27 Feb 2013 22:10:40 +0000 (22:10 +0000)]
PR15360: nullptr as a non-type template argument to a function type non-type template parameter

llvm-svn: 176216

11 years agoAdd test coverage for array to pointer decay in non-type template parameters.
David Blaikie [Wed, 27 Feb 2013 22:10:37 +0000 (22:10 +0000)]
Add test coverage for array to pointer decay in non-type template parameters.

Functionality committed in r172585 but tested the function case without the
array case.

llvm-svn: 176215

11 years agoThe FastISEL should be fast. But when we record statistics we use atomic operations...
Nadav Rotem [Wed, 27 Feb 2013 21:59:43 +0000 (21:59 +0000)]
The FastISEL should be fast. But when we record statistics we use atomic operations to increment the counters.
This patch disables the counters on non-debug builds. This reduces the runtime of SelectionDAGISel::SelectCodeCommon by ~5%.

llvm-svn: 176214

11 years agoCopy missing member in DataLayout copy ctor.
David Blaikie [Wed, 27 Feb 2013 21:44:59 +0000 (21:44 +0000)]
Copy missing member in DataLayout copy ctor.

Test case is missing due to it not being reachable through the current tools
but out of tree code such as the sample at
http://llvm.org/docs/tutorial/LangImpl4.html

Patch by Peng Cheng <gm4cheng@gmail.com>

llvm-svn: 176213

11 years agoARM: FMA is legal only if VFP4 is available.
Jim Grosbach [Wed, 27 Feb 2013 21:31:12 +0000 (21:31 +0000)]
ARM: FMA is legal only if VFP4 is available.

rdar://13306723

llvm-svn: 176212

11 years agoAdd config manager to open projects
Renato Golin [Wed, 27 Feb 2013 21:28:29 +0000 (21:28 +0000)]
Add config manager to open projects

llvm-svn: 176211

11 years agoAdded eSymbolTypeResolver to a few switch statements that needed it.
Greg Clayton [Wed, 27 Feb 2013 21:16:04 +0000 (21:16 +0000)]
Added eSymbolTypeResolver to a few switch statements that needed it.

llvm-svn: 176210

11 years agoRemove this instance of dl as it's defined in a previous scope.
Chad Rosier [Wed, 27 Feb 2013 20:34:14 +0000 (20:34 +0000)]
Remove this instance of dl as it's defined in a previous scope.

llvm-svn: 176208

11 years ago[lld][ELF] Order segments
Shankar Easwaran [Wed, 27 Feb 2013 20:24:47 +0000 (20:24 +0000)]
[lld][ELF] Order segments

llvm-svn: 176207

11 years agoAdd GNU indirect function support in expressions for Linux.
Matt Kopec [Wed, 27 Feb 2013 20:13:38 +0000 (20:13 +0000)]
Add GNU indirect function support in expressions for Linux.

llvm-svn: 176206

11 years ago[test] Don't start elf-dump until lld-core is done writing the output.
Michael J. Spencer [Wed, 27 Feb 2013 20:01:43 +0000 (20:01 +0000)]
[test] Don't start elf-dump until lld-core is done writing the output.

llvm-svn: 176205

11 years agoReverted: r176136 - Have a way for a target to opt-out of target-independent fast...
Michael Ilseman [Wed, 27 Feb 2013 19:54:00 +0000 (19:54 +0000)]
Reverted: r176136 - Have a way for a target to opt-out of target-independent fast isel

llvm-svn: 176204

11 years agoCall Process::Finalize directly in Debugger::Destroy, rather than having it done
Jim Ingham [Wed, 27 Feb 2013 19:13:05 +0000 (19:13 +0000)]
Call Process::Finalize directly in Debugger::Destroy, rather than having it done
in the Process destructor.  Doing it there can be too late depending on what the internal state
and ProcessGDBRemote Async threads are doing.

<rdar://problem/13297536>

llvm-svn: 176203

11 years ago[analyzer] Fix test for previous commit.
Jordan Rose [Wed, 27 Feb 2013 18:57:20 +0000 (18:57 +0000)]
[analyzer] Fix test for previous commit.

llvm-svn: 176202

11 years ago[analyzer] Teach FindLastStoreBRVisitor to understand stores of the same value.
Jordan Rose [Wed, 27 Feb 2013 18:49:57 +0000 (18:49 +0000)]
[analyzer] Teach FindLastStoreBRVisitor to understand stores of the same value.

Consider this case:

  int *p = 0;
  p = getPointerThatMayBeNull();
  *p = 1;

If we inline 'getPointerThatMayBeNull', we might know that the value of 'p'
is NULL, and thus emit a null pointer dereference report. However, we
usually want to suppress such warnings as error paths, and we do so by using
FindLastStoreBRVisitor to see where the NULL came from. In this case, though,
because 'p' was NULL both before and after the assignment, the visitor
would decide that the "last store" was the initialization, not the
re-assignment.

This commit changes FindLastStoreBRVisitor to consider all PostStore nodes
that assign to this region. This still won't catches changes made directly
by checkers if they re-assign the same value, but it does handle the common
case in user-written code and will trigger ReturnVisitor's suppression
machinery as expected.

<rdar://problem/13299738>

llvm-svn: 176201

11 years ago[analyzer] Turn on C++ constructor inlining by default.
Jordan Rose [Wed, 27 Feb 2013 18:49:43 +0000 (18:49 +0000)]
[analyzer] Turn on C++ constructor inlining by default.

This enables constructor inlining for types with non-trivial destructors.
The plan is to enable destructor inlining within the next month, but that
needs further verification.

<rdar://problem/12295329>

llvm-svn: 176200

11 years ago[docs] Discuss manpage output.
Sean Silva [Wed, 27 Feb 2013 18:48:42 +0000 (18:48 +0000)]
[docs] Discuss manpage output.

llvm-svn: 176199

11 years ago[driver] The failure of any phase (e.g., preprocess, compile, assemble) for a
Chad Rosier [Wed, 27 Feb 2013 18:46:04 +0000 (18:46 +0000)]
[driver] The failure of any phase (e.g., preprocess, compile, assemble) for a
single translation unit should prevent later phases from executing.  Otherwise,
this generates lots of noise in build systems.  This a fallout from r173825.
Patch by Matthew Curtis <mcurtis@codeaurora.org>.
rdar://13298009

llvm-svn: 176198

11 years agoSwitching -1ULL to UINT64_MAX to fix MSVC warnings. Patch thanks to Peng Cheng!
Aaron Ballman [Wed, 27 Feb 2013 18:38:33 +0000 (18:38 +0000)]
Switching -1ULL to UINT64_MAX to fix MSVC warnings.  Patch thanks to Peng Cheng!

llvm-svn: 176197

11 years ago[docs] Provide pointer for building Sphinx docs.
Sean Silva [Wed, 27 Feb 2013 18:33:21 +0000 (18:33 +0000)]
[docs] Provide pointer for building Sphinx docs.

llvm-svn: 176195

11 years agoSuppressing MSVC warnings; patch thanks to Peng Cheng!
Aaron Ballman [Wed, 27 Feb 2013 18:25:41 +0000 (18:25 +0000)]
Suppressing MSVC warnings; patch thanks to Peng Cheng!

llvm-svn: 176193

11 years agoprint TLS segment
Shankar Easwaran [Wed, 27 Feb 2013 17:57:17 +0000 (17:57 +0000)]
print TLS segment

llvm-svn: 176192

11 years agoFix documentation comment in LoopConvert
Dmitri Gribenko [Wed, 27 Feb 2013 17:34:57 +0000 (17:34 +0000)]
Fix documentation comment in LoopConvert

Patch by Ariel Bernal

llvm-svn: 176191

11 years agoCleanup TestUniqueTypes.py and add getCompilerVersion() to test harness
Daniel Malea [Wed, 27 Feb 2013 17:29:46 +0000 (17:29 +0000)]
Cleanup TestUniqueTypes.py and add getCompilerVersion() to test harness
- pull up logic to get compiler version from TestUniqueTypes.py into lldbtest.py
- work around an GCC 4.6.3 issue

llvm-svn: 176190

11 years agoARM: permit full range of valid ADR immediates.
Tim Northover [Wed, 27 Feb 2013 16:43:09 +0000 (16:43 +0000)]
ARM: permit full range of valid ADR immediates.

This fixes an issue where trying to assemlbe valid ADR instructions would cause
LLVM to hit a failed assertion.

Patch by Keith Walker.

llvm-svn: 176189

11 years agoLoopVectorize: Vectorize math builtin calls.
Benjamin Kramer [Wed, 27 Feb 2013 15:24:19 +0000 (15:24 +0000)]
LoopVectorize: Vectorize math builtin calls.

This properly asks TargetLibraryInfo if a call is available and if it is, it
can be translated into the corresponding LLVM builtin. We don't vectorize sqrt()
yet because I'm not sure about the semantics for negative numbers. The other
intrinsic should be exact equivalents to the libm functions.

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

llvm-svn: 176188

11 years ago[Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64
Simon Atanasyan [Wed, 27 Feb 2013 14:55:49 +0000 (14:55 +0000)]
[Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64
(means n64 abi) to improve compatibility with GNU tools.
Patch by Jia Liu <proljc@gmail.com>.

llvm-svn: 176187

11 years agoBetter support for constructors with -cxx-abi microsoft, partly fixes PR12784
Timur Iskhodzhanov [Wed, 27 Feb 2013 13:46:31 +0000 (13:46 +0000)]
Better support for constructors with -cxx-abi microsoft, partly fixes PR12784

llvm-svn: 176186

11 years ago[asan] if calloc returns a freshly-mmaped memory, don't clear it with memset. Speeds...
Kostya Serebryany [Wed, 27 Feb 2013 13:38:19 +0000 (13:38 +0000)]
[asan] if calloc returns a freshly-mmaped memory, don't clear it with memset. Speeds up calloc-intensive code

llvm-svn: 176185

11 years agoCustom lit.site.cfg configuration for cpp11-migrate
Edwin Vane [Wed, 27 Feb 2013 13:09:24 +0000 (13:09 +0000)]
Custom lit.site.cfg configuration for cpp11-migrate

To afford hand-written tests access to any auto-generated headers, a
lit.site.cfg is now created for cpp11-migrate's test directory providing a new
config.substition. Tests can refer to %gen_root in the LIT script.

Removed use of --param clang_site_config. Not necessary when running
tests using the build system.

llvm-svn: 176184

11 years ago[Sanitizer] don't include missing header on Android
Alexey Samsonov [Wed, 27 Feb 2013 13:03:35 +0000 (13:03 +0000)]
[Sanitizer] don't include missing header on Android

llvm-svn: 176183

11 years ago[UBSan] Use common report decorator to print colorful diagnostics in UBSan, and be...
Alexey Samsonov [Wed, 27 Feb 2013 12:58:24 +0000 (12:58 +0000)]
[UBSan] Use common report decorator to print colorful diagnostics in UBSan, and be more consistent w/ Printf/RawWrite

llvm-svn: 176182

11 years agoMake the negative test of recordType depend on a specific record.
Manuel Klimek [Wed, 27 Feb 2013 11:56:58 +0000 (11:56 +0000)]
Make the negative test of recordType depend on a specific record.

Otherwise it'll break if there's a record type in the AST by default.

llvm-svn: 176181

11 years agoFix formatting of multiplications in array subscripts.
Daniel Jasper [Wed, 27 Feb 2013 11:43:50 +0000 (11:43 +0000)]
Fix formatting of multiplications in array subscripts.

Before:
a[a* a] = 1;

After:
a[a * a] = 1;

llvm-svn: 176180

11 years agoadd Linux syscall wrappers and ThreadLister to sanitizer_common
Kostya Serebryany [Wed, 27 Feb 2013 11:22:40 +0000 (11:22 +0000)]
add Linux syscall wrappers and ThreadLister to sanitizer_common

ThreadLister is a Linux-specific class for obtaining the thread IDs of a process from procfs (/proc/<pid>/task/). It will be used by leak checking code.
Also add several syscall wrappers which will be required by the same code that uses ThreadLister, but are not used in ThreadLister itself.
Patch by Sergey Matveev

llvm-svn: 176179

11 years ago[Sanitizer] Change driver behavior when linking with -fsanitize=thread and -fsanitize...
Alexey Samsonov [Wed, 27 Feb 2013 11:14:55 +0000 (11:14 +0000)]
[Sanitizer] Change driver behavior when linking with -fsanitize=thread and -fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers.

llvm-svn: 176178

11 years agoEnable bin-packing in Google style.
Daniel Jasper [Wed, 27 Feb 2013 09:47:53 +0000 (09:47 +0000)]
Enable bin-packing in Google style.

After some discussions, it seems that this is the better path in
the long run. Does not change Chromium style, as there, bin packing
is forbidden by the style guide.

Also fix two minor bugs wrt. formatting:
1. If a call parameter is a function call itself and is split before
   the "." or "->", split before the next parameter.
2. If a call parameter is string literal that has to be split onto
   two lines, split before the next parameter.

llvm-svn: 176177

11 years agoForgot that this file needs to be C89 not C99 thanks to MSVC. No functionality
Nick Lewycky [Wed, 27 Feb 2013 08:28:35 +0000 (08:28 +0000)]
Forgot that this file needs to be C89 not C99 thanks to MSVC. No functionality
change!

llvm-svn: 176176

11 years ago[asan] guard ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS definition with an #ifndef
Kostya Serebryany [Wed, 27 Feb 2013 08:28:24 +0000 (08:28 +0000)]
[asan] guard ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS definition with an #ifndef

llvm-svn: 176175

11 years agoUpdate clang for LLVM API change. No functionality change.
Nick Lewycky [Wed, 27 Feb 2013 06:22:58 +0000 (06:22 +0000)]
Update clang for LLVM API change. No functionality change.

llvm-svn: 176174

11 years agoIn GCC 4.7, function names are now forbidden from .gcda files. Support this by
Nick Lewycky [Wed, 27 Feb 2013 06:22:56 +0000 (06:22 +0000)]
In GCC 4.7, function names are now forbidden from .gcda files. Support this by
passing a null pointer to the function name in to GCDAProfiling, and add another
switch onto GCOVProfiling.

llvm-svn: 176173

11 years agoDoh, fix behaviour change introduced in r176168 which is tested in clang,
Nick Lewycky [Wed, 27 Feb 2013 06:21:30 +0000 (06:21 +0000)]
Doh, fix behaviour change introduced in r176168 which is tested in clang,
not llvm.

llvm-svn: 176172

11 years agoRevert r176166 because it broke one of the lit tests.
Nadav Rotem [Wed, 27 Feb 2013 05:56:20 +0000 (05:56 +0000)]
Revert r176166 because it broke one of the lit tests.

llvm-svn: 176171

11 years agoFor each function that we optimize we initialize a new list of lib functions. For...
Nadav Rotem [Wed, 27 Feb 2013 05:53:43 +0000 (05:53 +0000)]
For each function that we optimize we initialize a new list of lib functions. For each function name we malloc memory. This patch changes the Libcall map to use BumpPtrAllocator. Now we malloc only once. This speeds up instcombine by a few % on a large c++ program.

llvm-svn: 176170

11 years agofixing build error properly according to comment from David
Shankar Easwaran [Wed, 27 Feb 2013 05:53:38 +0000 (05:53 +0000)]
fixing build error properly according to comment from David

llvm-svn: 176169

11 years agoIRBuilder has grown all sorts of useful utility functions. Make use of them to
Nick Lewycky [Wed, 27 Feb 2013 05:46:30 +0000 (05:46 +0000)]
IRBuilder has grown all sorts of useful utility functions. Make use of them to
clean up this code a tiny bit. No functionality change.

llvm-svn: 176168

11 years agoadding a return to fix compilation error from buildbot, build #75
Shankar Easwaran [Wed, 27 Feb 2013 05:33:27 +0000 (05:33 +0000)]
adding a return to fix compilation error from buildbot, build #75

llvm-svn: 176167

11 years agostd::string to StringRef.
Nadav Rotem [Wed, 27 Feb 2013 05:23:56 +0000 (05:23 +0000)]
std::string to StringRef.

llvm-svn: 176166

11 years agoFix cut/paste error in a comment.
Reed Kotler [Wed, 27 Feb 2013 04:20:14 +0000 (04:20 +0000)]
Fix cut/paste error in a comment.

llvm-svn: 176165

11 years agoDon't cache the visibility of types.
Rafael Espindola [Wed, 27 Feb 2013 04:15:01 +0000 (04:15 +0000)]
Don't cache the visibility of types.

Since r175326 an implicitly hidden template argument can cause a template
installation to become hidden, even if the template itself has an explicit
default visibility. This requires that we keep track of "late" additions
of the visibility attribute.

This is hopefully the last followup change. It just removes the caching of
visibilities from types so that we can see new attributes even after a type has
been used.

llvm-svn: 176164

11 years agoUse the correct alignment for POD-member memcpys where the first field is a
Lang Hames [Wed, 27 Feb 2013 04:14:49 +0000 (04:14 +0000)]
Use the correct alignment for POD-member memcpys where the first field is a
bitfield. CGBitField::StorageAlignment holds the alignment in chars, but
emitMemcpy had been treating it as if it were held in bits, leading to
underaligned memcpys.

Related to PR15348.

Thanks very much to Chandler for the diagnosis.

llvm-svn: 176163

11 years agofixing typo in header file
Shankar Easwaran [Wed, 27 Feb 2013 04:02:30 +0000 (04:02 +0000)]
fixing typo in header file

llvm-svn: 176162