summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/ValueMapTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move ValueMapTest from ADT to VMCore so that ADT doesn't needDan Gohman2010-09-271-294/+0
| | | | | | to link in "core". llvm-svn: 114831
* Remove the ValueMap copy constructor. It's not used anywhere,Duncan Sands2010-08-081-9/+0
| | | | | | | and removing it catches the mistake of passing a ValueMap by copy rather than by reference. llvm-svn: 110549
* Fix the ValueMap copy constructor. The issue is that the map keys are valueDuncan Sands2010-07-301-0/+9
| | | | | | | | | | | | | | | | handles with a pointer to the containing map. When a map is copied, these pointers need to be corrected to point to the new map. If not, then consider the case of a map M1 which maps a value V to something. Create a copy M2 of M1. At this point there are two value handles on V, one representing V as a key in M1, the other representing V as a key in M2. But both value handles point to M1 as the containing map. Now delete V. The value handles remove themselves from their containing map (which destroys them), but only the first value handle is successful: the second one cannot remove itself from M1 as (once the first one has removed itself) there is nothing there to remove; it is therefore not destroyed. This causes an assertion failure "All references to V were not removed?". llvm-svn: 109851
* Use non-bool values for .count.Bill Wendling2010-07-101-3/+3
| | | | llvm-svn: 108048
* silence some unused-value warnings.Chris Lattner2010-04-181-4/+4
| | | | llvm-svn: 101689
* Only run this mutex test if threading is enabled. ThisDuncan Sands2009-11-191-0/+3
| | | | | | fixes PR5395. llvm-svn: 89385
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-271-1/+1
| | | | llvm-svn: 85254
* Fix stylistic and documentation problems in ValueMap found by Nick Lewycky andJeffrey Yasskin2009-10-231-3/+3
| | | | | | Evan Cheng. llvm-svn: 84967
* Try r84890 again (adding ValueMap<>), now that I've tested the compile onJeffrey Yasskin2009-10-221-0/+291
| | | | | | gcc-4.4. llvm-svn: 84902
* Revert r84890, which broke the linux build.Jeffrey Yasskin2009-10-221-291/+0
| | | | llvm-svn: 84892
* Add a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to useJeffrey Yasskin2009-10-221-0/+291
even when keys get RAUWed and deleted during its lifetime. By default the keys act like WeakVHs, but users can pass a third template parameter to configure how updates work and whether to do anything beyond updating the map on each action. It's also possible to automatically acquire a lock around ValueMap updates triggered by RAUWs and deletes, to support the ExecutionEngine. llvm-svn: 84890
OpenPOWER on IntegriCloud