mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[msan] Make -msan-check-constant-shadow a bit stronger.
Allow (under the experimental flag) non-Instructions to participate in MSan checks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1062,9 +1062,16 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
/// UMR warning in runtime if the value is not fully defined.
|
||||
void insertShadowCheck(Value *Val, Instruction *OrigIns) {
|
||||
assert(Val);
|
||||
Instruction *Shadow = dyn_cast_or_null<Instruction>(getShadow(Val));
|
||||
if (!Shadow) return;
|
||||
Instruction *Origin = dyn_cast_or_null<Instruction>(getOrigin(Val));
|
||||
Value *Shadow, *Origin;
|
||||
if (ClCheckConstantShadow) {
|
||||
Shadow = getShadow(Val);
|
||||
if (!Shadow) return;
|
||||
Origin = getOrigin(Val);
|
||||
} else {
|
||||
Shadow = dyn_cast_or_null<Instruction>(getShadow(Val));
|
||||
if (!Shadow) return;
|
||||
Origin = dyn_cast_or_null<Instruction>(getOrigin(Val));
|
||||
}
|
||||
insertShadowCheck(Shadow, Origin, OrigIns);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user