Jay Foad
29426e87c1
Phi nodes always use an even number of operands, so don't ever allocate
...
an odd number.
llvm-svn: 129270
2011-04-11 09:25:51 +00:00
John McCall
2d2e870745
More __unknown_anytype work.
...
llvm-svn: 129269
2011-04-11 07:02:50 +00:00
NAKAMURA Takumi
62920834fa
docs/CommandGuide/index.html: Fix CSS url to relative.
...
llvm-svn: 129268
2011-04-11 03:27:38 +00:00
NAKAMURA Takumi
2a7024fa6c
docs/CommandLine.html: "ize.
...
llvm-svn: 129267
2011-04-11 03:27:31 +00:00
Howard Hinnant
40dab2ce86
http://llvm.org/bugs/show_bug.cgi?id=9672
...
llvm-svn: 129266
2011-04-11 02:18:41 +00:00
Anders Carlsson
8a01a751c9
Remove CK_DynamicToNull.
...
llvm-svn: 129265
2011-04-11 02:03:26 +00:00
Anders Carlsson
c1c9971cab
When we know that a dynamic_cast always returns null, we can make
...
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast
exception.
llvm-svn: 129264
2011-04-11 01:45:29 +00:00
Anders Carlsson
267c0c930e
Add CXXDynamicCastExpr::isAlwaysNull() which will be replacing the cast kind I added.
...
llvm-svn: 129263
2011-04-11 01:43:55 +00:00
Anders Carlsson
882d790f72
Clean up CodeGenFunction::EmitDynamicCast. No functionality change.
...
llvm-svn: 129262
2011-04-11 00:46:40 +00:00
Anders Carlsson
98981b10c8
Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.
...
llvm-svn: 129261
2011-04-11 00:30:07 +00:00
Eli Friedman
554eba9c08
PR9669: implement correct checking for [dcl.init.string]p2.
...
llvm-svn: 129260
2011-04-11 00:23:45 +00:00
Bill Wendling
35a9c3cd72
Revert r129235 pending a vetting of the EH rewrite.
...
--- Reverse-merging r129235 into '.':
D test/Feature/bb_attrs.ll
U include/llvm/BasicBlock.h
U include/llvm/Bitcode/LLVMBitCodes.h
U lib/VMCore/AsmWriter.cpp
U lib/VMCore/BasicBlock.cpp
U lib/AsmParser/LLParser.cpp
U lib/AsmParser/LLLexer.cpp
U lib/AsmParser/LLToken.h
U lib/Bitcode/Reader/BitcodeReader.cpp
U lib/Bitcode/Writer/BitcodeWriter.cpp
llvm-svn: 129259
2011-04-10 23:18:04 +00:00
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