mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
To catch bugs like the one fixed in
http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That way, if unregistering a mapping fails to actually unregister it, we'll get an assert. Running the jit nightly tests didn't uncover any actual instances of the problem. This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed that too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78400 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -120,6 +120,13 @@ TEST_F(ValueHandle, AssertingVH_BasicOperation) {
|
||||
EXPECT_FALSE((*AVH).mayWriteToMemory());
|
||||
}
|
||||
|
||||
TEST_F(ValueHandle, AssertingVH_Const) {
|
||||
const CastInst *ConstBitcast = BitcastV.get();
|
||||
AssertingVH<const CastInst> AVH(ConstBitcast);
|
||||
const CastInst *implicit_to_exact_type = AVH;
|
||||
implicit_to_exact_type = implicit_to_exact_type; // Avoid warning.
|
||||
}
|
||||
|
||||
TEST_F(ValueHandle, AssertingVH_Comparisons) {
|
||||
AssertingVH<Value> BitcastAVH(BitcastV.get());
|
||||
AssertingVH<Value> ConstantAVH(ConstantV);
|
||||
|
Reference in New Issue
Block a user