Enrico Granata [Sat, 9 Feb 2013 01:44:23 +0000 (01:44 +0000)]
Quick fix for the libc++ std::map synthetic children provider
If you try to access any child > 0 without having touched child 0, LLDB won't be able to reconstruct type information from the debug info.
Previously, we would fail.
Now, we simply go fetch child 0 and then come back.
llvm-svn: 174795
Douglas Gregor [Sat, 9 Feb 2013 01:35:03 +0000 (01:35 +0000)]
Ensure that type definitions present in just-loaded modules are
visible.
The basic problem here is that a given translation unit can use
forward declarations to form pointers to a given type, say,
class X;
X *x;
and then import a module that includes a definition of X:
import XDef;
We will then fail when attempting to access a member of X, e.g.,
x->method()
because the AST reader did not know to look for a default of a class
named X within the new module.
This implementation is a bit of a C-centric hack, because the only
definitions that can have this property are enums, structs, unions,
Objective-C classes, and Objective-C protocols, and all of those are
either visible at the top-level or can't be defined later. Hence, we
can use the out-of-date-ness of the name and the identifier-update
mechanism to force the update.
In C++, we will not be so lucky, and will need a more advanced
solution, because the definitions could be in namespaces defined in
two different modules, e.g.,
// module 1
namespace N { struct X; }
// module 2
namespace N { struct X { /* ... */ }; }
One possible implementation here is for C++ to extend the information
associated with each identifier table to include the declaration IDs
of any definitions associated with that name, regardless of
context. We would have to eagerly load those definitions.
llvm-svn: 174794
Jim Ingham [Sat, 9 Feb 2013 01:29:05 +0000 (01:29 +0000)]
Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug
session.
<rdar://problem/
12993641>
llvm-svn: 174793
NAKAMURA Takumi [Sat, 9 Feb 2013 01:22:23 +0000 (01:22 +0000)]
clang/lib/StaticAnalyzer/Core/BugReporter.cpp: Appease old msvc in std::pair(0, 0).
llvm-svn: 174792
Jakub Staszak [Sat, 9 Feb 2013 01:19:12 +0000 (01:19 +0000)]
Remove trailing spaces.
llvm-svn: 174791
Jakub Staszak [Sat, 9 Feb 2013 01:15:18 +0000 (01:15 +0000)]
Remove unneeded #includes.
llvm-svn: 174790
Andrew Trick [Sat, 9 Feb 2013 01:11:01 +0000 (01:11 +0000)]
LSR IVChain improvement.
Handle chains in which the same offset is used for both loads and
stores to the same array.
Fixes rdar://
11410078.
llvm-svn: 174789
Jordan Rose [Sat, 9 Feb 2013 01:10:25 +0000 (01:10 +0000)]
Properly validate UCNs for C99 and C++03 (both more restrictive than C(++)11).
Add warnings under -Wc++11-compat, -Wc++98-compat, and -Wc99-compat when a
particular UCN is incompatible with a different standard, and -Wunicode when
a UCN refers to a surrogate character in C++03.
llvm-svn: 174788
Anna Zaks [Sat, 9 Feb 2013 01:09:27 +0000 (01:09 +0000)]
[analyzer] Invalidation checker: move the "missing implementation" check
The missing definition check should be in the same category as the
missing ivar validation - in this case, the intent is to invalidate in
the given class, as described in the declaration, but the implementation
does not perform the invalidation. Whereas the MissingInvalidationMethod
checker checks the cases where the method intention is not to
invalidate. The second checker has potential to have a much higher false
positive rate.
llvm-svn: 174787
Jakub Staszak [Sat, 9 Feb 2013 01:04:28 +0000 (01:04 +0000)]
Remove #includes from the commonly used LoopInfo.h.
llvm-svn: 174786
Manman Ren [Sat, 9 Feb 2013 00:41:44 +0000 (00:41 +0000)]
Dwarf: do not use line_table_start in at_stmt_list since we do not always emit
line table entries in assembly.
llvm-svn: 174785
Enrico Granata [Sat, 9 Feb 2013 00:37:07 +0000 (00:37 +0000)]
The new progress bar mode was losing us information compared to the old dots mode in that we would have no way of knowing about test failures (short of peeking into the test result directory.. and you're not supposed to peek!)
Added a new line of information that reports the count of tests that pass, fail or have other things happen to them.
Again no flag to have the dots back. If you care, let us know!
llvm-svn: 174784
Jakob Stoklund Olesen [Sat, 9 Feb 2013 00:04:07 +0000 (00:04 +0000)]
Remove the old liveness algorithm.
This is part of the plan to delete LiveVariables.
llvm-svn: 174783
Anna Zaks [Fri, 8 Feb 2013 23:55:50 +0000 (23:55 +0000)]
[analyzer] Move DefaultBool so that all checkers can share it.
llvm-svn: 174782
Anna Zaks [Fri, 8 Feb 2013 23:55:47 +0000 (23:55 +0000)]
[analyzer] Split IvarInvalidation into two checkers
Separate the checking for the missing invalidation methods into a
separate checker so that it can be turned on/off independently.
llvm-svn: 174781
Anna Zaks [Fri, 8 Feb 2013 23:55:45 +0000 (23:55 +0000)]
[analyzer] IvarInvalidation: refactor, pull out the diagnostic printing
llvm-svn: 174780
Anna Zaks [Fri, 8 Feb 2013 23:55:43 +0000 (23:55 +0000)]
[analyzer] IvarInvalidation: add annotation for partial invalidation
The new annotation allows having methods that only partially invalidate
IVars and might not be called from the invalidation methods directly
(instead, are guaranteed to be called before the invalidation occurs).
The checker is going to trust the programmer to call the partial
invalidation method before the invalidator.This is common in cases when
partial object tear down happens before the death of the object.
llvm-svn: 174779
Enrico Granata [Fri, 8 Feb 2013 23:54:46 +0000 (23:54 +0000)]
Fixing a logic flaw with NSURL summary. This was caught by running the test suite in 32bit mode
llvm-svn: 174778
Enrico Granata [Fri, 8 Feb 2013 23:39:18 +0000 (23:39 +0000)]
<rdar://problem/
13176279>
The LLDB test suite now shows a progress bar instead of dots when not in verbose mode
If you crave the dots, make your Terminal window smaller than 10 columns :-)
(or ask for a flag to have the dots come back on demand)
llvm-svn: 174777
Sergei Larin [Fri, 8 Feb 2013 23:37:41 +0000 (23:37 +0000)]
Enable *BasicBlockPass::createPrinterPass()
Enables raw_ostream I/O for BasicBlockPass.
llvm-svn: 174776
Fariborz Jahanian [Fri, 8 Feb 2013 23:32:30 +0000 (23:32 +0000)]
objective-C: don't issue bogus warning about
"auto-synthesized may not work correctly with 'nib' loader"
when 'readonly' property is redeclared 'readwrite' in class
extension. // rdar://
13123861
llvm-svn: 174775
Jakob Stoklund Olesen [Fri, 8 Feb 2013 23:18:37 +0000 (23:18 +0000)]
Turn on -new-live-intervals by default.
This uses a liveness algorithm that does not depend on data from the
LiveVariables analysis, it is the first step towards removing
LiveVariables completely.
llvm-svn: 174774
Jordan Rose [Fri, 8 Feb 2013 23:17:31 +0000 (23:17 +0000)]
CMake: Use check_symbol_exists instead of check_cxx_symbol_exists.
check_cxx_symbol_exists requires CMake 2.8.6, so even though I
recommended it to Owen it's probably better to stay away for now.
This check is not technically correct because we're checking <math.h>
but then using <cmath> in the actual code, but if we run into problems we
can do the same sort of dance as isinf() and isnan() where we check /both/
headers and then write a wrapper header around them.
llvm-svn: 174773
Sean Callanan [Fri, 8 Feb 2013 23:17:17 +0000 (23:17 +0000)]
Fixed a crash when we didn't get a plist but tried
to pass it to CFGetTypeID() anyway.
<rdar://problem/
13181904>
llvm-svn: 174772
Richard Smith [Fri, 8 Feb 2013 22:55:10 +0000 (22:55 +0000)]
configure: when performing a compiler feature test for a -Wno-foo flag, attempt
to use -Wfoo instead of -Wno-foo. This works around a bug in some versions of
gcc, where it will silently accept an unknown -Wno-foo option, but will
generate an error for a compile which uses -Wno-foo if that compile also
triggers any warnings.
llvm-svn: 174770
Jordan Rose [Fri, 8 Feb 2013 22:37:49 +0000 (22:37 +0000)]
CharInfo: Add missing "using namespace clang::charinfo" in .cpp file.
Should fix the MSC bot.
llvm-svn: 174769
Jordan Rose [Fri, 8 Feb 2013 22:30:41 +0000 (22:30 +0000)]
Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.
Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.
llvm-svn: 174768
Jordan Rose [Fri, 8 Feb 2013 22:30:31 +0000 (22:30 +0000)]
Simplify logic for avoiding concatenation after numeric constants.
I threw in a couple of test cases for UD-suffixes -- already working, but
it wasn't immediately obvious to me.
llvm-svn: 174767
Jordan Rose [Fri, 8 Feb 2013 22:30:27 +0000 (22:30 +0000)]
StmtPrinter: Write large char values using \u or \U.
This may not always be valid, but we were previously just
emitting them raw.
While here, s/isprint/isPrintable/ (using the new CharInfo).
llvm-svn: 174766
Jordan Rose [Fri, 8 Feb 2013 22:30:22 +0000 (22:30 +0000)]
Pull Lexer's CharInfo table out for general use throughout Clang.
Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).
The next commit will try to clean up uses of <ctype.h> functions within Clang.
llvm-svn: 174765
Tom Stellard [Fri, 8 Feb 2013 22:24:41 +0000 (22:24 +0000)]
ReleaseNotes: Add section for R600 backend
llvm-svn: 174764
Tom Stellard [Fri, 8 Feb 2013 22:24:40 +0000 (22:24 +0000)]
R600: Dump the function name when TargetLowering::LowerCall() fails
Also output a more useful error message.
NOTE: This is a candidate for the Mesa stable branch
llvm-svn: 174763
Tom Stellard [Fri, 8 Feb 2013 22:24:38 +0000 (22:24 +0000)]
R600: rework flow creation in the structurizer v2
This fixes a couple of bugs and incorrect assumptions,
in total four more piglit tests now pass.
v2: fix small bug in the dominator updating
Patch by: Christian König
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 174762
Tom Stellard [Fri, 8 Feb 2013 22:24:37 +0000 (22:24 +0000)]
R600: fix loop analyses in the structurizer
Patch by: Christian König
Intersecting loop handling was wrong.
Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 174761
Tom Stellard [Fri, 8 Feb 2013 22:24:35 +0000 (22:24 +0000)]
R600: fix PHI value adding in the structurizer
Otherwise we sometimes produce invalid code.
Patch by: Christian König
Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 174760
Ted Kremenek [Fri, 8 Feb 2013 22:19:43 +0000 (22:19 +0000)]
Note that checker-271 is newer than the analyzer in Xcode 4.6
llvm-svn: 174759
Ted Kremenek [Fri, 8 Feb 2013 22:18:26 +0000 (22:18 +0000)]
Update open source checker build to checker-271.
llvm-svn: 174758
Greg Clayton [Fri, 8 Feb 2013 22:02:02 +0000 (22:02 +0000)]
Fixed 2 more issues found by the address sanitizer:
1 - A store off the end of a buffer in ValueObject.cpp
2 - DataExtractor had cases where bad offsets could cause invalid memory to be accessed.
llvm-svn: 174757
Dan Gohman [Fri, 8 Feb 2013 22:01:47 +0000 (22:01 +0000)]
Minor cleanup.
llvm-svn: 174756
Greg Clayton [Fri, 8 Feb 2013 21:59:34 +0000 (21:59 +0000)]
Fixed a store to data that isn't needed and that also could end up writing beyond the end of the buffer. This was found by the address sanitizer.
llvm-svn: 174755
Greg Clayton [Fri, 8 Feb 2013 21:52:32 +0000 (21:52 +0000)]
Unset the environment variables as soon as possible when running the test suite. Also don't store the unset list into a global when they aren't needed in a global variable.
llvm-svn: 174750
Sean Silva [Fri, 8 Feb 2013 21:51:26 +0000 (21:51 +0000)]
[docs] Tweaks for clarity, readability, and correctness.
llvm-svn: 174749
Bob Wilson [Fri, 8 Feb 2013 21:48:29 +0000 (21:48 +0000)]
Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/
12867368>"
This reverts r171041. This was a nice idea that didn't work out well.
Clang warnings need to be associated with warning groups so that they can
be selectively disabled, promoted to errors, etc. This simplistic patch didn't
allow for that. Enhancing it to provide some way for the backend to specify
a front-end warning type seems like overkill for the few uses of this, at
least for now.
llvm-svn: 174748
Reed Kotler [Fri, 8 Feb 2013 21:42:56 +0000 (21:42 +0000)]
Add the 16 bit version of addiu. To the assembler, the 16 and 32 bit are the
same so we put in the comment field an indicator when we think we are
emitting the 16 bit version. For the direct object emitter, the difference is
important as well as for other passes which need an accurate count of
program size. There will be other similar putbacks to this for various
instructions.
llvm-svn: 174747
Hal Finkel [Fri, 8 Feb 2013 21:35:47 +0000 (21:35 +0000)]
DAGCombiner: Constant folding around pre-increment loads/stores
Previously, even when a pre-increment load or store was generated,
we often needed to keep a copy of the original base register for use
with other offsets. If all of these offsets are constants (including
the offset which was combined into the addressing mode), then this is
clearly unnecessary. This change adjusts these other offsets to use the
new incremented address.
llvm-svn: 174746
Douglas Gregor [Fri, 8 Feb 2013 21:30:59 +0000 (21:30 +0000)]
Always keep highest identifier, selector, and macro IDs when we've
read another one, just as we do for types.
llvm-svn: 174745
Douglas Gregor [Fri, 8 Feb 2013 21:27:45 +0000 (21:27 +0000)]
Never cache the result of a module file lookup.
llvm-svn: 174744
Hal Finkel [Fri, 8 Feb 2013 21:13:39 +0000 (21:13 +0000)]
BBVectorize: Use TTI->getAddressComputationCost
This is a follow-up to the cost-model change in r174713 which splits
the cost of a memory operation between the address computation and the
actual memory access. In r174713, this cost is always added to the
memory operation cost, and so BBVectorize will do the same.
Currently, this new cost function is used only by ARM, and I don't
have any ARM test cases for BBVectorize. Assistance in generating some
good ARM test cases for BBVectorize would be greatly appreciated!
llvm-svn: 174743
Bill Schmidt [Fri, 8 Feb 2013 21:08:22 +0000 (21:08 +0000)]
More modifications to PowerPC doc links
llvm-svn: 174742
Bob Wilson [Fri, 8 Feb 2013 20:35:15 +0000 (20:35 +0000)]
Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.
Aside from the question of whether we report a warning or an error when we
can't satisfy a requested stack object alignment, the current implementation
of this is not good. We're not providing any source location in the diagnostics
and the current warning is not connected to any warning group so you can't
control it. We could improve the source location somewhat, but we can do a
much better job if this check is implemented in the front-end, so let's do that
instead. <rdar://problem/
13127907>
llvm-svn: 174741
Hal Finkel [Fri, 8 Feb 2013 20:24:46 +0000 (20:24 +0000)]
Update PowerPC links in CompilerWriterInfo.rst
This updates the current references to links that work for me.
In the future, we should update the list of references itself to provide
information on newer architecture variants.
Thanks to Sean Silva for pointing out that the current links were broken!
llvm-svn: 174739
Manuel Klimek [Fri, 8 Feb 2013 20:04:33 +0000 (20:04 +0000)]
Adapt test to new clang-format behavior.
llvm-svn: 174738
Manuel Klimek [Fri, 8 Feb 2013 19:53:32 +0000 (19:53 +0000)]
Fix indentation-detection at indent level 0.
This correctly formats:
{
a;
}
where { is incorrectly indented by 2, but is at level 0, when
reformatting only 'a;'.
llvm-svn: 174737
Ted Kremenek [Fri, 8 Feb 2013 19:51:43 +0000 (19:51 +0000)]
Teach BugReporter (extensive diagnostics) to emit a diagnostic when a loop body is skipped.
Fixes <rdar://problem/
12322528>.
llvm-svn: 174736
Enrico Granata [Fri, 8 Feb 2013 19:28:04 +0000 (19:28 +0000)]
This checkin implements the data formatter for NSURL in C++ code
llvm-svn: 174735
Argyrios Kyrtzidis [Fri, 8 Feb 2013 19:27:23 +0000 (19:27 +0000)]
[libclang] Add a test to make sure annotation works fine in the presence of
'override' on the method.
This was fixed in a previous commit, generally handling attributes that are at the
end of the declaration.
rdar://
13140589
llvm-svn: 174734
Howard Hinnant [Fri, 8 Feb 2013 19:10:36 +0000 (19:10 +0000)]
Michael van der Westhuizen: Update instructions for building on Linux.
llvm-svn: 174733
Howard Hinnant [Fri, 8 Feb 2013 19:08:06 +0000 (19:08 +0000)]
Add Michael van der Westhuizen to CREDITS.TXT
llvm-svn: 174732
Howard Hinnant [Fri, 8 Feb 2013 19:04:53 +0000 (19:04 +0000)]
Michael van der Westhuizen: update to CMake.
llvm-svn: 174731
Ted Kremenek [Fri, 8 Feb 2013 18:59:17 +0000 (18:59 +0000)]
Remove stale instance variable.
llvm-svn: 174730
Fariborz Jahanian [Fri, 8 Feb 2013 18:57:50 +0000 (18:57 +0000)]
objective-C modern translation: Fix another random translation bug
involving property getter expressions on rhs of property setter.
// rdar://
13138459
llvm-svn: 174729
Daniel Dunbar [Fri, 8 Feb 2013 18:26:55 +0000 (18:26 +0000)]
[tests] Another batch of timeout increases.
llvm-svn: 174726
Bill Schmidt [Fri, 8 Feb 2013 18:19:17 +0000 (18:19 +0000)]
Refine fix to bug 15041.
Thanks to help from Nadav and Hal, I have a more reasonable (and even
correct!) approach. This specifically penalizes the insertelement
and extractelement operations for the performance hit that will occur
on PowerPC processors.
llvm-svn: 174725
Chad Rosier [Fri, 8 Feb 2013 18:00:14 +0000 (18:00 +0000)]
[SimplifyLibCalls] Library call simplification doen't work if the call site
isn't using the default calling convention. However, if the transformation is
from a call to inline IR, then the calling convention doesn't matter.
rdar://
13157990
llvm-svn: 174724
Jakob Stoklund Olesen [Fri, 8 Feb 2013 17:43:32 +0000 (17:43 +0000)]
Typos.
llvm-svn: 174723
Daniel Dunbar [Fri, 8 Feb 2013 17:41:28 +0000 (17:41 +0000)]
[tests] Add back stdc macros I accidentally refactored out.
- Patch by Michael van der Westhuizen:
--
r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros.
Making this change fixes the following tests on Linux:
- depr/depr.c.headers/inttypes_h.pass.cpp
- depr/depr.c.headers/stdint_h.pass.cpp
- input.output/file.streams/c.files/cinttypes.pass.cpp
- language.support/cstdint/cstdint.syn/cstdint.pass.cpp
--
llvm-svn: 174722
Daniel Dunbar [Fri, 8 Feb 2013 17:41:19 +0000 (17:41 +0000)]
[tests] Increase a bunch of wait limits.
- Basically I just ran the thread tests many many times on a busy machine and
bumped the timeouts whenever I hit a test failure.
- This is obviously subpar, but is the best I can do without the tests being
rewritten to not depend on arbitrary timeouts.
llvm-svn: 174721
Manuel Klimek [Fri, 8 Feb 2013 17:38:27 +0000 (17:38 +0000)]
Takes the context into account when re-indenting regions.
Fixes llvm.org/PR14916.
llvm-svn: 174720
Fariborz Jahanian [Fri, 8 Feb 2013 17:15:07 +0000 (17:15 +0000)]
objective-C modern translator. Fixes a trivial
rewriting bug where #ifdef ended up on the same
line as the attribute declaration.
llvm-svn: 174719
Daniel Jasper [Fri, 8 Feb 2013 16:49:27 +0000 (16:49 +0000)]
Fix handling of fake parenthesis during formatting.
They are much easier to handle when attached to the previous token.
Before:
unsigned Indent =
formatFirstToken(TheLine.First, IndentForLevel[TheLine.Level] >=
0 ? IndentForLevel[TheLine.Level]
: TheLine.Level * 2, TheLine.InPPDirective, PreviousEndOfLineColumn);
After:
unsigned Indent = formatFirstToken(
TheLine.First, IndentForLevel[TheLine.Level] >= 0
? IndentForLevel[TheLine.Level] : TheLine.Level * 2,
TheLine.InPPDirective, PreviousEndOfLineColumn);
llvm-svn: 174718
David Tweed [Fri, 8 Feb 2013 16:35:10 +0000 (16:35 +0000)]
The patch to fix some issues in r174543 fixed the lines failing the test, but missed a couple
of lines which weren't being explicitly looked at and were printing incorrect results. These
values clearly must lie within 32 bits, so the casts are definitely safe.
llvm-svn: 174717
Daniel Jasper [Fri, 8 Feb 2013 15:28:42 +0000 (15:28 +0000)]
Implement a tiny expression parser to improve formatting decisions.
With this patch, the formatter introduces 'fake' parenthesis according
to the operator precedence of binary operators.
Before:
return aaaa &
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA || bbbb &
BBBBBBBBBBBBBBBBBBBBBBBBBBBBB || cccc &
CCCCCCCCCCCCCCCCCCCCCCCCCC ||
dddd &
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa);
After:
return aaaa &
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA ||
bbbb &
BBBBBBBBBBBBBBBBBBBBBBBBBBBBB ||
cccc &
CCCCCCCCCCCCCCCCCCCCCCCCCC ||
dddd &
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD;
f(
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaaaaaaaaaa &&
aaaaaaaaaaaaaaaaaaaa);
Future improvements:
- Get rid of some of the hacky ways to nicely format certain constructs.
- Merge this parser and the AnnotatingParser as we now have several parsers
that analyze (), [], etc.
llvm-svn: 174714
Arnold Schwaighofer [Fri, 8 Feb 2013 14:50:48 +0000 (14:50 +0000)]
ARM cost model: Address computation in vector mem ops not free
Adds a function to target transform info to query for the cost of address
computation. The cost model analysis pass now also queries this interface.
The code in LoopVectorize adds the cost of address computation as part of the
memory instruction cost calculation. Only there, we know whether the instruction
will be scalarized or not.
Increase the penality for inserting in to D registers on swift. This becomes
necessary because we now always assume that address computation has a cost and
three is a closer value to the architecture.
radar://
13097204
llvm-svn: 174713
Alexey Samsonov [Fri, 8 Feb 2013 14:34:33 +0000 (14:34 +0000)]
Update tests for DWARF parser: store sources next to pre-built object files and provide build instructions
llvm-svn: 174711
Evgeniy Stepanov [Fri, 8 Feb 2013 12:59:42 +0000 (12:59 +0000)]
[asan] Fix off-by-one in AddrIsAtRight.
llvm-svn: 174710
Michael Kuperstein [Fri, 8 Feb 2013 12:58:29 +0000 (12:58 +0000)]
Test Commit
llvm-svn: 174709
Evgeniy Stepanov [Fri, 8 Feb 2013 12:13:43 +0000 (12:13 +0000)]
[sanitizer] Fix lint.
llvm-svn: 174708
Timur Iskhodzhanov [Fri, 8 Feb 2013 12:02:00 +0000 (12:02 +0000)]
[ASan] Switch Windows to allocator v2, also fixing some build errors
llvm-svn: 174707
Timur Iskhodzhanov [Fri, 8 Feb 2013 11:45:04 +0000 (11:45 +0000)]
[ASan] Move functions using BitScan/clzl to sanitizer_common
llvm-svn: 174706
Evgeniy Stepanov [Fri, 8 Feb 2013 11:19:23 +0000 (11:19 +0000)]
[sanitizer] Add 2 random tests for the scanf implementation.
llvm-svn: 174705
Evgeniy Stepanov [Fri, 8 Feb 2013 11:17:20 +0000 (11:17 +0000)]
[sanitizer] Improve scanf interceptor
This a rewrite of the scanf parser. The new implementation is pretty close to
the spec, with a few shortcuts taken here and there. It is conservative, i.e.
it gives up parsing if it does not understand some part of the format string,
or runs into an ambiguous % spec. It does not handle some rarely used parts of
the spec, like %n$ - for now.
I'm also moving parser call to after the original *scanf function completes,
so that we can find out the store size of %s directive by the use of strlen()
on the target buffer.
llvm-svn: 174704
Daniel Jasper [Fri, 8 Feb 2013 08:22:00 +0000 (08:22 +0000)]
Avoid unnecessary line breaks in nested ObjC calls.
Before:
[pboard setData:[NSData dataWithBytes:&button
length:sizeof(button)]
forType:kBookmarkButtonDragType];
After:
[pboard setData:[NSData dataWithBytes:&button length:sizeof(button)]
forType:kBookmarkButtonDragType];
llvm-svn: 174701
Tim Northover [Fri, 8 Feb 2013 08:00:13 +0000 (08:00 +0000)]
Improve filechecking of volatile test.
My previous attempt was extremely deficient, allowing more volatiles
to be introduced and not even checking all of the ones that are
present.
This attempt doesn't try to keep track of the values stored or offsets
within particular objects, just that the correct objects are accessed
in a correctly volatile manner throughout.
llvm-svn: 174700
Alexey Samsonov [Fri, 8 Feb 2013 07:39:25 +0000 (07:39 +0000)]
[CMake] set -mmacosx-version-min to 10.7 if compiler-rt is built with -stdlib=libc++
llvm-svn: 174699
Jordan Rose [Fri, 8 Feb 2013 07:28:25 +0000 (07:28 +0000)]
CMake: Include Clang unit tests in check-clang target in standalone builds.
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.
Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!
Part two of r174691 (allow the unit tests to be built in standalone mode).
llvm-svn: 174698
Bill Wendling [Fri, 8 Feb 2013 06:32:06 +0000 (06:32 +0000)]
Parse the attribute group reference on a function.
Attribute references are of this form:
define void @foo() #0 #1 #2 { ... }
Parse them for function attributes. If there's more than one reference, then
they are merged together.
llvm-svn: 174697
Reed Kotler [Fri, 8 Feb 2013 03:57:41 +0000 (03:57 +0000)]
When Mips16 frames grow large, the immediate field may exceed the maximum
allowed size for the instruction. This code uses RegScavenger to fix this.
We sometimes need 2 registers for Mips16 so we must handle things
differently than how register scavenger is normally used.
llvm-svn: 174696
Greg Clayton [Fri, 8 Feb 2013 02:54:24 +0000 (02:54 +0000)]
Added the ability to specify a breakpoint using the GDB '*ADDRESS' format:
(lldb) b *0x1234
You can still of course just specify an address:
(lldb) b 0x1234
Also now we accept the '&' before function names to indicate to not to skip the function prologue like GDB supports. To see how this works:
(lldb) settings set interpreter.expand-regex-aliases 1
(lldb) b &main
breakpoint set --name 'main' --skip-prologue=0
Breakpoint 1: where = a.out`main at main.c:20, address = 0x0000000100000b60
(lldb) b main
breakpoint set --name 'main'
Breakpoint 2: where = a.out`main + 54 at main.c:21, address = 0x0000000100000b96
llvm-svn: 174695
Nick Lewycky [Fri, 8 Feb 2013 02:38:30 +0000 (02:38 +0000)]
Fix test failure by making sure this file isn't identical to any other file
included in the same test. Clang gets confused about whether it's already built
a module for this file, when running on a content-addressible filesystem.
llvm-svn: 174694
Enrico Granata [Fri, 8 Feb 2013 01:55:46 +0000 (01:55 +0000)]
<rdar://problem/
12898191>
Added a summary for NSMutableAttributedString
In the process, converted formatters for other NSString-based classes over to C++ code
llvm-svn: 174693
Andrew Trick [Fri, 8 Feb 2013 01:55:39 +0000 (01:55 +0000)]
Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."
This reverts commit
3854a5d90fee52af1065edbed34521fff6cdc18d.
This causes a clang unit test to hang: vtable-available-externally.cpp.
llvm-svn: 174692
Jordan Rose [Fri, 8 Feb 2013 01:42:37 +0000 (01:42 +0000)]
CMake: Optionally allow running the Clang unit tests in standalone builds.
The reason this is not enabled by default is because there is no way for
Clang to guarantee that the LLVM unit testing infrastruture has been built.
However, if it /has/ been built, there's no reason why the standalone Clang
build can't use it!
This should have no effect on existing builds -- in a combined build the
value of the CLANG_INCLUDE_TESTS option defaults to the LLVM equivalent,
and in a standalone build it defaults to off.
llvm-svn: 174691
Richard Smith [Fri, 8 Feb 2013 01:35:44 +0000 (01:35 +0000)]
Fix conflict between r174685 and r174645 (rename -fmodule-cache-path <foo> to -fmodules-cache-path=<foo>).
llvm-svn: 174690
Argyrios Kyrtzidis [Fri, 8 Feb 2013 01:12:25 +0000 (01:12 +0000)]
[libclang] Attribute visitation happens out-of-source-order, make sure
we annotate properly when there is an attribute and not skip type specs
if the attribute is after the declaration.
rdar://
13129077
llvm-svn: 174689
Tanya Lattner [Fri, 8 Feb 2013 01:07:32 +0000 (01:07 +0000)]
Use the target address space value when mangling names.
llvm-svn: 174688
Michael J. Spencer [Fri, 8 Feb 2013 01:05:48 +0000 (01:05 +0000)]
[readobj] Fix memory leak.
llvm-svn: 174687
Bill Wendling [Fri, 8 Feb 2013 00:52:31 +0000 (00:52 +0000)]
Use ParseFnAttributeValuePairs instead of ParseOptionalFuncAttrs
The functionality of ParseOptionalFuncAttrs was there in
ParseFnAttributeValuePairs. So just use that instead.
llvm-svn: 174686
Richard Smith [Fri, 8 Feb 2013 00:37:45 +0000 (00:37 +0000)]
Fix stack overflow and improve performance when a module contains many
overloads of a name by claiming that there are no lookup results for that name
in modules while loading the names from the module. Lookups in deserialization
really don't want to find names which they themselves are in the process of
introducing. This also has the pleasant side-effect of automatically caching
PCH lookups which found no names.
The runtime here is still quadratic in the number of overloads, but the
constant is lower.
llvm-svn: 174685
Fariborz Jahanian [Fri, 8 Feb 2013 00:27:34 +0000 (00:27 +0000)]
objective-C modern translator. Generate #line
info in the translated code under -g only.
// rdar://
13138170
llvm-svn: 174684
Douglas Gregor [Fri, 8 Feb 2013 00:10:48 +0000 (00:10 +0000)]
Teach subframework header lookup to suggest modules <rdar://problem/
13176200>.
llvm-svn: 174683