platform/upstream/llvm.git
11 years agoImplements equalsNode for Decl and Stmt.
Manuel Klimek [Thu, 7 Feb 2013 12:42:10 +0000 (12:42 +0000)]
Implements equalsNode for Decl and Stmt.

This is a powerful tool when doing iterative refined matches,
where another match is started inside the match callback of the first
one; this allows for example to find out whether the node was in
the condition or body of its parent if-statement.

llvm-svn: 174605

11 years ago[ASan] Fix a compilation warning.
Alexander Potapenko [Thu, 7 Feb 2013 12:00:40 +0000 (12:00 +0000)]
[ASan] Fix a compilation warning.

llvm-svn: 174604

11 years ago[ASan] Implement asan_mz_size(), asan_mz_force_lock() and asan_mz_force_unlock()...
Alexander Potapenko [Thu, 7 Feb 2013 11:40:03 +0000 (11:40 +0000)]
[ASan] Implement asan_mz_size(), asan_mz_force_lock() and asan_mz_force_unlock() for allocator2.
Switch to allocator2 on Darwin.

llvm-svn: 174603

11 years agoFDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian hosts.
NAKAMURA Takumi [Thu, 7 Feb 2013 10:57:42 +0000 (10:57 +0000)]
FDE::dumpHeader(): Forgot to fix one more formatting. It affected bigendian hosts.

llvm-svn: 174602

11 years agoAdd OpenCL samplers as Clang builtin types and check sampler related restrictions.
Guy Benyei [Thu, 7 Feb 2013 10:55:47 +0000 (10:55 +0000)]
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.

llvm-svn: 174601

11 years ago[sanitizer] OFF_T on Mac is u64.
Evgeniy Stepanov [Thu, 7 Feb 2013 09:52:43 +0000 (09:52 +0000)]
[sanitizer] OFF_T on Mac is u64.

llvm-svn: 174600

11 years ago[tsan] race_on_write test
Kostya Serebryany [Thu, 7 Feb 2013 09:48:17 +0000 (09:48 +0000)]
[tsan] race_on_write test

llvm-svn: 174599

11 years ago[sanitizer] Exclude off64_t test on mac.
Evgeniy Stepanov [Thu, 7 Feb 2013 09:34:08 +0000 (09:34 +0000)]
[sanitizer] Exclude off64_t test on mac.

llvm-svn: 174598

11 years ago[Sanitizer] include stddef.h for ptrdiff_t in interception type test
Alexey Samsonov [Thu, 7 Feb 2013 09:03:01 +0000 (09:03 +0000)]
[Sanitizer] include stddef.h for ptrdiff_t in interception type test

llvm-svn: 174597

11 years agoImplement aeabi_{f,d}cmp*.
Zonr Chang [Thu, 7 Feb 2013 08:29:47 +0000 (08:29 +0000)]
Implement aeabi_{f,d}cmp*.

Special thanks to Anton for the review.

llvm-svn: 174596

11 years ago[msan] add strip_path_prefix flag; print error summary; don't crash while printing...
Kostya Serebryany [Thu, 7 Feb 2013 08:04:56 +0000 (08:04 +0000)]
[msan] add strip_path_prefix flag; print error summary; don't crash while printing summary if debug info is missing. The tests will follow later once we establish the lit-like tests for msan.

llvm-svn: 174595

11 years ago[sanitizer] Add a missing header.
Evgeniy Stepanov [Thu, 7 Feb 2013 07:43:41 +0000 (07:43 +0000)]
[sanitizer] Add a missing header.

llvm-svn: 174594

11 years ago[sanitizer] Fix wrong size of OFF_T on 32-bit platforms.
Evgeniy Stepanov [Thu, 7 Feb 2013 07:37:12 +0000 (07:37 +0000)]
[sanitizer] Fix wrong size of OFF_T on 32-bit platforms.

This broke pread/pwrite interceptors when building without
-D_FILE_OFFSET_BITS=64, and always on Android.

llvm-svn: 174593

11 years ago[docs] lld self hosts.
Michael J. Spencer [Thu, 7 Feb 2013 07:26:45 +0000 (07:26 +0000)]
[docs] lld self hosts.

llvm-svn: 174592

11 years agoRemove this testcase until I can figure out how to properly conditionalize it.
Owen Anderson [Thu, 7 Feb 2013 07:01:54 +0000 (07:01 +0000)]
Remove this testcase until I can figure out how to properly conditionalize it.

llvm-svn: 174591

