Benjamin Kramer
26222b666c
Remove VISIBILITY_HIDDEN from lib/AST.
...
llvm-svn: 90043
2009-11-28 19:03:38 +00:00
Kovarththanan Rajaratnam
7632da4b8a
This patch adds a PUNCTUATOR macro (specialization of TOK) in TokenKinds.def and makes use of it in tok::getTokenSimpleSpelling.
...
llvm-svn: 90042
2009-11-28 16:09:28 +00:00
Kovarththanan Rajaratnam
930de0aeaf
Cleanup llvm/Support/Compiler.h include in header files
...
llvm-svn: 90040
2009-11-28 16:08:10 +00:00
Nuno Lopes
baa1bc44af
cleanup parsing of MS integer suffixes a little. this fixes PR5616
...
btw, I believe that isMicrosoftInteger can go away; it's not read anywhere
llvm-svn: 90036
2009-11-28 13:37:52 +00:00
Benjamin Kramer
92096cb11f
Missed a forward declaration.
...
llvm-svn: 90035
2009-11-28 12:08:44 +00:00
Benjamin Kramer
4e75cd063f
Cleanup includes and forward decls.
...
llvm-svn: 90034
2009-11-28 10:50:44 +00:00
Benjamin Kramer
16634c2c5a
Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.
...
llvm-svn: 90033
2009-11-28 10:07:24 +00:00
Benjamin Kramer
435ef9b383
Remove unneeded includes.
...
llvm-svn: 90032
2009-11-28 09:41:31 +00:00
Kovarththanan Rajaratnam
b1034f7a24
Don't call exit(). llvm::llvm_report_error() will do just that
...
llvm-svn: 90031
2009-11-28 09:11:46 +00:00
Alexis Hunt
ed0530f694
Fix test and handle IK_LiteralOperatorId in a few more places.
...
llvm-svn: 90030
2009-11-28 08:58:14 +00:00
Kovarththanan Rajaratnam
15e9a9df83
Move program actions implications to clang::InitializeFrontendOptions which already contains such logic.
...
llvm-svn: 90029
2009-11-28 07:52:34 +00:00
Kovarththanan Rajaratnam
65c6566b5b
lib/Analysis: Remove VISIBILITY_HIDDEN from definitions in anonymous namespace
...
llvm-svn: 90028
2009-11-28 06:07:30 +00:00
Alexis Hunt
344585006c
Add Parser support for C++0x literal operators ('operator "" i').
...
DeclarationName can't handle them yet, so right now Parser just errors out on them.
llvm-svn: 90027
2009-11-28 04:44:28 +00:00
Eli Friedman
c9e3e6ff29
Tests now pass with the assertion.
...
llvm-svn: 90026
2009-11-28 03:35:45 +00:00
Eli Friedman
78910a508a
Add a much more thorough test of casts to virtual bases, and fix
...
GetCXXBaseClassOffset to actually pass the test.
llvm-svn: 90025
2009-11-28 03:31:34 +00:00
Anders Carlsson
548cc9d143
We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.
...
llvm-svn: 90024
2009-11-28 03:03:52 +00:00
Anders Carlsson
182498df65
Add an iterator for walking the primary base chain.
...
llvm-svn: 90023
2009-11-28 00:50:23 +00:00
Anders Carlsson
d598850203
Move the vtable builder to an anonymous namespace.
...
llvm-svn: 90021
2009-11-27 22:21:51 +00:00
Anders Carlsson
a30c0d3ace
Use a PointerIntPair for the PrimaryBaseInfo. Yay for clever LLVM data structures!
...
llvm-svn: 90020
2009-11-27 22:14:40 +00:00
Anders Carlsson
03ff379911
Add a new PrimaryBaseInfo struct that combines the record decl of a primary base with whether it's virtual or not.
...
llvm-svn: 90018
2009-11-27 22:05:05 +00:00
Anders Carlsson
f942ee0297
Don't build the entire vtable when all we want is the index of a virtual method.
...
llvm-svn: 90017
2009-11-27 20:47:55 +00:00
Daniel Dunbar
c9bc8708d2
Fix typo, thanks Sebastian!
...
llvm-svn: 89999
2009-11-27 08:26:07 +00:00
Daniel Dunbar
cc0ba6a9d6
Simplify.
...
llvm-svn: 89998
2009-11-27 08:26:00 +00:00
Eli Friedman
2adc9abd51
Some member pointer casting tests.
...
llvm-svn: 89989
2009-11-27 04:56:40 +00:00
Eli Friedman
7eb0ccaa58
Add case for CK_DerivedToBaseMemberPointer cast kind to
...
AggExprEmitter::VisitCastExpr.
llvm-svn: 89988
2009-11-27 04:46:20 +00:00
Eli Friedman
e96f1d3b2f
More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
...
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
llvm-svn: 89987
2009-11-27 04:41:50 +00:00
Eli Friedman
0dfc6804ff
Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.
...
llvm-svn: 89986
2009-11-27 02:07:44 +00:00
Eli Friedman
250534cf9a
Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
...
we check whether the vtable needs to be generated.
llvm-svn: 89984
2009-11-27 01:42:12 +00:00
Anders Carlsson
5a4f772bc8
Fix thinko.
...
llvm-svn: 89983
2009-11-27 01:26:58 +00:00
Anders Carlsson
859d7bf2f5
When adding an implicit destructor, make sure to mark it as virtual if it overrides existing destructors.
...
llvm-svn: 89967
2009-11-26 21:25:09 +00:00
Anders Carlsson
e985faea49
Correctly find overridden destructors.
...
llvm-svn: 89966
2009-11-26 20:50:40 +00:00
Anders Carlsson
323bb04ef4
Lazily create the __cxa_pure_virtual reference.
...
llvm-svn: 89965
2009-11-26 19:54:33 +00:00
Anders Carlsson
d420a31fe9
Use the new CovariantThunkAdjustment in the vtable builder.
...
Make the pure virtual methods map a set instead.
llvm-svn: 89961
2009-11-26 19:32:45 +00:00
Gabor Greif
d2add35d9d
typo
...
llvm-svn: 89949
2009-11-26 15:18:50 +00:00
Gabor Greif
40762fec73
issue a friendlier error if someone tries to send precompiled header to '-' (stdout)
...
this brings the error on
clang -c foo.h -o -
closer to
clang -c foo.h -o /dev/null
llvm-svn: 89948
2009-11-26 14:35:28 +00:00
Benjamin Kramer
334af99964
Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.
...
llvm-svn: 89947
2009-11-26 13:09:03 +00:00
Daniel Dunbar
7ab5c491c1
Remove header which is bringing libAST in (on MSVC).
...
llvm-svn: 89946
2009-11-26 09:57:25 +00:00
Eli Friedman
4907c6f2ed
Remove unused variable.
...
llvm-svn: 89945
2009-11-26 07:48:44 +00:00
Eli Friedman
ffc066f4b9
Shortcut explicit calls to a trivial copy assignment operator.
...
llvm-svn: 89944
2009-11-26 07:45:48 +00:00
Eli Friedman
84a7e347bf
Simplify and fix up the handling of implicit constructors, copy assignment
...
operators, and destructors. Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.
llvm-svn: 89943
2009-11-26 07:40:08 +00:00
Ted Kremenek
2350e0c3ba
Improve diagnostics in ReturnStackAddressChecker for returning a stack-allocated block. Implements the rest of <rdar://problem/7387385>.
...
llvm-svn: 89940
2009-11-26 07:14:50 +00:00
Ted Kremenek
e5d8dd808e
Add test case that shows that dead stores checking now works in the presence of blocks.
...
llvm-svn: 89939
2009-11-26 06:55:36 +00:00
Eli Friedman
d15eb34d4b
Implement IRGen for MemberExpr referring to static member function.
...
llvm-svn: 89938
2009-11-26 06:08:14 +00:00
Daniel Dunbar
0ec57ff203
Don't run the LLVM Code tests by default.
...
llvm-svn: 89937
2009-11-26 05:09:00 +00:00
Daniel Dunbar
9acb35a5e8
Add -Werror for Clang and LLVM on Clang (headers) syntax tests.
...
llvm-svn: 89936
2009-11-26 05:08:53 +00:00
Anders Carlsson
6d771bcd09
Add a Thunk struct to the vtable builder.
...
llvm-svn: 89935
2009-11-26 03:25:13 +00:00
Eli Friedman
cb422f1dbe
Use the more general Evaluate infrastructure for folding constant DeclRefs
...
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:
1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)
llvm-svn: 89934
2009-11-26 03:22:21 +00:00
Anders Carlsson
2f87c4f1a5
Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.
...
llvm-svn: 89933
2009-11-26 03:09:37 +00:00
Eli Friedman
f873c2fb68
Slight tweak to the algorithm for getLinkage().
...
llvm-svn: 89932
2009-11-26 03:04:01 +00:00
Eli Friedman
8a5f75ed5d
Use new getLinkage() method to correctly compute whether a variable has
...
internal linkage. Fixes PR5433.
llvm-svn: 89931
2009-11-26 02:52:12 +00:00