Chris Lattner
5c12367b44
switch clang off StandardPasses.h onto PassManagerBuilder.h
...
llvm-svn: 131808
2011-05-21 20:40:11 +00:00
Chris Lattner
790cb34f93
add a new PassManagerBuilder class to replace StandardPasses.h
...
llvm-svn: 131807
2011-05-21 20:39:42 +00:00
Chris Lattner
4c0d9e2249
add a copy ctor to TargetLibraryInfo.
...
llvm-svn: 131806
2011-05-21 20:09:13 +00:00
Douglas Gregor
347e0f26be
Fix our handling of the warning when one tries to pass a
...
non-POD/non-trivial object throuugh a C-style varargs. The warning
itself was default-mapped to error, but can be downgraded, but we were
treating it in Sema like a hard error, silently dropping the call.
Instead, treat this problem like a warning, and do what the warning
says we do: abort at runtime. To do so, we fake up a __builtin_trap()
expression that gets evaluated as part of the argument.
llvm-svn: 131805
2011-05-21 19:26:31 +00:00
Eli Friedman
e08bca9eb4
Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,
...
and stop abusing the multi-level dereference isa<> used to allow.
llvm-svn: 131804
2011-05-21 19:15:39 +00:00
Eli Friedman
3de2ddc578
PR7952: Make isa<> use the same logic as cast<>, so that they both work
...
consistently.
llvm-svn: 131803
2011-05-21 19:13:10 +00:00
Douglas Gregor
781ba6e407
Diagnose the presence of storage-class-specifiers on explicit
...
instantiations and specializations. Fixes <rdar://problem/9126453> and PR8700.
llvm-svn: 131802
2011-05-21 18:53:30 +00:00
Benjamin Kramer
e30b70073a
X86: smulo -> add is now done target-independently in DAGCombiner, remove the patterns.
...
llvm-svn: 131801
2011-05-21 18:32:01 +00:00
Benjamin Kramer
2fd48f2730
Implement mulo x, 2 -> addo x, x in DAGCombiner.
...
llvm-svn: 131800
2011-05-21 18:31:55 +00:00
Benjamin Kramer
e08fb1dce9
Merge and FileCheckize test cases.
...
llvm-svn: 131799
2011-05-21 18:31:48 +00:00
Benjamin Kramer
fda5dc4968
Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
...
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X".
llvm-svn: 131798
2011-05-21 18:31:42 +00:00
Douglas Gregor
097984480d
Clang is now correctly marking this as a class, so update the test case accordingly
...
llvm-svn: 131797
2011-05-21 18:17:06 +00:00
Douglas Gregor
9574af6ea2
Teach Sema::ActOnUninitializedDecl() not to try to interpret when one
...
should use a constructor to default-initialize a
variable. InitializationSequence knows the rules for default
initialization, better. Fixes <rdar://problem/8501008>.
llvm-svn: 131796
2011-05-21 17:52:48 +00:00
Charles Davis
6879634efd
Don't allow .seh_handler and .seh_handlerdata directives inside chained
...
unwind areas.
llvm-svn: 131795
2011-05-21 17:36:25 +00:00
Douglas Gregor
643c922e66
Introduce the -fdiagnostics-format=xxx option to control how Clang
...
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.
Note that we no longer change the diagnostic format based on
-fms-extensions.
Patch by Andrew Fish!
llvm-svn: 131794
2011-05-21 17:07:29 +00:00
Douglas Gregor
61b6e49ee1
A few more is(Un)signedIntegerType/is(Un)signedOrEnumerationType cleanups.
...
llvm-svn: 131793
2011-05-21 16:28:01 +00:00
Douglas Gregor
253cadfe68
Implement C++0x semantics for passing non-POD classes through varargs.
...
llvm-svn: 131792
2011-05-21 16:27:21 +00:00
Charles Davis
8e8f59bdfb
A handler for a function in the Win64 EH scheme can be both an unwind handler
...
and an exception handler. Handle that case.
Also, add an 'Emitted' member to the MCWin64EHUnwindInfo struct. It will be
needed later.
llvm-svn: 131791
2011-05-21 15:57:49 +00:00
Benjamin Kramer
691731eb9c
InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)
...
llvm-svn: 131789
2011-05-21 09:22:06 +00:00
Argyrios Kyrtzidis
627c14a068
Only ignore extra tokens after #else if we skip it, otherwise warn. Fixes rdar://9475098.
...
llvm-svn: 131788
2011-05-21 04:26:04 +00:00
Cameron Zwarich
faeb520c97
Fix PR9978 by adding RIP to GR64_TC so it can be used as an address in PIC code. It
...
is already in GR64 for the same reasons. Since it isn't allocatable it can't cause
any problems.
llvm-svn: 131787
2011-05-21 04:13:49 +00:00
Akira Hatanaka
2df6c010aa
Use the correct register to access stack frame objects.
...
llvm-svn: 131785
2011-05-21 03:01:03 +00:00
Akira Hatanaka
f084fcd7fe
Insert instructions that copy $sp to or from $fp at the right locations.
...
llvm-svn: 131784
2011-05-21 02:29:26 +00:00
Dan Gohman
8b20187c82
When BasicAA can determine that two pointers have the same base but
...
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131781
2011-05-21 01:05:08 +00:00
Andrew Trick
d5d0764b3b
Have Program::Wait return -2 for crashed and timeouts instead of embedding
...
info in the error message. Per Dan's request.
llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Johnny Chen
1c464d4961
A little refactoring.
...
llvm-svn: 131779
2011-05-21 00:55:57 +00:00
Johnny Chen
e7faaa6688
When in non-raw mode and edis fails to parse the tokens of the instruction, output
...
the raw disassembly so that the opcode aligns with the edis'ed disassembly.
llvm-svn: 131773
2011-05-21 00:44:42 +00:00
Charles Davis
54254008ba
Set the "LastFrameInst" field when streaming a .seh_setframe directive. This
...
is needed for an upcoming patch.
llvm-svn: 131772
2011-05-21 00:09:04 +00:00
Greg Clayton
21c5ab4fe1
Lock the target API mutex correctly in all cases and make sure m_opaque_sp
...
contains a valid pointer before trying to access the target.
llvm-svn: 131771
2011-05-20 23:51:26 +00:00
Ted Kremenek
109b127e02
Fix regression in static analyzer's handling of prefix '--' operator. It was being treated as postfix '--' in C mode.
...
llvm-svn: 131770
2011-05-20 23:40:06 +00:00
Greg Clayton
adc00cb2ba
Centralize the code that gathers the thread ID list from the remote GDB
...
server so that it happens in command sequence where no other packets can
sneak between.
llvm-svn: 131769
2011-05-20 23:38:13 +00:00
Cameron Zwarich
d7ee0fcac9
Fix PR9962 by properly constraining register classes in RemoveCopyByCommutingDef(). This
...
actually fixes most of the VerifyCoalescing failures in test-suite.
llvm-svn: 131768
2011-05-20 23:25:36 +00:00
Akira Hatanaka
0837692ac6
Change the order fixed objects are created in MipsTargetLowering::LowerCall in
...
preparation for reversing StackDirection.
Fixed objects are created in the following order:
1. Incoming arguments passed on stack.
2. va_arg objects (include both arguments that are passed in registers and
pointer to the location of the first va_arg argument).
3. $gp restore slot.
4. Outgoing arguments passed on stack.
5. Pointer to alloca'd space.
llvm-svn: 131767
2011-05-20 23:22:14 +00:00
Peter Collingbourne
f5c22943eb
Fix build error - strstr returns a const char *
...
llvm-svn: 131766
2011-05-20 22:42:59 +00:00
Charles Davis
1a1d4777b9
Fix typo. When will I learn?
...
llvm-svn: 131765
2011-05-20 22:23:34 +00:00
Eli Friedman
60afcc2a6f
Add fast-isel support for byval calls on x86.
...
llvm-svn: 131764
2011-05-20 22:21:04 +00:00
Charles Davis
bc1feb1f25
Add .pdata and .xdata sections to the COFF TLOF implementation.
...
llvm-svn: 131763
2011-05-20 22:13:55 +00:00
Greg Clayton
43479731c0
Now that we have dynamic values, we need to protect the GetChildAtIndex()
...
calls with the target API mutex.
llvm-svn: 131762
2011-05-20 22:07:17 +00:00
Howard Hinnant
6282a4a1d3
This is a simplified (and superior) implementation of __invoke, __invokable and __invoke_of. It is superior in that __invoke now handles reference qualified member functions whereas the previous implementation did not. And it simply has less infrastructure in its implementation. I'm still learning how to program in C++11 (and probably will be for a long time). This change does not impact the behavior we're seeing in http://llvm.org/bugs/show_bug.cgi?id=9975
...
llvm-svn: 131761
2011-05-20 22:02:53 +00:00
Jim Grosbach
8aded86edb
No reason not to allow defining the CFA as a reg w/ offset zero.
...
llvm-svn: 131760
2011-05-20 21:50:09 +00:00
Alexis Hunt
a671bca618
Add a missing case for default constructor deletion.
...
This case is tested by the fact that the modified test produces
significatly worse diagnostics. That's on the list.
llvm-svn: 131759
2011-05-20 21:43:47 +00:00
Akira Hatanaka
7c619f174a
In CC_MipsO32, allocate a stack space regardless of whether the argument is
...
passed in register or on the stack.
llvm-svn: 131758
2011-05-20 21:39:54 +00:00
Jim Grosbach
17c1d13ee4
Fix typo.
...
llvm-svn: 131757
2011-05-20 21:35:39 +00:00
Jim Grosbach
83c4bb157a
Add support for frame info use of the .cfi_def_cfa directive.
...
llvm-svn: 131756
2011-05-20 21:23:17 +00:00
Jim Grosbach
860b03b5f9
Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.
...
llvm-svn: 131755
2011-05-20 21:22:37 +00:00
Sebastian Redl
d29f6086a4
Introduce XFAILed test for braced initializer lists.
...
llvm-svn: 131754
2011-05-20 21:07:01 +00:00
Akira Hatanaka
cae19e8671
Define functions that get/set maximum call frame size.
...
llvm-svn: 131752
2011-05-20 20:11:17 +00:00
Rafael Espindola
652bfdb1ab
adds some attributes to attribute section when cpu is "xscale"
...
(this is what used in Android NDK, when architecture is ARMv5)
patch by Koan-Sin Tan
llvm-svn: 131751
2011-05-20 20:10:34 +00:00
Rafael Espindola
1866808384
fixes target address tBL and tBLX and sets relocation type
...
of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6)
Patch by koan-sin tan.
llvm-svn: 131748
2011-05-20 20:01:01 +00:00
Argyrios Kyrtzidis
ac8bc12cd1
Add asserts in StringRef to make sure we avoid undefined behavior:
...
-strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL.
-memcmp should not be called with NULL (even if size is 0)
Patch by Matthieu Monrocq!
llvm-svn: 131747
2011-05-20 19:24:12 +00:00