11 years ago[Driver] Add -L and -l support.
Michael J. Spencer [Thu, 7 Feb 2013 06:47:17 +0000 (06:47 +0000)]
[Driver] Add -L and -l support.

llvm-svn: 174590

11 years ago[Driver] Replace Target with TargetInfo. Simplify LinkerInput.
Michael J. Spencer [Thu, 7 Feb 2013 06:46:48 +0000 (06:46 +0000)]
[Driver] Replace Target with TargetInfo. Simplify LinkerInput.

This removes Target and moves the functionality it had over to TargetInfo.

This also simplifies LinkerInput by removing the InputKind. This will be handled elsewhere.

llvm-svn: 174589

11 years agoAnother attempt at getting the XFAIL line right for this test.
Owen Anderson [Thu, 7 Feb 2013 06:26:55 +0000 (06:26 +0000)]
Another attempt at getting the XFAIL line right for this test.

llvm-svn: 174588

11 years ago[ReleaseNotes] tidy up organization and formatting
Sean Silva [Thu, 7 Feb 2013 05:56:46 +0000 (05:56 +0000)]
[ReleaseNotes] tidy up organization and formatting

llvm-svn: 174587

11 years agoUpdate Release notes regarding TTI.
Nadav Rotem [Thu, 7 Feb 2013 05:44:58 +0000 (05:44 +0000)]
Update Release notes regarding TTI.

llvm-svn: 174586

11 years agoDocument the loop vectorizer changes.
Nadav Rotem [Thu, 7 Feb 2013 05:42:31 +0000 (05:42 +0000)]
Document the loop vectorizer changes.

llvm-svn: 174585

11 years agoApply the pure-virtual odr rule to other constructs which can call overloaded
Nick Lewycky [Thu, 7 Feb 2013 05:08:22 +0000 (05:08 +0000)]
Apply the pure-virtual odr rule to other constructs which can call overloaded
operators.

llvm-svn: 174584

11 years agoMake sure we call externals from libraries properly when -static.
Reed Kotler [Thu, 7 Feb 2013 04:34:51 +0000 (04:34 +0000)]
Make sure we call externals from libraries properly when -static.
For example, when we are doing mips16 hard float or soft float.

llvm-svn: 174583

11 years agotblgen: Diagnose duplicate includes.
Sean Silva [Thu, 7 Feb 2013 04:30:39 +0000 (04:30 +0000)]
tblgen: Diagnose duplicate includes.

A double inclusion will pretty much always be an error in TableGen, so
there's no point going on just to die with "def already defined" or
whatnot.

I'm not too thrilled about the "public: ... private: ..." to expose the
DependenciesMapTy, but I really didn't see a better way to keep that
type centralized. It's a smell that indicates that some refactoring is
needed to make this code more loosely coupled.

This should avoid all bugs of the same nature as PR15189.

llvm-svn: 174582

11 years agoMoved some comments due to the recent refactoring of ObjCARC.
Michael Gottesman [Thu, 7 Feb 2013 04:12:57 +0000 (04:12 +0000)]
Moved some comments due to the recent refactoring of ObjCARC.

1. Moved a comment from ObjCARCOpts.cpp -> ObjCARCContract.cpp.
2. Removed a comment from ObjCARCOpts.cpp that was already moved to
ObjCARCAliasAnalysis.h/.cpp.

llvm-svn: 174581

11 years agoEnable jumps when in -static mode.
Reed Kotler [Thu, 7 Feb 2013 03:49:51 +0000 (03:49 +0000)]
Enable jumps when in -static mode.

llvm-svn: 174580

11 years agoAddress sanitizer found an issue which we filed a bug for: <rdar://problem/13168967>
Greg Clayton [Thu, 7 Feb 2013 03:41:30 +0000 (03:41 +0000)]
Address sanitizer found an issue which we filed a bug for: <rdar://problem/13168967>

llvm-svn: 174579

11 years agoFixed an bug found by running LLDB with the address sanitizer! We were accessing...
Greg Clayton [Thu, 7 Feb 2013 03:38:34 +0000 (03:38 +0000)]
Fixed an bug found by running LLDB with the address sanitizer! We were accessing one past the end of the buffer.

llvm-svn: 174578

11 years agoFix handling of module imports adding names to a DeclContext after qualified
Richard Smith [Thu, 7 Feb 2013 03:37:08 +0000 (03:37 +0000)]
Fix handling of module imports adding names to a DeclContext after qualified
name lookup has been performed in that context (this probably only happens in
C++).

