Douglas Gregor
a9af1d13da
PCH support for the first batch of statements, including null,
...
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
2009-04-17 00:04:06 +00:00
Anders Carlsson
e8eeffdf16
Add GetAddrOfCXXConstructor and use it.
...
llvm-svn: 69328
2009-04-16 23:57:24 +00:00
Anders Carlsson
2f3278bc09
Add constructor getter to CXXTemporaryObjectExpr.
...
llvm-svn: 69327
2009-04-16 23:53:22 +00:00
Anders Carlsson
e6840d84df
If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So
...
struct S {
S();
};
void f() {
S s;
}
's' here will implicitly be declared as.
S s = S();
llvm-svn: 69326
2009-04-16 23:50:50 +00:00
Chris Lattner
302279ed06
-Wall is -Wmost -Wparentheses
...
llvm-svn: 69324
2009-04-16 23:30:16 +00:00
Daniel Dunbar
f2df7c283f
Driver: Allow using clang as a precompiler, even if it is an
...
unsupported arch.
llvm-svn: 69322
2009-04-16 23:10:13 +00:00
Dan Gohman
fec1d086e0
Use TargetData::getTypeSizeInBits instead of getPrimitiveSizeInBits()
...
to get the correct answer for pointer types.
llvm-svn: 69321
2009-04-16 22:35:57 +00:00
Douglas Gregor
573b92468e
Clean up the declaration-decoding step in the PCH reader, using the
...
same ueber-easy visitor scheme used for expressions/statements.
llvm-svn: 69320
2009-04-16 22:29:51 +00:00
Douglas Gregor
8f45df58b3
Prepare PCH reader and writer for (de-)serialization of statements. No
...
functionality change.
llvm-svn: 69319
2009-04-16 22:23:12 +00:00
Bob Wilson
b8c370a8b5
Fix PR3994: LLVMMatchType arguments do not refer to absolute return value
...
and argument positions but only to the overloaded intrinsic parameters.
Keep a separate list of these overloaded parameters in CodeGenTarget.cpp
so they can be resolved easily. Remove assertions from IntrinsicEmitter.cpp:
they were harmless but confusing, and the assertions elsewhere in TableGen
will catch any incorrect values.
llvm-svn: 69316
2009-04-16 21:51:05 +00:00
Fariborz Jahanian
68c4c61be8
Removed a no longer needed FIXME comment.
...
llvm-svn: 69315
2009-04-16 21:49:16 +00:00
Chris Lattner
11ceb38df0
make sure to unlock keymgr if the JIT is created and destroyed, all
...
locks must be matched with unlocks. Also, use calloc to allocate the
block so that it is properly zero'd. Thanks to Nick Kledzik for
tracking this down.
llvm-svn: 69314
2009-04-16 21:47:59 +00:00
Bob Wilson
de578e8cc6
Add a comment to describe LLVMMatchType.
...
llvm-svn: 69313
2009-04-16 21:46:42 +00:00
Eli Friedman
929207fd1d
Fix for PR3944: make mem2reg O(N) instead of O(N^2) in the number of
...
incoming edges for a block with many predecessors.
llvm-svn: 69312
2009-04-16 21:40:28 +00:00
Dan Gohman
72dc8452a3
Handle a pointer type correctly in SCEVExpander::visitAddRecExpr.
...
llvm-svn: 69310
2009-04-16 21:34:54 +00:00
Dan Gohman
eefba6bbe0
In the list-burr's pseudo two-addr dependency heuristics, don't
...
add dependencies on nodes with exactly one successor which is a
COPY_TO_REGCLASS node. In the case that the copy is coalesced
away, the dependence should be on the user of the copy, rather
than the copy itself.
llvm-svn: 69309
2009-04-16 20:59:02 +00:00
Dan Gohman
3027bb6953
Handle SUBREG_TO_REG instructions with the same heuristics
...
as INSERT_SUBREG instructions in the list-burr scheduler.
llvm-svn: 69308
2009-04-16 20:57:10 +00:00
Dan Gohman
c1c2ba7a72
Fix a bug with inttoptr/ptrtoint casts where the pointer has a different
...
size from the integer, requiring zero extension or truncation. Don't
create ZExtInsts with pointer types. This fixes a regression in
consumer-jpeg.
llvm-svn: 69307
2009-04-16 19:25:55 +00:00
Steve Naroff
a0c32704e2
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'.
...
llvm-svn: 69306
2009-04-16 19:02:57 +00:00
Fariborz Jahanian
bcf548760e
Category method synbols must be qualified by gategory name to
...
match gcc's.
llvm-svn: 69305
2009-04-16 18:34:20 +00:00
Devang Patel
dab01f3fd6
Do not treat beginning of inlined scope as beginning of normal function scope if the location info is missing.
...
Insetad of doing ...
if (inlined_subroutine && known_location)
DW_TAG_inline_subroutine
else
DW_TAG_subprogram
do
if (inlined_subroutine) {
if (known_location)
DW_TAG_inline_subroutine
} else {
DW_TAG_subprogram
}
llvm-svn: 69300
2009-04-16 17:55:30 +00:00
Sebastian Redl
1a99f441e6
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
...
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.
llvm-svn: 69299
2009-04-16 17:51:27 +00:00
Eli Friedman
8d25b096fa
Attempt to fix a read-after-free running test/Sema/designated-initializers.c.
...
Douglas, can you check that this is doing the right thing?
llvm-svn: 69298
2009-04-16 17:49:48 +00:00
Eli Friedman
027aa3cb0e
Force target triple for test depending on __weak.
...
llvm-svn: 69297
2009-04-16 17:33:37 +00:00
Dan Gohman
8b6ebb1112
Minor code simplifications. Don't attempt LSR on theoretical
...
targets with pointers larger than 64 bits, due to the code not
yet being APInt clean.
llvm-svn: 69296
2009-04-16 16:49:48 +00:00
Dan Gohman
e2ead2c328
LSR is no longer a GEP optimizer. It is now an IV expression
...
optimizer, which just happen to frequently involve optimizing GEPs.
llvm-svn: 69295
2009-04-16 16:46:01 +00:00
Dan Gohman
e98ead45e2
Fix SCEVExpander::visitSMaxExpr and SCEVExpander::visitUMaxExpr to
...
not create ICmpInsts with operands of different types. This fixes
a regression in Applications/d/make_dparser.
llvm-svn: 69294
2009-04-16 16:15:25 +00:00
Dan Gohman
66e038a3e3
Teach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtoint
...
and ptrtoint-of-inttoptr expressions. This fixes a regression in 300.twolf.
llvm-svn: 69293
2009-04-16 15:52:57 +00:00
Anders Carlsson
8798bd1bf9
When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer.
...
llvm-svn: 69292
2009-04-16 15:50:16 +00:00
Dan Gohman
a8be04b2db
Use ConstantExpr::getIntToPtr instead of SCEVExpander::InsertCastOfTo,
...
since the operand is always a constant.
llvm-svn: 69291
2009-04-16 15:48:38 +00:00
Dan Gohman
71bccd3e0e
Use a SCEV expression cast instead of immediately inserting a
...
new instruction with SCEVExpander::InsertCastOfTo.
llvm-svn: 69290
2009-04-16 15:47:35 +00:00
Daniel Dunbar
426b5cf16a
Ensure that the most recent declaration of a tentative definition wins
...
when generating a common definition.
llvm-svn: 69287
2009-04-16 15:34:14 +00:00
Devang Patel
9ac4390bf4
Record line number at the beginning of a func.start.
...
This line was accidently lost yesterday.
llvm-svn: 69286
2009-04-16 15:07:09 +00:00
Rafael Espindola
5e42177a0f
fix PR3995. A scale must be 1, 2, 4 or 8.
...
llvm-svn: 69284
2009-04-16 12:34:53 +00:00
Daniel Dunbar
092f0ccd9c
Pass -fdiagnostics-show-option to clang-cc by default.
...
- <rdar://problem/6796848> implement -fdiagnostics-show-option
llvm-svn: 69276
2009-04-16 06:32:38 +00:00
Chris Lattner
f9c2dbb233
other half of 69274
...
llvm-svn: 69275
2009-04-16 06:17:55 +00:00
Chris Lattner
b666a27d24
split diagnostic group definitions out into their own file.
...
llvm-svn: 69274
2009-04-16 06:17:18 +00:00
Chris Lattner
2d49eed816
optimize and comment GetDiagInfo.
...
llvm-svn: 69273
2009-04-16 06:13:46 +00:00
Chris Lattner
6c440329f1
merge several scattered tables into StaticDiagInfo.
...
llvm-svn: 69272
2009-04-16 06:07:15 +00:00
Chris Lattner
6a64cc6776
Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
...
this implements -fdiagnostics-show-option in clang-cc.
llvm-svn: 69271
2009-04-16 06:00:24 +00:00
Chris Lattner
cce520f884
prove diagnostic -> group mapping information.
...
llvm-svn: 69270
2009-04-16 05:52:18 +00:00
Chris Lattner
a538967177
tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.
...
llvm-svn: 69269
2009-04-16 05:52:14 +00:00
Chris Lattner
22cb818913
implement framework for -fdiagnostics-show-option, but tblgen isn't
...
passing down the right info yet.
llvm-svn: 69268
2009-04-16 05:44:38 +00:00
Anders Carlsson
805ab5a746
Disable the code I added before until I understand what's causing default2.cpp to fail.
...
llvm-svn: 69267
2009-04-16 05:35:41 +00:00
Chris Lattner
b8e73158e1
move handling of -pedantic and -pedantic-errors into Diagnostics,
...
out of Warnings.cpp. This simplifies warnings.cpp and makes it more
efficient.
llvm-svn: 69266
2009-04-16 05:04:32 +00:00
Chris Lattner
f9150bac01
arrange for -Wno-error=foo warnings to be immune to -Werror as
...
they are supposed to be.
llvm-svn: 69265
2009-04-16 04:32:54 +00:00
Chris Lattner
411c0ffe5d
change mappings to distinguish between "unset", "set by the user" and
...
"set to the default value".
llvm-svn: 69264
2009-04-16 04:12:40 +00:00
Daniel Dunbar
08e82f955a
Driver: Remove the majority of -W* options, the driver doesn't
...
generally need to know about these now we don't have to hold
clang-cc's hand.
llvm-svn: 69263
2009-04-16 04:00:30 +00:00
Chris Lattner
af73cf6363
use getDiagnosticLevel instead of getDiagnosticMapping, which
...
is about to become private.
llvm-svn: 69262
2009-04-16 03:59:32 +00:00
Daniel Dunbar
b4b3709c5b
Driver: Forward -W* to clang, it can handle all these itself now.
...
Remove clang_W_Group and clang_ignored_W_Group.
llvm-svn: 69261
2009-04-16 03:44:10 +00:00