Skip to content

Commit 9524632

Browse files
[dfsan] Comment out unused methods by D97087 temporarily
1 parent b42d57a commit 9524632

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ class DataFlowSanitizer {
434434

435435
Value *getShadowOffset(Value *Addr, IRBuilder<> &IRB);
436436
Value *getShadowAddress(Value *Addr, Instruction *Pos);
437-
std::pair<Value *, Value *>
438-
getShadowOriginAddress(Value *Addr, Align InstAlignment, Instruction *Pos);
437+
// std::pair<Value *, Value *>
438+
// getShadowOriginAddress(Value *Addr, Align InstAlignment, Instruction *Pos);
439439
bool isInstrumented(const Function *F);
440440
bool isInstrumented(const GlobalAlias *GA);
441441
FunctionType *getArgsFunctionType(FunctionType *T);
@@ -543,13 +543,13 @@ struct DFSanFunction {
543543
/// Computes the origin address for a given function argument.
544544
///
545545
/// Origin = ArgOriginTLS[ArgNo].
546-
Value *getArgOriginTLS(unsigned ArgNo, IRBuilder<> &IRB);
546+
// Value *getArgOriginTLS(unsigned ArgNo, IRBuilder<> &IRB);
547547

548548
/// Computes the origin address for a return value.
549-
Value *getRetvalOriginTLS();
549+
// Value *getRetvalOriginTLS();
550550

551-
Value *getOrigin(Value *V);
552-
void setOrigin(Instruction *I, Value *Origin);
551+
// Value *getOrigin(Value *V);
552+
// void setOrigin(Instruction *I, Value *Origin);
553553
Value *getShadow(Value *V);
554554
void setShadow(Instruction *I, Value *Shadow);
555555
/// Generates IR to compute the union of the two given shadows, inserting it
@@ -1465,7 +1465,7 @@ Value *DFSanFunction::getRetvalTLS(Type *T, IRBuilder<> &IRB) {
14651465
return IRB.CreatePointerCast(
14661466
DFS.RetvalTLS, PointerType::get(DFS.getShadowTy(T), 0), "_dfsret");
14671467
}
1468-
1468+
/*
14691469
Value *DFSanFunction::getRetvalOriginTLS() { return DFS.RetvalOriginTLS; }
14701470
14711471
Value *DFSanFunction::getArgOriginTLS(unsigned ArgNo, IRBuilder<> &IRB) {
@@ -1514,7 +1514,7 @@ void DFSanFunction::setOrigin(Instruction *I, Value *Origin) {
15141514
assert(Origin->getType() == DFS.OriginTy);
15151515
ValOriginMap[I] = Origin;
15161516
}
1517-
1517+
*/
15181518
Value *DFSanFunction::getShadowForTLSArgument(Argument *A) {
15191519
unsigned ArgOffset = 0;
15201520
const DataLayout &DL = F->getParent()->getDataLayout();
@@ -1595,7 +1595,7 @@ Value *DataFlowSanitizer::getShadowOffset(Value *Addr, IRBuilder<> &IRB) {
15951595
return IRB.CreateAnd(IRB.CreatePtrToInt(Addr, IntptrTy),
15961596
IRB.CreatePtrToInt(ShadowPtrMaskValue, IntptrTy));
15971597
}
1598-
1598+
/*
15991599
std::pair<Value *, Value *>
16001600
DataFlowSanitizer::getShadowOriginAddress(Value *Addr, Align InstAlignment,
16011601
Instruction *Pos) {
@@ -1618,7 +1618,7 @@ DataFlowSanitizer::getShadowOriginAddress(Value *Addr, Align InstAlignment,
16181618
}
16191619
return {ShadowPtr, OriginPtr};
16201620
}
1621-
1621+
*/
16221622
Value *DataFlowSanitizer::getShadowAddress(Value *Addr, Instruction *Pos) {
16231623
// Returns (Addr & shadow_mask) x 2
16241624
IRBuilder<> IRB(Pos);

0 commit comments

Comments
 (0)