1) Whenever we add names to a context, set a flag on it, and if we perform
lookup and discover that the context has had a lookup table built but has the
flag set, update all entries in the lookup table with additional names from
the external source.

2) When marking a DeclContext as having external visible decls, mark the
context in which lookup is performed, not the one we are adding. These won't
be the same if we're adding another copy of a pre-existing namespace.

llvm-svn: 174577

11 years agoSimplify FindExternalVisibleDeclsByName by making it return a bool indicating
Richard Smith [Thu, 7 Feb 2013 03:30:24 +0000 (03:30 +0000)]
Simplify FindExternalVisibleDeclsByName by making it return a bool indicating
if it found any decls, rather than returning a list of found decls. This
removes a returning-ArrayRef-to-deleted-storage bug from
MultiplexExternalSemaSource (in code not exercised by any of the clang
binaries), reduces the work required in the found-no-decls case with PCH, and
importantly removes the need for DeclContext::lookup to be reentrant.

No functionality change intended!

llvm-svn: 174576

11 years ago-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable...
Alexander Kornienko [Thu, 7 Feb 2013 02:17:19 +0000 (02:17 +0000)]
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly.

Summary:
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly:

1. In actual unreachable code, but not immediately on a fall-through execution
path "fallthrough annotation does not directly precede switch label" is better;
2. After default: in a switch with covered enum cases. Actually, these shouldn't
be treated as unreachable code for our purpose.

Reviewers: rsmith

Reviewed By: rsmith

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

llvm-svn: 174575

11 years agoDWARFDebugFrame.cpp: Fix formatting on i686 hosts.
NAKAMURA Takumi [Thu, 7 Feb 2013 02:02:27 +0000 (02:02 +0000)]
DWARFDebugFrame.cpp: Fix formatting on i686 hosts.

FIXME: Are they really truncated to i32 from i64 unconditionally?
llvm-svn: 174574

11 years agoobjective-C modern translator. Fix up the translated
Fariborz Jahanian [Thu, 7 Feb 2013 01:53:15 +0000 (01:53 +0000)]
objective-C modern translator. Fix up the translated
metadata to handle ivar bitfields. This is wip.
// rdar://13138459

llvm-svn: 174573

11 years ago80-col
Michael J. Spencer [Thu, 7 Feb 2013 01:43:18 +0000 (01:43 +0000)]
80-col

llvm-svn: 174572

11 years agoPreserve fast-math flags after reassociation and commutation. Update test cases
Michael Ilseman [Thu, 7 Feb 2013 01:40:15 +0000 (01:40 +0000)]
Preserve fast-math flags after reassociation and commutation. Update test cases

llvm-svn: 174571

11 years agoAST dumping: indicate the previous declaration for a redeclaration, and
Richard Smith [Thu, 7 Feb 2013 01:35:44 +0000 (01:35 +0000)]
AST dumping: indicate the previous declaration for a redeclaration, and
indicate the semantic DC if it's not the lexical DC. In passing, correct
the ascii-art child marker for a child of a FriendDecl.

llvm-svn: 174570

11 years agowhitespace
Michael Ilseman [Thu, 7 Feb 2013 01:27:13 +0000 (01:27 +0000)]
whitespace

llvm-svn: 174569

11 years ago[Object][ELF] Do the actual devirtualization.
Michael J. Spencer [Thu, 7 Feb 2013 01:24:22 +0000 (01:24 +0000)]
[Object][ELF] Do the actual devirtualization.

llvm-svn: 174568

11 years agoBe a little more permissive with -fmodules-ignore-macro= by removing everything after...
Douglas Gregor [Thu, 7 Feb 2013 01:18:48 +0000 (01:18 +0000)]
Be a little more permissive with -fmodules-ignore-macro= by removing everything after the second '=' if it is there.

llvm-svn: 174567

11 years ago[Object][ELF] Devirtualize and simplify dynamic table iteration.
Michael J. Spencer [Thu, 7 Feb 2013 01:17:23 +0000 (01:17 +0000)]
[Object][ELF] Devirtualize and simplify dynamic table iteration.

llvm-svn: 174566

11 years agoAdd a *San + modules FIXME.
Richard Smith [Thu, 7 Feb 2013 01:09:29 +0000 (01:09 +0000)]
Add a *San + modules FIXME.

llvm-svn: 174565

