Douglas Gregor
d0ad2949fa
Implement the rest of C++0x [temp.deduct.type]p9, which specifies that
...
the presence of a pack expansion anywhere except at the end of a
template-argument-list causes the entire template-argument-list to be
a non-deduced context.
llvm-svn: 122461
2010-12-23 01:24:45 +00:00
Johnny Chen
d5f66fcbac
Add a test case for the SBFrame APIs. In particular, it uses the frame API to
...
get the argument values of the call stacks when stopped on the breakpoint.
Radar has been filed for the expected failures:
test failure: ./dotest.py -v -w -t -p TestFrames (argument values are wrong)
llvm-svn: 122460
2010-12-23 01:12:19 +00:00
Jeffrey Yasskin
b3321531a8
Change all self assignments X=X to (void)X, so that we can turn on a
...
new gcc warning that complains on self-assignments and
self-initializations. Fix one bug found by the warning, in which one
clang::OverloadCandidate constructor failed to initialize its
FunctionTemplate member.
llvm-svn: 122459
2010-12-23 01:01:28 +00:00
Jeffrey Yasskin
9b43f33620
Change all self assignments X=X to (void)X, so that we can turn on a
...
new gcc warning that complains on self-assignments and
self-initializations.
llvm-svn: 122458
2010-12-23 00:58:24 +00:00
Bill Wendling
f14bb1e98b
Default to armv7 instead of armv6.
...
llvm-svn: 122457
2010-12-23 00:49:18 +00:00
Jim Grosbach
8c48503baa
Trailing whitespace.
...
llvm-svn: 122456
2010-12-22 23:26:02 +00:00
Benjamin Kramer
1f4dfbbcb0
DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is illegal. The latter usually compiles into smaller code.
...
example code:
unsigned foo(unsigned x, unsigned y) {
if (x != 0) y--;
return y;
}
before:
_foo: ## @foo
cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01]
sbbl %eax, %eax ## encoding: [0x19,0xc0]
notl %eax ## encoding: [0xf7,0xd0]
addl 8(%esp), %eax ## encoding: [0x03,0x44,0x24,0x08]
ret ## encoding: [0xc3]
after:
_foo: ## @foo
cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01]
movl 8(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08]
adcl $-1, %eax ## encoding: [0x83,0xd0,0xff]
ret ## encoding: [0xc3]
llvm-svn: 122455
2010-12-22 23:17:45 +00:00
Douglas Gregor
7a49ead680
Be paranoid about NULL size expressions in dependently-sized array types
...
llvm-svn: 122454
2010-12-22 23:15:38 +00:00
Benjamin Kramer
8ef5001b27
InstCombine: creating selects from -1 and 0 is fine, they combine into a sext from i1.
...
llvm-svn: 122453
2010-12-22 23:12:15 +00:00
Douglas Gregor
7f8e7681ad
Unify the consistency checking for deduced template arguments into a
...
single routine. Extend that routine to handle consistency
checking for template argument packs, so that we can compare the
deduced packs for template parameter packs across different pack
expansions.
llvm-svn: 122452
2010-12-22 23:09:49 +00:00
Benjamin Kramer
6020ed9d99
X86: Lower a select directly to a setcc_carry if possible.
...
int test(unsigned long a, unsigned long b) { return -(a < b); }
compiles to
_test: ## @test
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
sbbl %eax, %eax ## encoding: [0x19,0xc0]
ret ## encoding: [0xc3]
instead of
_test: ## @test
xorl %ecx, %ecx ## encoding: [0x31,0xc9]
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
movl $-1, %eax ## encoding: [0xb8,0xff,0xff,0xff,0xff]
cmovael %ecx, %eax ## encoding: [0x0f,0x43,0xc1]
ret ## encoding: [0xc3]
llvm-svn: 122451
2010-12-22 23:09:28 +00:00
Johnny Chen
cdbe594841
No need to pass an empty string as an arg or as an env string to the SBTarget.LaunchProcess() API.
...
llvm-svn: 122450
2010-12-22 22:56:19 +00:00
Daniel Dunbar
d8f2dc8716
build: Use CLANG_NO_RUNTIME=1 specifically, not just any definition.
...
llvm-svn: 122449
2010-12-22 22:23:39 +00:00
Rafael Espindola
4124ab1255
Add r122359 back now that the bug in MCDwarfLineAddrFragment fragment has been
...
fixed.
llvm-svn: 122448
2010-12-22 22:16:24 +00:00
Dan Gohman
0bbdaf5723
Constify.
...
llvm-svn: 122447
2010-12-22 22:10:08 +00:00
Rafael Espindola
d91e11932c
Assert that the AddrDelta expression is really constant and wrap it in a set
...
if we have a lame assembler.
llvm-svn: 122446
2010-12-22 22:04:28 +00:00
Jakob Stoklund Olesen
0acb69d53c
When RegAllocGreedy decides to spill the interferences of the current register,
...
pick the victim with the lowest total spill weight.
llvm-svn: 122445
2010-12-22 22:01:30 +00:00
Jakob Stoklund Olesen
29836e6572
Include a shadow of the original CFG edges in the edge bundle graph.
...
llvm-svn: 122444
2010-12-22 22:01:28 +00:00
Rafael Espindola
a6cd2d821a
Rename NeedsSetToChangeDiffSize to HasAggressiveSymbolFolding which is a much
...
better name and matches what is used in the MachO writer.
llvm-svn: 122443
2010-12-22 21:51:29 +00:00
Argyrios Kyrtzidis
4037302a8b
Subsequent attempt to fix linux build.
...
llvm-svn: 122442
2010-12-22 21:41:01 +00:00
Daniel Dunbar
ac8173cf71
MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.
...
llvm-svn: 122441
2010-12-22 21:26:43 +00:00
Douglas Gregor
0f3feb4e8d
Implement template argument deduction for pack expansions whose
...
pattern is a template argument, which involves repeatedly deducing
template arguments using the pattern of the pack expansion, then
bundling the resulting deductions into an argument pack.
We can now handle a variety of simple list-handling metaprograms using
variadic templates. See, e.g., the new "count" metaprogram.
llvm-svn: 122439
2010-12-22 21:19:48 +00:00
Rafael Espindola
1af01a69d4
Add reduced test from 8845.
...
llvm-svn: 122438
2010-12-22 21:15:13 +00:00
Argyrios Kyrtzidis
986fc89034
Apparently I'm on a mission to break as many builds as possible.
...
llvm-svn: 122436
2010-12-22 21:10:38 +00:00
Johnny Chen
858718a9e2
Simplify the breakpoint command function. Instead of fetching the command interpreter
...
and run the "process continue" command, use the SBProcess.Continue() API.
llvm-svn: 122434
2010-12-22 20:36:29 +00:00
Argyrios Kyrtzidis
5629fece72
Forgot to move the files in CMakeLists.txt.
...
llvm-svn: 122433
2010-12-22 20:30:07 +00:00
Argyrios Kyrtzidis
6c696b7f98
Add GR/Checkers subdir for CMake build.
...
llvm-svn: 122432
2010-12-22 20:22:35 +00:00
Argyrios Kyrtzidis
c60fc656c6
Move AnalysisConsumer.cpp and ExprEngine.cpp into the Checkers subdir temporarily
...
to avoid cyclic dependency between the libraries and fix the linux build.
llvm-svn: 122431
2010-12-22 20:15:43 +00:00
Fariborz Jahanian
0f0b302ffe
Complain on missing property getter method only
...
if property-dot expression is decidedly
an rvalue. // rdar://8155806.
llvm-svn: 122430
2010-12-22 19:46:35 +00:00
Johnny Chen
d161a85700
Broadcaster::AddListener(): Bail out early if the passed in Listener pointer is
...
NULL, instead of registering a NULL listener and to crash later.
llvm-svn: 122429
2010-12-22 19:29:31 +00:00
Johnny Chen
73f7fa82e5
Modify one assertion message.
...
llvm-svn: 122428
2010-12-22 19:23:44 +00:00
Rafael Espindola
0e14b61c0b
Revert r122359 while I debug PR8845.
...
llvm-svn: 122427
2010-12-22 19:05:49 +00:00
Douglas Gregor
d80ea20411
When performing template argument deduction where the argument is a
...
dependent template specialization type, the number of template
arguments need not match precisely. Rather than checking the number of
arguments eagerly (which does not consider argument packs), let the
deduction routine for template argument lists cope with too many/too
few arguments.
llvm-svn: 122425
2010-12-22 18:55:49 +00:00
Argyrios Kyrtzidis
1696f508e2
[analyzer] Refactoring: Drop the 'GR' prefix.
...
llvm-svn: 122424
2010-12-22 18:53:44 +00:00
Argyrios Kyrtzidis
ca08fba414
[analyzer] Refactoring: Move stuff into namespace 'GR'.
...
llvm-svn: 122423
2010-12-22 18:53:20 +00:00
Argyrios Kyrtzidis
a700e976b6
[analyzer] Refactoring: Move checkers into lib/GR/Checkers and their own library, libclangGRCheckers
...
llvm-svn: 122422
2010-12-22 18:52:56 +00:00
Argyrios Kyrtzidis
2ff5ab1516
[analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> libclangGRCore
...
llvm-svn: 122421
2010-12-22 18:52:29 +00:00
Argyrios Kyrtzidis
8d602a8aa8
[analyzer] Refactoring: include/clang/Checker -> include/clang/GR
...
llvm-svn: 122420
2010-12-22 18:51:49 +00:00
Matt Beaumont-Gay
6b5d2519b3
Fix another conditional expression mismatched enum type warning.
...
llvm-svn: 122419
2010-12-22 18:25:55 +00:00
Douglas Gregor
7baabefa03
Implicitly expand argument packs when performing template argument
...
deduction. Unify all of the looping over template arguments for
deduction purposes into a single place, where argument pack expansion
occurs; this is also the hook for deducing from pack expansions, which
itself is not yet implemented.
For now, at least we can handle a basic "count" metafunction written
with variadics. See the new test for the formulation that works.
llvm-svn: 122418
2010-12-22 18:17:10 +00:00
Duncan Sands
a45cfbd405
When determining whether the new instruction was already present in
...
the original instruction, half the cases were missed (making it not
wrong but suboptimal). Also correct a typo (A <-> B) in the second
chunk.
llvm-svn: 122414
2010-12-22 17:15:25 +00:00
Duncan Sands
bab9456f81
Make this test not depend on how the variable is named.
...
llvm-svn: 122413
2010-12-22 17:08:04 +00:00
Daniel Dunbar
45140d2efc
MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which is
...
esp. important given that the LOCAL_SECTDIFF enumeration got redefined.
llvm-svn: 122412
2010-12-22 16:52:19 +00:00
Daniel Dunbar
11617c8666
MC/Mach-O/ARM: Clone off an ARM version of RecordScatteredRelocation until I figure out how it is supposed to work.
...
llvm-svn: 122410
2010-12-22 16:45:29 +00:00
Daniel Dunbar
dde72ef0c1
MC/Mach-O: Return to reporting errors if we see unexpected fixup kinds.
...
llvm-svn: 122409
2010-12-22 16:32:41 +00:00
Daniel Dunbar
a191cfd97e
MC/Mach-O/ARM: Recognize generic _Data_N fixup kinds.
...
llvm-svn: 122408
2010-12-22 16:32:37 +00:00
Daniel Dunbar
9ccf843a61
MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.
...
llvm-svn: 122407
2010-12-22 16:19:24 +00:00
Daniel Dunbar
56f13732e2
MC/Mach-O/ARM: Fix thinko.
...
llvm-svn: 122406
2010-12-22 16:19:20 +00:00
Rafael Espindola
50ce2f06de
Use references and simplify.
...
llvm-svn: 122405
2010-12-22 16:11:57 +00:00
Rafael Espindola
73c0ae77ca
Simplify the handling of .size expressions.
...
llvm-svn: 122404
2010-12-22 16:03:00 +00:00