Nico Weber [Sat, 9 Feb 2013 18:02:07 +0000 (18:02 +0000)]
Formatter: Add test for default arguments.
llvm-svn: 174816
Dmitri Gribenko [Sat, 9 Feb 2013 16:41:47 +0000 (16:41 +0000)]
FileCheck'ize tests
llvm-svn: 174815
Dmitri Gribenko [Sat, 9 Feb 2013 16:25:38 +0000 (16:25 +0000)]
FileCheck'ize a test
llvm-svn: 174814
Bill Wendling [Sat, 9 Feb 2013 15:48:49 +0000 (15:48 +0000)]
TEMPORARY SYNTAX CHANGE!
The original syntax for the attribute groups was ambiguous. For example:
declare void @foo() #1
#0 = attributes { noinline }
The '#0' would be parsed as an attribute reference for '@foo' and not as a
top-level entity. In order to continue forward while waiting for a decision on
what the correct syntax is, I'm changing it to this instead:
declare void @foo() #1
attributes #0 = { noinline }
Repeat: This is TEMPORARY until we decide what the correct syntax should be.
llvm-svn: 174813
Bill Wendling [Sat, 9 Feb 2013 15:42:51 +0000 (15:42 +0000)]
Add a DenseMapInfo class for the AttributeSet.
We are going to place the AttributeSet into a DenseMap during assembly writing.
llvm-svn: 174812
Dmitri Gribenko [Sat, 9 Feb 2013 15:24:28 +0000 (15:24 +0000)]
Remove unreachable statement
llvm-svn: 174811
Dmitri Gribenko [Sat, 9 Feb 2013 15:16:58 +0000 (15:16 +0000)]
Comment parsing: use CharInfo.h
This also gives us 0.2% speedup on '-fsyntax-only -Wdocumentation' time for
a testcase that consists of all Clang headers.
llvm-svn: 174810
Dmitri Gribenko [Sat, 9 Feb 2013 14:12:09 +0000 (14:12 +0000)]
libclang: use CXCursor getters to simplify code
llvm-svn: 174809
Justin Holewinski [Sat, 9 Feb 2013 13:34:15 +0000 (13:34 +0000)]
[NVPTX] Make address space errors more explicit (llvm_unreachable -> report_fatal_error)
llvm-svn: 174808
Jakub Staszak [Sat, 9 Feb 2013 13:29:31 +0000 (13:29 +0000)]
Simplify code.
llvm-svn: 174807
Jakub Staszak [Sat, 9 Feb 2013 13:29:10 +0000 (13:29 +0000)]
Remove unneeded #includes.
llvm-svn: 174806
Jordan Rose [Sat, 9 Feb 2013 10:09:43 +0000 (10:09 +0000)]
Remove some stray uses of <ctype.h> functions.
These are causing assertions on some MSVC builds.
llvm-svn: 174805
Chris Lattner [Sat, 9 Feb 2013 07:37:59 +0000 (07:37 +0000)]
This is the correct version of r174802.
llvm-svn: 174804
Chris Lattner [Sat, 9 Feb 2013 07:37:26 +0000 (07:37 +0000)]
Fix a nasty off-by one error that only manifests with 64-bit word size (which is
not enabled yet).
llvm-svn: 174803
Ted Kremenek [Sat, 9 Feb 2013 07:13:16 +0000 (07:13 +0000)]
QoI: -Wreadonly-iboutlet-property should have the warning's location on the property.
There's no need to refer to the @implementation at all.
Fixes <rdar://problem/
13186515>
llvm-svn: 174802
Chris Lattner [Sat, 9 Feb 2013 07:07:29 +0000 (07:07 +0000)]
Fix the underlying problem that was causing read(0) to be called: sometimes the
bitcode writer would generate abbrev records saying that the abbrev should be
filled with fixed zero-bit bitfields (this happens in the .bc writer when
the number of types used in a module is exactly one, since log2(1) == 0).
In this case, just handle it as a literal zero. We can't "just fix" the writer
without breaking compatibility with existing bc files, so have the abbrev reader
do the substitution.
Strengthen the assert in read to reject reads of zero bits so we catch such
crimes in the future, and remove the special case designed to handle this.
llvm-svn: 174801
Chris Lattner [Sat, 9 Feb 2013 06:52:14 +0000 (06:52 +0000)]
recommit r173072 (preparing bitstream reader to read a machine word at a time,
instead of always 32-bits at a time) with two changes:
1. Make Read(0) always return zero without affecting the state of our cursor.
2. Hack word_t to always be 32 bits, as staging.
These two caveats will change shortly.
llvm-svn: 174800
Jordan Rose [Sat, 9 Feb 2013 02:12:23 +0000 (02:12 +0000)]
Release notes: mention support for Unicode and UCNs in identifiers.
I'm using the name "Extended Identifiers" for the feature because that's
what GCC calls them. According to the standard, the new feature is
"universal character names are now allowed in identifiers", but the more
interesting "feature" is that identifiers can now contain Unicode characters,
however they are written.
llvm-svn: 174798
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