11 years agoFix CMake detection of various cmath functions, and XFAIL the test on platforms that...
Owen Anderson [Thu, 7 Feb 2013 00:54:05 +0000 (00:54 +0000)]
Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.

llvm-svn: 174564

11 years ago[build/Darwin] Use the correct libc++abi reexport list.
Daniel Dunbar [Thu, 7 Feb 2013 00:24:19 +0000 (00:24 +0000)]
[build/Darwin] Use the correct libc++abi reexport list.

 - This updates the build script to match the change originally in r149634, so
   that we re-export symbols from libc++abi appropriately.

llvm-svn: 174563

11 years ago[build] Detabify.
Daniel Dunbar [Thu, 7 Feb 2013 00:24:17 +0000 (00:24 +0000)]
[build] Detabify.

llvm-svn: 174562

11 years agoConditionalize constant folding of math intrinsics on the availability of an implemen...
Owen Anderson [Thu, 7 Feb 2013 00:21:34 +0000 (00:21 +0000)]
Conditionalize constant folding of math intrinsics on the availability of an implementation on the host.  This is a little bit unfortunate, but until someone decides to implement a full libm for APFloat, we don't have a better way to get this functionality.

llvm-svn: 174561

11 years agoIntroduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.
Douglas Gregor [Thu, 7 Feb 2013 00:21:12 +0000 (00:21 +0000)]
Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.

The use of this flag enables a modules optimization where a given set
of macros can be labeled as "ignored" by the modules
system. Definitions of those macros will be completely ignored when
building the module hash and will be stripped when actually building
modules. The overall effect is that this flag can be used to
drastically reduce the number of

Eventually, we'll want modules to tell us what set of macros they
respond to (the "configuration macros"), and anything not in that set
will be excluded. However, that requires a lot of per-module
information that must be accurate, whereas this option can be used
more readily.

Fixes the rest of <rdar://problem/13165109>.

llvm-svn: 174560

11 years agoFormatter: Move ObjC literal tests to its own test case.
Nico Weber [Thu, 7 Feb 2013 00:19:29 +0000 (00:19 +0000)]
Formatter: Move ObjC literal tests to its own test case.

Slightly expand the boxed expressions test with a few more snippets from
http://clang.llvm.org/docs/ObjectiveCLiterals.html

llvm-svn: 174559

11 years agoBe ready for fully qualified hash names in the __apples_types tables.
Greg Clayton [Wed, 6 Feb 2013 23:56:13 +0000 (23:56 +0000)]
Be ready for fully qualified hash names in the __apples_types tables.

llvm-svn: 174558

11 years agoFixed a problem that would cause LLDB to crash
Sean Callanan [Wed, 6 Feb 2013 23:21:59 +0000 (23:21 +0000)]
Fixed a problem that would cause LLDB to crash
if it encountered bad debug information.  This
debug information had an Objective-C method whose
selector disagreed with the true number of arguments
to that method.

<rdar://problem/12992864>

llvm-svn: 174557

11 years agoRemoved debug print line I left in.
Greg Clayton [Wed, 6 Feb 2013 22:52:04 +0000 (22:52 +0000)]
Removed debug print line I left in.

llvm-svn: 174556

11 years agoSignficantly generalize our ability to constant fold floating point intrinsics, inclu...
Owen Anderson [Wed, 6 Feb 2013 22:43:31 +0000 (22:43 +0000)]
Signficantly generalize our ability to constant fold floating point intrinsics, including ones on half types.

llvm-svn: 174555

11 years agoDetect when we end up trying to load conflicting module files.
Douglas Gregor [Wed, 6 Feb 2013 22:40:31 +0000 (22:40 +0000)]
Detect when we end up trying to load conflicting module files.

This can happen when one abuses precompiled headers by passing more -D
options when using a precompiled hedaer than when it was built. This
is intentionally permitted by precompiled headers (and is exploited by
some build environments), but causes problems for modules.

First part of <rdar://problem/13165109>, detecting when something when
horribly wrong.

llvm-svn: 174554

11 years agoFix typo
Eli Bendersky [Wed, 6 Feb 2013 22:34:46 +0000 (22:34 +0000)]
Fix typo

llvm-svn: 174553

11 years ago[Support][ErrorOr] Add support for convertable types.
Michael J. Spencer [Wed, 6 Feb 2013 22:28:53 +0000 (22:28 +0000)]
[Support][ErrorOr] Add support for convertable types.

Thanks to Andrew, David, and Aaron for helping fix this.

llvm-svn: 174552

