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
Chris Lattner
37082e2a39
fix test
...
llvm-svn: 67455
2009-03-21 23:59:11 +00:00
Duncan Sands
1f15ca7c7a
Factorize out a concept - no functionality change.
...
llvm-svn: 67454
2009-03-21 21:27:31 +00:00
Mike Stump
efd7caa825
Fixup codegen for nested block literals so that we generate
...
copy_helpers and dispose_helpers as necessary for them.
llvm-svn: 67453
2009-03-21 21:00:35 +00:00
Douglas Gregor
221c9a5578
Fix a thinko in the pre-allocation strategy for structured initializer
...
lists. The code wasn't accounting for the distinction between the
top-level call to getStructuredSubobjectInit and later calls that
occur deeper in the hierarchy. This problem manifested itself as
over-allocation in cases where we have large arrays of small
structures (<rdar://problem/6707362>).
llvm-svn: 67452
2009-03-21 18:13:52 +00:00
Evan Cheng
15f1754eb4
Re-commit r67334 and r67349 with fix.
...
llvm-svn: 67451
2009-03-21 18:12:24 +00:00
Fariborz Jahanian
629aed9327
Issue error if variables are defined inside an objc class,
...
category or protocol.
llvm-svn: 67450
2009-03-21 18:06:45 +00:00
Daniel Dunbar
891d57155e
Frontend: Handle empty input on stdin.
...
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
llvm-svn: 67449
2009-03-21 17:56:30 +00:00
Daniel Dunbar
8e93780c86
Frontend: Handle empty input on stdin.
...
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
llvm-svn: 67448
2009-03-21 17:55:43 +00:00
Chris Lattner
45470943a9
now that all the decl reference and creation stuff is going through two
...
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.
llvm-svn: 67447
2009-03-21 09:44:56 +00:00
Chris Lattner
a85d68e5d8
fix a crash that could occur when a variable declaration became a
...
function definition.
llvm-svn: 67446
2009-03-21 09:25:43 +00:00
Chris Lattner
149927c9f8
simplify and cleanup global variable creation stuff to all go through one
...
code path.
llvm-svn: 67445
2009-03-21 09:16:30 +00:00
Chris Lattner
832323ea41
simplify management of llvm::Function creation to all go through
...
GetAddrOfFunction. This is simpler and more efficient.
llvm-svn: 67444
2009-03-21 08:53:37 +00:00
Chris Lattner
5eaee5692c
code cleanups, rename EmitForwardFunctionDefinition ->
...
CreateFunctionPrototypeIR, though my next patch will eliminate
it entirely.
llvm-svn: 67443
2009-03-21 08:38:50 +00:00
Chris Lattner
6574906818
fix several problems with asm renaming, by pulling it into the mangling code:
...
1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.
llvm-svn: 67442
2009-03-21 08:24:40 +00:00