aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/AddressSanitizer.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-01-28 04:27:16 +0000
committerKostya Serebryany <kcc@google.com>2012-01-28 04:27:16 +0000
commitf1639abf1aaba1448f719f595156cd0f4cd560cc (patch)
tree47ae515371857a2ec846b92012ddbb466f6d9f49 /lib/Transforms/Instrumentation/AddressSanitizer.cpp
parent0ae06de09417ea8119ef26c57d60877ad4ce9fa2 (diff)
[asan] correctly use ConstantExpr::getGetElementPtr. Catch by NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149172 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 3f0681517e..e8fb4d5c47 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -484,7 +484,7 @@ bool AddressSanitizer::insertGlobalRedzones(Module &M) {
Indices2[1] = IRB.getInt32(0);
G->replaceAllUsesWith(
- ConstantExpr::getGetElementPtr(NewGlobal, Indices2, 2));
+ ConstantExpr::getGetElementPtr(NewGlobal, Indices2, true));
NewGlobal->takeName(G);
G->eraseFromParent();