11 years agoAdd a comment to the test that points to the source from which the input object
Eli Bendersky [Wed, 6 Feb 2013 22:17:40 +0000 (22:17 +0000)]
Add a comment to the test that points to the source from which the input object
file was generated.

llvm-svn: 174551

11 years agoCode Custodian (trivial whitespace cleanup)
Joe Abbey [Wed, 6 Feb 2013 22:14:06 +0000 (22:14 +0000)]
Code Custodian (trivial whitespace cleanup)

llvm-svn: 174550

11 years agoFix bug in the alignment of comments.
Daniel Jasper [Wed, 6 Feb 2013 22:04:05 +0000 (22:04 +0000)]
Fix bug in the alignment of comments.

Before:
const char *test[] = {
  // A
  "aaaa",
               // B
  "aaaaa",
};

After:
const char *test[] = {
  // A
  "aaaa",
  // B
  "aaaaa",
};

llvm-svn: 174549

11 years agoClean up multiple skeleton compile units if we have multiple compile
Eric Christopher [Wed, 6 Feb 2013 21:53:56 +0000 (21:53 +0000)]
Clean up multiple skeleton compile units if we have multiple compile
units coming in.

llvm-svn: 174548

11 years agoRemove some dead code.
Eric Christopher [Wed, 6 Feb 2013 21:53:53 +0000 (21:53 +0000)]
Remove some dead code.

llvm-svn: 174547

11 years ago[mips] Make NOP a pseudo instruction and expand it to "sll $zero, $zero, 0".
Akira Hatanaka [Wed, 6 Feb 2013 21:50:15 +0000 (21:50 +0000)]
[mips] Make NOP a pseudo instruction and expand it to "sll $zero, $zero, 0".

llvm-svn: 174546

11 years agoBecome a little smarter with formatting long chains of pipes.
Daniel Jasper [Wed, 6 Feb 2013 21:04:05 +0000 (21:04 +0000)]
Become a little smarter with formatting long chains of pipes.

Assign a high penalty to breaking before "<<" if the previous token is a
string literal ending in ":" or "=".

Before:
llvm::outs()
    << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa << "bbbbbbbbbbbbbbbbb = "
    << bbbbbbbbbbbbbbbbb << "ccccccccccccccccc = " << ccccccccccccccccc
    << "ddddddddddddddddd = " << ddddddddddddddddd << "eeeeeeeeeeeeeeeee = "
    << eeeeeeeeeeeeeeeee;

After:
llvm::outs() << "aaaaaaaaaaaaaaaaa = " << aaaaaaaaaaaaaaaaa
             << "bbbbbbbbbbbbbbbbb = " << bbbbbbbbbbbbbbbbb
             << "ccccccccccccccccc = " << ccccccccccccccccc
             << "ddddddddddddddddd = " << ddddddddddddddddd
             << "eeeeeeeeeeeeeeeee = " << eeeeeeeeeeeeeeeee;

llvm-svn: 174545

11 years agoMarcin Zalewski: Change the name of a template parameter in __copy_backward from...
Howard Hinnant [Wed, 6 Feb 2013 21:03:39 +0000 (21:03 +0000)]
Marcin Zalewski:  Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.

llvm-svn: 174544

11 years agoAdd a test for checking the current .debug_frame dumping capability.
Eli Bendersky [Wed, 6 Feb 2013 20:55:06 +0000 (20:55 +0000)]
Add a test for checking the current .debug_frame dumping capability.

The test is a binary placed in test/DebugInfo/Inputs, with a source C
file used for reference/reproducing. The source's first line is a clang
build command for reproducing the binary.

llvm-svn: 174543

11 years agoThis is a follow-up on r174446, now taking Atom processors into
Eli Bendersky [Wed, 6 Feb 2013 20:43:57 +0000 (20:43 +0000)]
This is a follow-up on r174446, now taking Atom processors into
account. Atoms use LEA for updating SP in prologs/epilogs, and the
exact LEA opcode depends on the data model.

Also reapplying the test case which was added and then reverted
(because of Atom failures), this time specifying explicitly the CPU in
addition to the triple. The test case now checks all variations (data
mode, cpu Atom vs. Core).

llvm-svn: 174542

11 years agoCanonicalize line endings to Linux style also when the --strict-whitespace flag is...
Guy Benyei [Wed, 6 Feb 2013 20:40:38 +0000 (20:40 +0000)]
Canonicalize line endings to Linux style also when the --strict-whitespace flag is in use. This flag is supposed to affect horizontal whitespaces only.

