llvm.org GIT mirror llvm / 8ba7408
[DFSan] Add UnaryOperator visitor to DataFlowSanitizer Differential Revision: https://reviews.llvm.org/D62815 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363814 91177308-0d34-0410-b5e6-96231b3b80d8 Cameron McInally 4 months ago
2 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
436436 }
437437
438438 void visitOperandShadowInst(Instruction &I);
439 void visitUnaryOperator(UnaryOperator &UO);
439440 void visitBinaryOperator(BinaryOperator &BO);
440441 void visitCastInst(CastInst &CI);
441442 void visitCmpInst(CmpInst &CI);
13971398 DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI);
13981399 }
13991400
1401 void DFSanVisitor::visitUnaryOperator(UnaryOperator &UO) {
1402 visitOperandShadowInst(UO);
1403 }
1404
14001405 void DFSanVisitor::visitBinaryOperator(BinaryOperator &BO) {
14011406 visitOperandShadowInst(BO);
14021407 }
6161 %c = udiv i8 %a, %b
6262 ret i8 %c
6363 }
64
65 define double @fneg(double %a) {
66 ; CHECK: @"dfs$fneg"
67 ; CHECK: load{{.*}}__dfsan_arg_tls
68 ; CHECK: fneg double
69 ; CHECK: store{{.*}}__dfsan_retval_tls
70 ; CHECK: ret double
71 %c = fneg double %a
72 ret double %c
73 }