Commit Graph

73530 Commits

Author SHA1 Message Date
Anders Carlsson dabfa3cd8b Revert r90402 for now, virt.cpp is failing.
llvm-svn: 90406
2009-12-03 03:28:24 +00:00
Ted Kremenek e5716cbae7 Add batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple regions as once. After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3.
llvm-svn: 90405
2009-12-03 03:27:11 +00:00
Anders Carlsson e692f7c309 Use Eli's ComputeThunkAdjustment for calculating the return adjustment.
llvm-svn: 90402
2009-12-03 03:15:31 +00:00
Anders Carlsson 5f91fd64b6 Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.
llvm-svn: 90401
2009-12-03 03:06:55 +00:00
Anders Carlsson 80bc5d5d04 Remove the index from the Thunk struct.
llvm-svn: 90400
2009-12-03 02:41:55 +00:00
Anders Carlsson 29a1f751b3 Change the Thunks map to use the vtable index as the key.
llvm-svn: 90399
2009-12-03 02:39:59 +00:00
Anders Carlsson 0e1e7632bc Add the global decl to the Thunk struct.
llvm-svn: 90398
2009-12-03 02:36:40 +00:00
Anders Carlsson 9f98f7a9e5 Remove unused struct fields.
llvm-svn: 90397
2009-12-03 02:34:59 +00:00
Anders Carlsson 657f139abe Delay computing the return adjustments for covariant thunks until when they are added to the vtable.
llvm-svn: 90396
2009-12-03 02:32:59 +00:00
Evan Cheng 7145382389 Fill out codegen SSA updater. It's not yet tested.
llvm-svn: 90395
2009-12-03 02:31:43 +00:00
Anders Carlsson 2ca285fc5c No need to create the covariant thunk in both places now.
llvm-svn: 90394
2009-12-03 02:22:59 +00:00
Anders Carlsson 1157e8fc68 Whoops, forgot to save :)
llvm-svn: 90393
2009-12-03 02:20:26 +00:00
Anders Carlsson 06c14b6f65 Remove the index field from the CovariantThunk structure.
llvm-svn: 90392
2009-12-03 02:16:14 +00:00
Anders Carlsson 73295f96c5 Change the CovariantThunk map to use the vtable index as its key.
llvm-svn: 90391
2009-12-03 02:12:03 +00:00
Ted Kremenek 72de23e8ab Fix typo.
llvm-svn: 90390
2009-12-03 02:06:43 +00:00
Ted Kremenek 71d7463797 Add __has_feature(cxx_exceptions) and __has_feature(cxx_rtti) to table of contents.
llvm-svn: 90389
2009-12-03 02:05:57 +00:00
Ted Kremenek 51540f9377 Add section on what language features __has_feature() supports for querying if they are enabled.
llvm-svn: 90388
2009-12-03 02:04:01 +00:00
Anders Carlsson c38b40a709 Store a GlobalDecl in the return adjustment.
llvm-svn: 90387
2009-12-03 02:03:29 +00:00
Anders Carlsson 2bd3c0fa34 Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.
llvm-svn: 90386
2009-12-03 01:58:20 +00:00
Daniel Dunbar 1108966959 Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
 - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New:  1.9038

llvm-svn: 90385
2009-12-03 01:54:28 +00:00
Bill Wendling aba7d48764 Revert r90371. It was causing build failures.
llvm-svn: 90383
2009-12-03 01:54:07 +00:00
Anders Carlsson ca1bf68cfb Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.
llvm-svn: 90382
2009-12-03 01:54:02 +00:00
Jakob Stoklund Olesen 8392456f1b Don't hang on to pointers or references after vector::push_back.
The MO reference to a MachineOperand can be invalidated by
MachineInstr::addOperand. Don't even use it for debugging.

llvm-svn: 90381
2009-12-03 01:49:56 +00:00
Chris Lattner 65812b58f2 add a failing testcase.
llvm-svn: 90380
2009-12-03 01:46:18 +00:00
Daniel Dunbar 59203007ac Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
llvm-svn: 90379
2009-12-03 01:45:44 +00:00
Ted Kremenek 5ef26fb4fd Add 'has_feature(cxx_exceptions)' to allow code to determine via preprocessor logic if C++ exceptions are enabled.
llvm-svn: 90378
2009-12-03 01:34:15 +00:00
Mike Stump 26ada867ba Remove untrue statement.
llvm-svn: 90377
2009-12-03 01:34:13 +00:00
Ted Kremenek c3fe01943f Rename has_feature(rtti) to has_feature(cxx_rtti) for clarity.
llvm-svn: 90376
2009-12-03 01:31:28 +00:00
Devang Patel 236526dd18 Emit method definition DIE at module level (even for methods with inlined functino body at soure level) so that the debugger can invoke it. This fixes many test failures in gdb test suite.
llvm-svn: 90375
2009-12-03 01:25:38 +00:00
Mike Stump 59daccda08 Note a failure I saw from the g++ testsuite:
FAIL: g++.old-deja/g++.mike/eh23.C (test for excess errors)