llvm-svn: 174541

11 years agoCleanup of ASTMatcher macros and adding support for overloaded matchers.
Manuel Klimek [Wed, 6 Feb 2013 20:36:22 +0000 (20:36 +0000)]
Cleanup of ASTMatcher macros and adding support for overloaded matchers.

This is in preparation for adding other overloaded matchers. This change
alone is a net win in LOC.
I went through all matchers and looked whether we could now encode them
as macro, or simplify them with the matcher atoms that were not
available before.

llvm-svn: 174540

11 years agoGive a lot more timing latitude to some of the timing tests. Busy buildbots are hitti...
Howard Hinnant [Wed, 6 Feb 2013 20:25:56 +0000 (20:25 +0000)]
Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitting the timing limits too often.

llvm-svn: 174539

11 years ago[tests] Infer the cxx_under_test (as clang++).
Daniel Dunbar [Wed, 6 Feb 2013 20:24:23 +0000 (20:24 +0000)]
[tests] Infer the cxx_under_test (as clang++).

 - This is a reasonable default, and makes testing just work with no required
   parameters.

 - Add notes on all of the inferred or default values.

llvm-svn: 174538

11 years agoAlign trailing block comments like trailing line comments.
Daniel Jasper [Wed, 6 Feb 2013 20:07:35 +0000 (20:07 +0000)]
Align trailing block comments like trailing line comments.

llvm-svn: 174537

11 years agoImprove comment.
Bill Wendling [Wed, 6 Feb 2013 20:05:44 +0000 (20:05 +0000)]
Improve comment.

llvm-svn: 174536

11 years agoPartially revert r152770. That commit moved the default handlers to their own file...
Howard Hinnant [Wed, 6 Feb 2013 19:29:55 +0000 (19:29 +0000)]
Partially revert r152770.  That commit moved the default handlers to their own file.  But it also did some refactoring.  It is the latter that is being reverted.  The refactoring had accidentally removed the required effect that the default unexpected_handler calls std::terminate(), which is a visible effect.

llvm-svn: 174532

11 years agoRemove unneeded test. We have plenty of subgroup relations between warnings,
Ted Kremenek [Wed, 6 Feb 2013 19:24:28 +0000 (19:24 +0000)]
Remove unneeded test.  We have plenty of subgroup relations between warnings,
and for those we care about we should have a general way of testing them.

llvm-svn: 174531

11 years agoAccept and ignore the -fextended-identifiers option.
Jordan Rose [Wed, 6 Feb 2013 18:15:40 +0000 (18:15 +0000)]
Accept and ignore the -fextended-identifiers option.

This was GCC's option to turn on UCN support, which we always have on now
in C99 and C++ modes.

Additionally, mark the -fno-extended-identifiers option as unsupported,
since we don't support disabling UCNs in C99 and C++ modes.

PR11538

llvm-svn: 174530

11 years agoEliminate a race condition with the global module index.
Douglas Gregor [Wed, 6 Feb 2013 18:08:37 +0000 (18:08 +0000)]
Eliminate a race condition with the global module index.

Essentially, a module file on disk could change size between the time
we stat() it and the time we open it, and we need to be robust against
such a problem.

llvm-svn: 174529

11 years ago[tests] Change test default to run against locally built library.
Daniel Dunbar [Wed, 6 Feb 2013 17:47:08 +0000 (17:47 +0000)]
[tests] Change test default to run against locally built library.

llvm-svn: 174528

11 years ago[tests] Enable use_system_lib support on Linux.
Daniel Dunbar [Wed, 6 Feb 2013 17:45:53 +0000 (17:45 +0000)]
[tests] Enable use_system_lib support on Linux.
 - Patch by Michael van der Westhuizen.

llvm-svn: 174527

11 years agoPPC calling convention cleanup.
Bill Schmidt [Wed, 6 Feb 2013 17:33:58 +0000 (17:33 +0000)]
PPC calling convention cleanup.

Most of PPCCallingConv.td is used only by the 32-bit SVR4 ABI.  Rename
things to clarify this.  Also delete some code that's been commented out
for a long time.

llvm-svn: 174526

11 years agoR600: Support for indirect addressing v4
Tom Stellard [Wed, 6 Feb 2013 17:32:29 +0000 (17:32 +0000)]
R600: Support for indirect addressing v4

Only implemented for R600 so far.  SI is missing implementations of a
few callbacks used by the Indirect Addressing pass and needs code to
handle frame indices.

