summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-02-01 20:44:47 +0000
committerJames Y Knight <jyknight@google.com>2019-02-01 20:44:47 +0000
commit7716075a1729ead67844574fdb34579894122992 (patch)
tree1a3b91f53223202ab65c910dbc26979f5f05201c /llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
parent14359ef1b6a0610ac91df5f5a91c88a0b51c187c (diff)
downloadbcm5719-llvm-7716075a1729ead67844574fdb34579894122992.tar.gz
bcm5719-llvm-7716075a1729ead67844574fdb34579894122992.zip
[opaque pointer types] Pass value type to GetElementPtr creation.
This cleans up all GetElementPtr creation in LLVM to explicitly pass a value type rather than deriving it from the pointer's element-type. Differential Revision: https://reviews.llvm.org/D57173 llvm-svn: 352913
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index 72f1e2ad253..3f166b11341 100644
--- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -1015,7 +1015,8 @@ Value *DFSanFunction::getRetvalTLS() {
Value *DFSanFunction::getArgTLS(unsigned Idx, Instruction *Pos) {
IRBuilder<> IRB(Pos);
- return IRB.CreateConstGEP2_64(getArgTLSPtr(), 0, Idx);
+ return IRB.CreateConstGEP2_64(ArrayType::get(DFS.ShadowTy, 64),
+ getArgTLSPtr(), 0, Idx);
}
Value *DFSanFunction::getShadow(Value *V) {
OpenPOWER on IntegriCloud