llvm-svn: 90374
2009-12-03 01:22:05 +00:00
Ted Kremenek 7dac00b2e8 Add FileCheck test for '__has_feature(rtti)'.
llvm-svn: 90373
2009-12-03 01:17:43 +00:00
Bill Wendling 693969eb35 Further improvements: refactoring code that does the same thing into one
function, converting "dyn_cast" to "cast", asserting the correct things, and
other general cleanups.

llvm-svn: 90371
2009-12-03 01:15:46 +00:00
Chris Lattner 765ac33a1a yay for case insensitive file systems (?)
llvm-svn: 90370
2009-12-03 01:10:05 +00:00
Chris Lattner 77c36d68f3 fix PR5673 by being more careful about pointers to functions.
llvm-svn: 90369
2009-12-03 01:05:45 +00:00
Ted Kremenek 4bc256ec9d Add "has_feature" support for C++ RTTI.
llvm-svn: 90368
2009-12-03 01:02:35 +00:00
John McCall 800538253d Stop stripping UnresolvedUsingDecls out of LookupResults that have other
results in them (which we were doing intentionally as a stopgap).  Fix
an DeclContext lookup-table ordering problem which was causing UsingDecls to
show up incorrectly when looking for ordinary results.  And oh hey
Clang-Code-Syntax passes now.

llvm-svn: 90367
2009-12-03 00:58:24 +00:00
Chris Lattner 73570673de remove some dead std::ostream using code.
llvm-svn: 90366
2009-12-03 00:55:04 +00:00
Chris Lattner a48f44d9ee improve portability to avoid conflicting with std::next in c++'0x.
Patch by Howard Hinnant!

llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Ted Kremenek f66b72094a Add a heuristic to the dead stores checker to prune dead stores for variables annotated with '__block'. This is overly conservative, but now the analyzer doesn't report dead stores for variables that can be updated by a block call.
llvm-svn: 90364
2009-12-03 00:46:16 +00:00
Bill Wendling 1ed59c63e3 This initial code is meant to convert TargetData to use an AbstractTypesUser so
that it doesn't have dangling pointers when abstract types are resolved. This
modifies it somewhat to address comments: making the "StructLayoutMap" an
anonymous structure, calling "removeAbstractTypeUser" when appropriate, and
adding asserts where helpful.

llvm-svn: 90362
2009-12-03 00:17:12 +00:00
Sebastian Redl 79eba1ca3b Introduce the notion of literal types, as specified in C++0x.
llvm-svn: 90361
2009-12-03 00:13:20 +00:00
Eli Friedman 37e4c41283 Work-in-progress: teach mangler how to mangle thunks for destructors.
llvm-svn: 90360
2009-12-03 00:03:05 +00:00
Daniel Dunbar 5732ce39bc Update example link lines.
llvm-svn: 90359
2009-12-03 00:00:22 +00:00
Mike Stump 2d52ce5f94 Cleanups on exceptional edges don't work at all, yet. This doesn't
catch very many of them and if we caught all of them, the errors would
be annoying.  I'm working on this next.  WIP.

llvm-svn: 90358
2009-12-02 23:46:02 +00:00
Mike Stump 90990965e0 Add a cleanup scope for each catch clause.
llvm-svn: 90357
2009-12-02 23:37:16 +00:00
Mike Stump a68e2a2967 Add missing branch to exit. Seemingly obvious when I look at the
code, but to track this down was laborious.

llvm-svn: 90356
2009-12-02 23:28:08 +00:00
Douglas Gregor c8c44b5d67 Improve source location information for C++ member initializers in a
constructor, by keeping the DeclaratorInfo* rather than just the type
and a single location.

llvm-svn: 90355
2009-12-02 22:36:29 +00:00
Douglas Gregor a3b825edd1 Fix CMake makefiles
llvm-svn: 90354
2009-12-02 22:19:31 +00:00
Evan Cheng 20e9d030c9 Skeleton for MachineInstr level SSA updater.
llvm-svn: 90353
2009-12-02 22:02:52 +00:00
Bill Wendling 76bf386af0 Remove unnecessary check.
llvm-svn: 90352
2009-12-02 22:02:20 +00:00