Anders Carlsson
50ddb5cc0a
Remove the CodeGenCXX/dyncast.cpp test; it isn't really super useful to match on huge chunks of LLVM output.
...
llvm-svn: 129258
2011-04-10 23:15:15 +00:00
Anders Carlsson
c602006638
As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
...
represents a dynamic cast where we know that the result is always null.
For example:
struct A {
virtual ~A();
};
struct B final : A { };
struct C { };
bool f(B* b) {
return dynamic_cast<C*>(b);
}
llvm-svn: 129256
2011-04-10 20:33:22 +00:00
Howard Hinnant
784ba65787
Changes to cerrno to protect against the case the ELAST is not defined.
...
llvm-svn: 129255
2011-04-10 19:46:55 +00:00
John McCall
3aef3d8713
Simplify calling CheckPlaceholderExpr, converge on it in a few places,
...
and move a vector-splat check to follow l-value conversion.
llvm-svn: 129254
2011-04-10 19:13:55 +00:00
Anders Carlsson
c53d9e8350
Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.
...
llvm-svn: 129253
2011-04-10 18:20:53 +00:00
Anders Carlsson
e5ec21c977
Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.
...
llvm-svn: 129252
2011-04-10 18:00:32 +00:00
Howard Hinnant
1444d85b5a
time_get was missing the %F specifier. This change impacts the binary.
...
llvm-svn: 129251
2011-04-10 17:54:14 +00:00
Anders Carlsson
68aad14dd3
Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.
...
llvm-svn: 129250
2011-04-10 17:42:45 +00:00
Nicolas Geoffray
9137ee85de
Bugfix in the Cpp backend after API change on PHINode::Create.
...
llvm-svn: 129248
2011-04-10 17:39:40 +00:00
Oscar Fuentes
dbe99ba37d
CMake: support for using LLVM from client projects with find_package.
...
Patch by arrowdodger!
llvm-svn: 129247
2011-04-10 16:17:49 +00:00
Oscar Fuentes
643f1868de
Reflect rename on LLVM cmake file.
...
llvm-svn: 129246
2011-04-10 16:17:31 +00:00
Garrison Venn
88bd9d6bb8
Fixed more best practices, and explicit/implicit style guide issues.
...
llvm-svn: 129245
2011-04-10 14:06:52 +00:00
Chandler Carruth
016ef400c4
Enhance the diagnostic for literal float -> int conversions to suggest
...
rewriting the literal when the value is integral. It is not uncommon to
see code written as:
const int kBigNumber = 42e5;
Without any real awareness that this is no longer an ICE. The note helps
automate and ease the process of fixing code that violates the warning.
llvm-svn: 129243
2011-04-10 08:36:24 +00:00
Francois Pichet
8cb243a78f
Refactor 129240 to merge the old default argument into the new parameter.
...
llvm-svn: 129242
2011-04-10 04:58:30 +00:00
Eli Friedman
493c34a86c
PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.
...
While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.
llvm-svn: 129241
2011-04-10 04:44:11 +00:00
Francois Pichet
53fe2bb29e
MSVC accepts that default parameters be redefined for member functions
...
of template class. The new value is ignored.
This fixes 1 error when parsing MSVC 2010 header files with clang.
llvm-svn: 129240
2011-04-10 03:03:52 +00:00
Oscar Fuentes
87eb515aba
libclang output name is now libclang. This solves a name collision
...
when building with Visual Studio. `clang.dll' and `clang.exe' would
have the same `clang.ilk' and `clang.pdb'. On a serial build those
files would be overwritten as clang.exe/clang.dll are created. On a
parallel build there is a risk of both files being written at the same
time. On that case VS fails.
llvm-svn: 129239
2011-04-10 02:29:27 +00:00
Oscar Fuentes
fe40844fb6
Reword instructions for running tests on Visual Studio.
...
Suggested by Maël Hörz.
llvm-svn: 129237
2011-04-10 01:41:55 +00:00
Bill Wendling
3d5450d809
Beginning of the Great Exception Handling Rewrite.
...
* Add a "landing pad" attribute to the BasicBlock.
* Modify the bitcode reader and writer to handle said attribute.
Later: The verifier will ensure that the landing pad attribute is used in the
appropriate manner. I.e., not applied to the entry block, and applied only to
basic blocks that are branched to via a `dispatch' instruction.
(This is a work-in-progress.)
llvm-svn: 129235
2011-04-10 00:04:27 +00:00
John McCall
39439739cf
Fix a bunch of major problems with __unknown_anytype and properly test
...
for them. The only major missing feature is references.
llvm-svn: 129234
2011-04-09 22:50:59 +00:00
Chris Lattner
b799b2d4be
drive by bug fix: DenseMapInfo::isEqual should be determined according to
...
isEqual of its members, not operator==.
llvm-svn: 129233
2011-04-09 21:20:23 +00:00
Chris Lattner
077f0179bb
LLVMCC_EMITIR_FLAG is already either -emit-llvm or -fplugin-arg-dragonegg-emit-ir, so don't add an extra leading -. Clang doesn't accept --emit-llvm.
...
llvm-svn: 129232
2011-04-09 19:56:28 +00:00
Eli Friedman
db42a3e876
Make sure we or together the overflow flags of the multiply and add, so the
...
check is triggered appropriately. Reported on cfe-dev.
llvm-svn: 129231
2011-04-09 19:54:33 +00:00
Chris Lattner
96d2507e79
make stuff work when LLVMCC_OPTION is something like installed-clang, not just clang.
...
llvm-svn: 129229
2011-04-09 19:53:16 +00:00
Chris Lattner
fc4fe00a65
fix rdar://8735979 - "int 3" doesn't match to "int3". Unfortunately,
...
InstAlias doesn't allow matching immediate operands, so we have to write
C++ code to do this.
llvm-svn: 129223
2011-04-09 19:41:05 +00:00
Chris Lattner
214f114aa7
look for the verboten argument slot access in any order, thanks to Frits
...
for pointing this out
llvm-svn: 129217
2011-04-09 17:00:34 +00:00
Lenny Maiorani
467dbd5f13
strcat() and strncat() model additions to CStringChecker.
...
Validates inputs are not NULL, checks for overlapping strings, concatenates the strings checking for buffer overflow, sets the length of the destination string to the sum of the s1 length and the s2 length, binds the return value to the s1 value.
llvm-svn: 129215
2011-04-09 15:12:58 +00:00
Benjamin Kramer
26e7768f38
Fix potential buffer overflow on win32.
...
llvm-svn: 129214
2011-04-09 14:06:12 +00:00
Dylan Noblesmith
92c07c27be
refactor flags for TokenKinds.def
...
Make KEYALL a combination of all other flags instead
of its own separate flag. Also rewrite the enum
definitions in hex instead of decimal.
llvm-svn: 129213
2011-04-09 13:34:05 +00:00
Dylan Noblesmith
70e73a3d60
refactor -ccc-gcc-name code
...
Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.
This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.
llvm-svn: 129212
2011-04-09 13:31:59 +00:00
Benjamin Kramer
2b6c96b43d
Don't store Twine temporaries, it's not safe.
...
And don't append the name over and over again in the loop.
llvm-svn: 129210
2011-04-09 11:26:27 +00:00
Benjamin Kramer
2792f2b86b
Make error message more useful.
...
llvm-svn: 129209
2011-04-09 10:10:35 +00:00
NAKAMURA Takumi
6bd36d56e4
docs/*.html: Make W3C HTML 4.01 Strict more compliant.
...
FIXME: The logo handling in ReleaseNotes.html
llvm-svn: 129208
2011-04-09 09:51:57 +00:00
Eli Friedman
9cca0715aa
Add back a couple checks removed by r129128; the fact that an intitializer
...
is an array of structures doesn't imply it's a ConstantArray of
ConstantStruct.
llvm-svn: 129207
2011-04-09 09:11:09 +00:00
Eli Friedman
c5b20b5283
PR8369: make __attribute((regparm(0))) work correctly. Original patch by
...
pageexec@freemail.hu , tweaks by me.
llvm-svn: 129206
2011-04-09 08:18:08 +00:00
Chandler Carruth
66a7b04767
Clean up the bool conversion warning. Group it with other conversion
...
warnings, and make its text appropriate for constant bool expressions
other than 'false'. This should finish off PR9612.
llvm-svn: 129205
2011-04-09 07:48:17 +00:00
Chandler Carruth
ffab873ed5
Add support for warning on general null pointer expressions of boolean
...
type rather than just the literal 'false'. This begins fixing PR9612,
but the message is now wrong. WIP, the cleanup of the messaging is next.
llvm-svn: 129204
2011-04-09 07:32:05 +00:00
Chris Lattner
88974f4625
fix PR9523, a crash in looprotate on a non-canonical loop made out of indirectbr.
...
llvm-svn: 129203
2011-04-09 07:25:58 +00:00
Chris Lattner
e4ec5abf1b
fix indentation
...
llvm-svn: 129202
2011-04-09 07:11:53 +00:00
Chris Lattner
5045cf1a61
accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,
...
per PR9577
llvm-svn: 129201
2011-04-09 07:09:31 +00:00
Chris Lattner
af1bccec68
Fix a bug where RecursivelyDeleteTriviallyDeadInstructions could
...
delete the instruction pointed to by CGP's current instruction
iterator, leading to a crash on the testcase. This fixes PR9578.
llvm-svn: 129200
2011-04-09 07:05:44 +00:00
Chris Lattner
cfe5aa65d2
Avoid excess precision issues that lead to generating host-compiler-specific code.
...
Switch lowering probably shouldn't be using FP for this. This resolves PR9581.
llvm-svn: 129199
2011-04-09 06:57:13 +00:00
Eli Friedman
17822fcde9
PR9604; try to deal with RAUW updates correctly in the AST. I'm not convinced
...
it's completely safe to cache the AST across LICM runs even with this fix,
but this fix can't hurt.
llvm-svn: 129198
2011-04-09 06:55:46 +00:00
Eli Friedman
4db39cefdb
Test for r129190.
...
llvm-svn: 129197
2011-04-09 06:39:43 +00:00
Chris Lattner
e53c95f180
fix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, which
...
is substantially different than a(b|c)d. Form the latter regex instead.
This found a few problems in the testsuite, which serves as its test.
llvm-svn: 129196
2011-04-09 06:37:03 +00:00
Chris Lattner
418b1037b0
fix two completely broken tests, which were matching due to PR9629.
...
llvm-svn: 129195
2011-04-09 06:34:38 +00:00
Chris Lattner
ea6afab4b0
remove a bunch of CHECK lines that aren't checking what
...
they thought they were, because alternation was expanding
wrong in {{}}'s.
llvm-svn: 129194
2011-04-09 06:31:06 +00:00
Chris Lattner
0687ec7051
regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
...
llvm-svn: 129193
2011-04-09 06:29:24 +00:00
Chris Lattner
53e0679d6f
various cleanups, no functionality change.
...
llvm-svn: 129192
2011-04-09 06:18:02 +00:00
Chris Lattner
8872ec3ff0
revert accidental commit.
...
llvm-svn: 129191
2011-04-09 06:01:28 +00:00