At the moment R600 only supports array sizes of 16 dwords or less.
Register packing of vector types is currently disabled, which means that a
vec4 is stored in T0_X, T1_X, T2_X, T3_X, rather than T0_XYZW. In order
to correctly pack registers in all cases, we will need to implement an
analysis pass for R600 that determines the correct vector width for each
array.

v2:
  - Add support for i8 zext load from stack.
  - Coding style fixes

v3:
  - Don't reserve registers for indirect addressing when it isn't
    being used.
  - Fix bug caused by LLVM limiting the number of SubRegIndex
    declarations.

v4:
  - Fix 64-bit defines

llvm-svn: 174525

11 years ago<rdar://problem/13159777>
Greg Clayton [Wed, 6 Feb 2013 17:22:03 +0000 (17:22 +0000)]
<rdar://problem/13159777>

lldb was mmap'ing archive files once per .o file it loads, now it correctly shares the archive between modules.

LLDB was also always mapping entire contents of universal mach-o files, now it maps just the slice that is required.

Added a new logging channel for "lldb" called "mmap" to help track future regressions.

Modified the ObjectFile and ObjectContainer plugin interfaces to take a data offset along with the file offset and size so we can implement the correct caching and efficient reading of parts of files without mmap'ing the entire file like we used to.

The current implementation still keeps entire .a files mmaped (once) and entire slices from universal files mmaped to ensure that if a client builds their binaries during a debug session we don't lose our data and get corrupt object file info and debug info.

llvm-svn: 174524

11 years agoFix bug in test harness to allow running dotest.py without "--executable" flag on...
Daniel Malea [Wed, 6 Feb 2013 16:55:07 +0000 (16:55 +0000)]
Fix bug in test harness to allow running dotest.py without "--executable" flag on Linux
- resolves errors in cases that run the lldb CLI utility

llvm-svn: 174522

11 years agoFormatter: Correctly detect ObjC message expressions preceded by a comment.
Nico Weber [Wed, 6 Feb 2013 16:54:35 +0000 (16:54 +0000)]
Formatter: Correctly detect ObjC message expressions preceded by a comment.

llvm-svn: 174521

11 years agoFix to build tests with GCC: update makefiles in two watchpoint testcases
Daniel Malea [Wed, 6 Feb 2013 16:51:24 +0000 (16:51 +0000)]
Fix to build tests with GCC: update makefiles in two watchpoint testcases

llvm-svn: 174520

11 years agoFix GCC 4.6 build by avoiding delegating ctors
Daniel Malea [Wed, 6 Feb 2013 16:46:40 +0000 (16:46 +0000)]
Fix GCC 4.6 build by avoiding delegating ctors

Patch by Abid Hafiz!

llvm-svn: 174519

11 years agoImplement external weak (ELF) symbols on AArch64
Tim Northover [Wed, 6 Feb 2013 16:43:33 +0000 (16:43 +0000)]
Implement external weak (ELF) symbols on AArch64

Weakly defined symbols should evaluate to 0 if they're undefined at
link-time. This is impossible to do with the usual address generation
patterns, so we should use a literal pool entry to materlialise the
address.

llvm-svn: 174518

11 years agoFix handling of comments in macros.
Manuel Klimek [Wed, 6 Feb 2013 16:40:56 +0000 (16:40 +0000)]
Fix handling of comments in macros.

We now correctly format:
 // Written as a macro, it is reformatted from:
 #define foo(a)                                                                \
   do {                                                                        \
     /* Initialize num to zero. */                                             \
     int num = 10;                                                             \
     /* This line ensures a is never zero. */                                  \
     int i = a == 0 ? 1 : a;                                                   \
     i = num / i; /* This division is OK. */                                   \
     return i;                                                                 \
   } while (false)

llvm-svn: 174517

11 years ago[TSan] skip multiple internal frames, if necessary
Alexey Samsonov [Wed, 6 Feb 2013 16:28:05 +0000 (16:28 +0000)]
[TSan] skip multiple internal frames, if necessary

llvm-svn: 174516

11 years agoAdd some comments to new frame entries
Eli Bendersky [Wed, 6 Feb 2013 16:20:31 +0000 (16:20 +0000)]
Add some comments to new frame entries

llvm-svn: 174515

11 years agoMuch semicolon after namespaces.
Manuel Klimek [Wed, 6 Feb 2013 16:08:09 +0000 (16:08 +0000)]
Much semicolon after namespaces.

