Evan Cheng
47c9750f04
Do not fold away subreg_to_reg if the source register has a sub-register index. That means the source register is taking a sub-register of a larger register. e.g. On x86
...
%RAX<def> = ...
%RAX<def> = SUBREG_TO_REG 0, %EAX:3<kill>, 3
The first def is defining RAX, not EAX so the top bits were not zero-extended.
llvm-svn: 67511
2009-03-23 07:19:58 +00:00
Chris Lattner
f2b60658ef
fix a bug Alexei Svitkine pointed out.
...
llvm-svn: 67510
2009-03-23 06:46:20 +00:00
Chris Lattner
fb95472123
When we restore signal handlers, restore them back to what they
...
were when we came around, not to their default handler. This
should fix PR3848
llvm-svn: 67509
2009-03-23 05:55:36 +00:00
Chris Lattner
f299a68ee0
factorize signal registration, part of PR3848.
...
llvm-svn: 67508
2009-03-23 05:42:29 +00:00
Dan Gohman
772de0ae2d
Fix a grammaro in a comment that Bill noticed.
...
llvm-svn: 67507
2009-03-23 05:02:44 +00:00
Eli Friedman
449fe54cff
Minor Evaluate cleanup; add some boilerplate implementations to
...
Evaluate for __extension__ and __builtin_choose_expr.
llvm-svn: 67506
2009-03-23 04:56:01 +00:00
Chris Lattner
57be315d36
tt'ify.
...
llvm-svn: 67505
2009-03-23 04:53:34 +00:00
Chris Lattner
30bc972596
VC++ 6.0 is not future work :)
...
Do not recommend llvm::OStream anymore. Use raw_ostream or MemoryBuffer.
llvm-svn: 67504
2009-03-23 04:52:53 +00:00
Eli Friedman
6400433980
Minor enhancements to Evaluate.
...
llvm-svn: 67503
2009-03-23 04:38:34 +00:00
Dan Gohman
70d9929def
Add comments explaining why there's only one register for
...
i8 return values.
llvm-svn: 67502
2009-03-23 04:28:24 +00:00
Eli Friedman
31a20d680a
Some minor fixes for complex IRGen.
...
llvm-svn: 67501
2009-03-23 04:08:46 +00:00
Evan Cheng
3138f7a781
Missed this as part of r67451.
...
llvm-svn: 67500
2009-03-23 03:45:56 +00:00
Eli Friedman
7b4716750b
Fix a subtle bug in CodeGen for the increment of a bitfield.
...
llvm-svn: 67499
2009-03-23 03:00:06 +00:00
Ted Kremenek
43e2deee22
Update checker build.
...
llvm-svn: 67498
2009-03-23 02:00:36 +00:00
Eli Friedman
ba961a920a
Add some FIXMEs relating to incomplete types.
...
llvm-svn: 67497
2009-03-23 00:24:07 +00:00
Eli Friedman
04841eebcb
Fix a few more instances of "&>".
...
llvm-svn: 67496
2009-03-23 00:04:01 +00:00
Sebastian Redl
3b27be6ceb
Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.
...
llvm-svn: 67495
2009-03-23 00:00:23 +00:00
Eli Friedman
80160bd483
Partial implementation of PR3342: break out pointer sign
...
incompatibilities in assignments from other pointer incompatibilities.
Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign,
but I don't know the driver code very well.)
llvm-svn: 67494
2009-03-22 23:59:44 +00:00
Daniel Dunbar
a0c89be9cc
Driver: Drop code for checking bounds in SeparateArg::render, this
...
situation should never occur now that arguments are parsed correctly.
llvm-svn: 67493
2009-03-22 23:50:14 +00:00
Sebastian Redl
b28b407121
Disallow catching exceptions by rvalue reference.
...
llvm-svn: 67492
2009-03-22 23:49:27 +00:00
Eli Friedman
e8dd7b3228
Adjust isModifiableLvalue to give a slightly more useful diagnostic for
...
attempting to illegally modify a BlockDeclRefExpr.
llvm-svn: 67491
2009-03-22 23:26:56 +00:00
Daniel Dunbar
d8500f3b0f
Driver: Implement 'missing argument' error.
...
llvm-svn: 67490
2009-03-22 23:26:43 +00:00
Eli Friedman
7fa3faa417
Fix code to mark block variables as const to actually work. Fix
...
isObjCObjectPointerType to work with qualified types. Adjust test for
changes.
If the SemaExpr changes are wrong or break existing code, feel free to
delete the "ExprTy.addConst();" line and revert my changes to
test/Sema/block-literal.c.
llvm-svn: 67489
2009-03-22 23:00:19 +00:00
Sebastian Redl
e88b229b48
.td files have been used for a few days without complaint. Kill the .def files.
...
llvm-svn: 67488
2009-03-22 22:58:53 +00:00
Sebastian Redl
e97585f717
Implement static_cast from lvalue to rvalue reference.
...
llvm-svn: 67487
2009-03-22 22:30:06 +00:00
Eli Friedman
38f8493752
Add testcase for incomplete call/return types for calls.
...
llvm-svn: 67486
2009-03-22 22:03:03 +00:00
Eli Friedman
3164fb15e2
Check that the return/argument types of calls are complete.
...
llvm-svn: 67485
2009-03-22 22:00:50 +00:00
Chris Lattner
e64911a4ae
switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction
...
functionality, fixing a crash on the attached testcase. Eliminate the
BuiltinFunctions cache, as it can contain dangling pointers. This fixes
a bunch of valgrind errors on test/CodeGen/builtins.c
llvm-svn: 67484
2009-03-22 21:56:56 +00:00
Eli Friedman
bae2042bb5
Don't use &> in tests; dash doesn't understand it.
...
llvm-svn: 67483
2009-03-22 21:49:20 +00:00
Chris Lattner
5404169327
emit aliases as the definitions fly by, don't bother deferring until
...
the end of the module.
llvm-svn: 67482
2009-03-22 21:47:11 +00:00
Chris Lattner
827a3552a4
make alias definition logic more similar to functions/globals.
...
llvm-svn: 67481
2009-03-22 21:39:12 +00:00
Sebastian Redl
b7d6491a7e
Fix build from r67476 and address the easy part of Doug's comments on rvalue refs.
...
llvm-svn: 67480
2009-03-22 21:28:55 +00:00
Chris Lattner
a5ae54acc4
fix PR3200 by making alias emission use the new infrastructure. Fold
...
some tests into the alias.c file.
llvm-svn: 67479
2009-03-22 21:21:57 +00:00
Chris Lattner
d480892445
pull "runtime globals" into the same framework as other functions/global variables.
...
No intended functionality change.
llvm-svn: 67478
2009-03-22 21:03:39 +00:00
Eli Friedman
d6a7b72944
Remove dead code.
...
llvm-svn: 67477
2009-03-22 20:54:47 +00:00
Anders Carlsson
576cc6f725
Disallow abstract types where appropriate.
...
llvm-svn: 67476
2009-03-22 20:18:17 +00:00
Chris Lattner
75acb0c356
fix a fixme: non-proto struct returning function definitions should be compiled
...
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {
llvm-svn: 67475
2009-03-22 19:35:37 +00:00
Chris Lattner
377b9c84d0
add some missing type predicates.
...
llvm-svn: 67474
2009-03-22 19:29:18 +00:00
Chris Lattner
b6ff0f3a4d
Fix PR3860 by correcting a predicate.
...
llvm-svn: 67473
2009-03-22 19:22:53 +00:00
Nuno Lopes
34cef4c1c8
fix PR3859: crash with 'cc -V'
...
llvm-svn: 67472
2009-03-22 17:47:44 +00:00
Duncan Sands
b1656c1e1f
Add some explanations of how apint loads and stores
...
work.
llvm-svn: 67471
2009-03-22 11:33:16 +00:00
Bill Wendling
a443ab4bcd
Really should pass -dylib to the linker...
...
llvm-svn: 67469
2009-03-22 08:56:15 +00:00
Bill Wendling
f3ef2c758f
A dylib should be built as a dylib and not a bundle.
...
llvm-svn: 67468
2009-03-22 08:28:45 +00:00
Ted Kremenek
dc637a0be9
PTHManager::Create():
...
- Make the Diagnostic::Level for PTH errors to be specified by the caller
clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).
llvm-svn: 67462
2009-03-22 06:42:39 +00:00
Anders Carlsson
7cbd8fb6b0
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.
...
llvm-svn: 67461
2009-03-22 01:52:17 +00:00
Chris Lattner
e09ad90882
don't set the name of a call instruction to "call" in release-asserts
...
build. This shaves another 3% off.
llvm-svn: 67460
2009-03-22 00:32:22 +00:00
Chris Lattner
47640221da
fix CreateTempAlloca to not set a name on the alloca for temporaries
...
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.
This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%
llvm-svn: 67459
2009-03-22 00:24:14 +00:00
Chris Lattner
adda37fb62
add method to access a template argument.
...
llvm-svn: 67458
2009-03-22 00:18:18 +00:00
Chris Lattner
4ff71de880
set function/global names with setName instead of passing the name into the
...
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%
llvm-svn: 67457
2009-03-22 00:12:30 +00:00
Chris Lattner
17556b2d95
fix some warnings in release-assert mode.
...
llvm-svn: 67456
2009-03-22 00:10:22 +00:00