Ted Kremenek
79db7b7b17
Per a suggestion from Cristian Draghici, add a method to FormatSpecifier that returns the expected type of the matching data argument. It isn't complete, but should handle several of the important cases.
...
llvm-svn: 94851
2010-01-29 22:59:32 +00:00
Bob Wilson
1b8453067b
Preserve load alignment in instcombine transformations. I've been unable to
...
create a testcase where this matters. The select+load transformation only
occurs when isSafeToLoadUnconditionally is true, and in those situations,
instcombine also changes the underlying objects to be aligned. This seems
like a good idea regardless, and I've verified that it doesn't pessimize
the subsequent realignment.
llvm-svn: 94850
2010-01-29 22:39:21 +00:00
Devang Patel
bb4820dc8e
Use appropriate context for typedefs.
...
llvm-svn: 94849
2010-01-29 22:29:31 +00:00
Dan Gohman
2bf486eb14
Minor code cleanup.
...
llvm-svn: 94848
2010-01-29 21:57:46 +00:00
Dan Gohman
df22bbf76c
Skip whitespace when looking for a potential intended match.
...
Before:
<stdin>:94:1: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
After:
<stdin>:94:2: note: possible intended match here
movsd 4096(%rsi), %xmm0
^
llvm-svn: 94847
2010-01-29 21:55:16 +00:00
Dan Gohman
838fb09a75
Fix the position of the caret in the FileCheck error message.
...
Before:
test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
After:
test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input
; CHECK: movsd -2048(%rsi), %xmm0
^
llvm-svn: 94846
2010-01-29 21:53:18 +00:00
Junjie Gu
6abe6cb8b5
Make sure the size is doubled (not 4x).
...
llvm-svn: 94845
2010-01-29 21:34:26 +00:00
Sean Callanan
fd86e790cc
Removed symbols from .exports that are not yet in
...
the library.
llvm-svn: 94844
2010-01-29 21:21:44 +00:00
Dale Johannesen
ad00f03e86
Add assertion to humor the paranoid.
...
llvm-svn: 94843
2010-01-29 21:21:28 +00:00
Victor Hernandez
6b7f4216b6
We were not writing bitcode for function-local metadata whose operands have been erased (making it not have any more function-local operands)
...
llvm-svn: 94842
2010-01-29 21:19:19 +00:00
Eric Christopher
5a0e174863
Revert my last couple of patches. They appear to have broken bison.
...
llvm-svn: 94841
2010-01-29 21:16:24 +00:00
Jeffrey Yasskin
b36dc68f61
Rename two IRReader.h functions to indicate that they return a Module
...
that loads its contents lazily from bitcode. I think these are the
only remaining mis-named functions.
llvm-svn: 94840
2010-01-29 21:11:04 +00:00
Daniel Dunbar
1299819f71
Driver: Don't honor -std-default for C++, this makes it hard to run the gdb test
...
suite with clang++ enabled.
The right fix here is PR6175, although we would still have to find a different
work around for the gdb test suite.
llvm-svn: 94838
2010-01-29 21:03:02 +00:00
Ted Kremenek
8d9842d43f
Switch Sema over to using the new implementation of format string
...
checking. It passes all existing tests, and the diagnostics have been
refined to provide better range information (we now highlight
individual format specifiers) and more precise wording in the
diagnostics.
llvm-svn: 94837
2010-01-29 20:55:36 +00:00
Bob Wilson
34e10c2218
Use uint64_t instead of unsigned for offsets and sizes.
...
llvm-svn: 94835
2010-01-29 20:34:28 +00:00
Ted Kremenek
23a71a1cdf
Enhancements to the alternate (WIP) format string checking:
...
- Add ConversionSpecifier::consumesDataArgument() as a helper method
to determine if a conversion specifier requires a matching argument.
- Add support for glibc-specific '%m' conversion
- Add an extra callback to HandleNull() for locations within the
format specifier that have a null character
llvm-svn: 94834
2010-01-29 20:29:53 +00:00
Dan Gohman
6bd1dee261
Add svn:ignore properties.
...
llvm-svn: 94833
2010-01-29 19:43:48 +00:00
Douglas Gregor
aa6050b0e2
PR5909 had a test case for binding of const, non-volatile references
...
to bitfields. Add it here.
llvm-svn: 94832
2010-01-29 19:42:41 +00:00
Douglas Gregor
d1e08648c6
Fix reference-binding when we have a reference to const volatile type;
...
previously, we were allowing this to bind to a temporary. Now, we
don't; add test-cases and improve diagnostics.
llvm-svn: 94831
2010-01-29 19:39:15 +00:00
Ted Kremenek
db4b7710f7
Fix subtle bug in Preprocessor::AdvanceToTokenCharacter(): use '+=' instead of '='.
...
llvm-svn: 94830
2010-01-29 19:38:24 +00:00
Bob Wilson
7c42b9d51e
Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
...
indices are safe if the result is known to be within the bounds of the
underlying object.
llvm-svn: 94829
2010-01-29 19:19:08 +00:00
Douglas Gregor
65eb86e912
Fix reference binding of const lvalue references to bit-fields, which
...
requires a temporary. Previously, we were building an initialization
sequence that bound to the bit-field as if it were a real lvalue. Note
that we previously (and still) diagnose binding of non-const
references to bit-fields, as we should.
There's no real way to test that this code is correct, since reference
binding does not *currently* have any representation in the AST. This
fix should make it easier for that to happen, so I've verified this
fix with...
Added InitializationSequence::dump(), to print an initialization
sequence for debugging purposes.
llvm-svn: 94826
2010-01-29 19:14:02 +00:00
Jeffrey Yasskin
9fb8ce835d
Belatedly document r85295 and r85330.
...
llvm-svn: 94825
2010-01-29 19:10:38 +00:00
Anders Carlsson
7c5fe48060
And yet another call.
...
llvm-svn: 94824
2010-01-29 18:43:53 +00:00
Anders Carlsson
a68e51e3a1
Another PerformCopyInitialization call bites the dust.
...
llvm-svn: 94823
2010-01-29 18:37:50 +00:00
Devang Patel
aedd6f5b33
Add size and location info in DW_TAG_class_type descriptor.
...
llvm-svn: 94822
2010-01-29 18:34:58 +00:00
Devang Patel
156b11368a
New test case.
...
llvm-svn: 94821
2010-01-29 18:32:33 +00:00
Devang Patel
7f8be9ba95
Before inserting llvm.dbg.declare intrinsic at the end of a basic block, check whether the basic block has a terminator or not.
...
This API is used by clang and the test case is test/CodeGen/debug-info-crash.c in clang module.
llvm-svn: 94820
2010-01-29 18:30:57 +00:00
Anders Carlsson
6f923f89c3
Get rid of another old PerformCopyInitialization call.
...
llvm-svn: 94819
2010-01-29 18:30:20 +00:00
Devang Patel
92e2541599
Maintain a map of regions (lexical scopes) and use it to find context for a global variable.
...
llvm-svn: 94817
2010-01-29 18:11:03 +00:00
Ted Kremenek
aecfa9adf9
Add comment to test linking it back to the original Bugzilla PR.
...
llvm-svn: 94816
2010-01-29 18:07:41 +00:00
Douglas Gregor
4b4844f88d
When naming a function template via a qualified-id (or any other way
...
that ADL is suppressed), we need to build an
UnresolvedLookupExpr. Fixes PR6063, which was hitting Boost headers
pretty hard.
llvm-svn: 94814
2010-01-29 17:15:43 +00:00
Daniel Dunbar
ce9a4faea5
cindex/Python: Update to support _getInstantiationLocation's new offset value.
...
llvm-svn: 94813
2010-01-29 17:02:32 +00:00
Daniel Dunbar
6596984f3c
Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.
...
llvm-svn: 94812
2010-01-29 17:02:25 +00:00
Douglas Gregor
16810ca647
Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.
...
llvm-svn: 94811
2010-01-29 16:37:09 +00:00
Benjamin Kramer
37aa4508e2
Fix typo found by clang++. Yay for -Wuninitialized.
...
llvm-svn: 94810
2010-01-29 15:58:21 +00:00
Benjamin Kramer
ef14f80e95
Fix MSVC build.
...
llvm-svn: 94809
2010-01-29 15:19:06 +00:00
Benjamin Kramer
b17c58674e
Convert some users of ftostr to raw_ostream.
...
llvm-svn: 94808
2010-01-29 14:42:22 +00:00
Benjamin Kramer
6bee24ae9a
Use llvm::format instead of ftostr (which just calls sprintf).
...
llvm-svn: 94807
2010-01-29 14:40:33 +00:00
Chandler Carruth
7e6c0fcc59
Bring driver link order in CMake into alignment with the order in the Makefile.
...
This includes the fix in r94797 to reflect the new dependency of Sema on
Analysis.
llvm-svn: 94806
2010-01-29 10:03:42 +00:00
Duncan Sands
3327498095
Change the SREM case to match the logic in the IR version ComputeMaskedBits.
...
llvm-svn: 94805
2010-01-29 09:45:26 +00:00
Evan Cheng
297a494f55
Catch more trivial tail call opportunities: no inputs and output types match.
...
llvm-svn: 94804
2010-01-29 06:45:59 +00:00
Anders Carlsson
385ab187e6
Add getters.
...
llvm-svn: 94803
2010-01-29 06:34:33 +00:00
Duncan Sands
c8a3e56870
Having RHSKnownZero and RHSKnownOne be alternative names for KnownZero and KnownOne
...
(via APInt &RHSKnownZero = KnownZero, etc) seems dangerous and confusing to me: it
is easy not to notice this, and then wonder why KnownZero/RHSKnownZero changed
underneath you when you modified RHSKnownZero/KnownZero etc. So get rid of this.
No intended functionality change (tested with "make check" + llvm-gcc bootstrap).
llvm-svn: 94802
2010-01-29 06:18:46 +00:00
Duncan Sands
26cd6bd0b0
It looks like the changes to the SRem logic of SimplifyDemandedUseBits
...
(fix for PR6165) are needed here too.
llvm-svn: 94801
2010-01-29 06:18:37 +00:00
Anders Carlsson
42c876dff2
Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.
...
llvm-svn: 94800
2010-01-29 05:41:25 +00:00
Anders Carlsson
db78f0ad04
Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).
...
llvm-svn: 94799
2010-01-29 05:24:29 +00:00
Anders Carlsson
5d8645b150
Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).
...
llvm-svn: 94798
2010-01-29 05:05:36 +00:00
Zhongxing Xu
0fcbe369aa
Fix linking problem on Linux.
...
llvm-svn: 94797
2010-01-29 03:25:47 +00:00
Daniel Dunbar
45c7ff1d79
ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
...
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.
llvm-svn: 94796
2010-01-29 03:22:29 +00:00