We now leave the semicolon in the line of the closing brace in:
namespace {
...
};

llvm-svn: 174514

11 years agoFix formatting of ObjC method calls.
Daniel Jasper [Wed, 6 Feb 2013 16:00:26 +0000 (16:00 +0000)]
Fix formatting of ObjC method calls.

This fixes llvm.org/PR15165.

We now correctly align:
  [image_rep drawInRect:drawRect
               fromRect:NSZeroRect
              operation:NSCompositeCopy
               fraction:1.0
             ssssssssdd:NO
                  hints:nil];

llvm-svn: 174513

11 years agoParse record declarations with token pasted identifiers.
Manuel Klimek [Wed, 6 Feb 2013 15:57:54 +0000 (15:57 +0000)]
Parse record declarations with token pasted identifiers.

This is pretty common in macros:
 #define A(X, Y) class X##Y {};

llvm-svn: 174512

11 years ago[ASan] fix the interceptor for siglongjmp. As we're using dylib interposition, we...
Alexander Potapenko [Wed, 6 Feb 2013 15:45:43 +0000 (15:45 +0000)]
[ASan] fix the interceptor for siglongjmp. As we're using dylib interposition, we must intercept both siglongjmp and longjmp on Darwin.

llvm-svn: 174510

11 years agoFix a formatting bug caused by comments in expressions.
Daniel Jasper [Wed, 6 Feb 2013 15:23:09 +0000 (15:23 +0000)]
Fix a formatting bug caused by comments in expressions.

This fixes llvm.org/PR15162.

Before:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
                          aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
    bool aaaaaaaaaaaaa =  // comment
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaa ||
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa || aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

llvm-svn: 174508

11 years agoUse 64-bit inodes in file operations. ASan is now built with -mmacosx-version-min...
Alexander Potapenko [Wed, 6 Feb 2013 14:41:15 +0000 (14:41 +0000)]
Use 64-bit inodes in file operations. ASan is now built with -mmacosx-version-min=10.5, thus the default inode
size is 32 bits. However the supported client code is going to target 10.6 and higher, where 64-bit inodes will be used.

llvm-svn: 174507

11 years ago[tsan] improve FrameIsInternal
Kostya Serebryany [Wed, 6 Feb 2013 14:32:16 +0000 (14:32 +0000)]
[tsan] improve FrameIsInternal

llvm-svn: 174506

11 years ago[tsan] print error summary line
Kostya Serebryany [Wed, 6 Feb 2013 14:24:00 +0000 (14:24 +0000)]
[tsan] print error summary line

llvm-svn: 174505

11 years agoOptionally derive formatting information from the input file.
Daniel Jasper [Wed, 6 Feb 2013 14:22:40 +0000 (14:22 +0000)]
Optionally derive formatting information from the input file.

With this patch, clang-format can analyze the input file for two
properties:
1. Is "int *a" or "int* a" more common.
2. Are non-C++03 constructs used, e.g. A<A<A>>.

With Google-style, clang-format will now use the more common style for
(1) and format C++03 compatible, unless it finds C++11 constructs in the
input.

llvm-svn: 174504

11 years agoRemove superseeded option.
Daniel Jasper [Wed, 6 Feb 2013 14:22:17 +0000 (14:22 +0000)]
Remove superseeded option.

The -invert-pointer-binding option will be superseeded by my next
cfe-commit. Instead of explicitly overwriting this flag, clang-format
can then be configured to auto-detect certain style-options based on the
input file.

llvm-svn: 174503

11 years agoAdd xml:space='preserve' in order to correctly preserve whitespace.
Manuel Klimek [Wed, 6 Feb 2013 12:40:01 +0000 (12:40 +0000)]
Add xml:space='preserve' in order to correctly preserve whitespace.

llvm-svn: 174502

11 years ago[asan] print a short one-line report summary after the full report. Currently, works...
Kostya Serebryany [Wed, 6 Feb 2013 12:36:49 +0000 (12:36 +0000)]
[asan] print a short one-line report summary after the full report. Currently, works only if symbolization happens in-process.

llvm-svn: 174501

11 years agoFix an issue with the formatting of stars in default values.
Daniel Jasper [Wed, 6 Feb 2013 10:57:42 +0000 (10:57 +0000)]
Fix an issue with the formatting of stars in default values.

Before: void f(int *a = d *e, int b = 0);
After:  void f(int *a = d * e, int b = 0);
llvm-svn: 174500