[llvm-commits] [llvm] r149172 - /llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Kostya Serebryany kcc at google.com
Fri Jan 27 20:27:16 PST 2012


Author: kcc
Date: Fri Jan 27 22:27:16 2012
New Revision: 149172

URL: http://llvm.org/viewvc/llvm-project?rev=149172&view=rev
Log:
[asan] correctly use ConstantExpr::getGetElementPtr. Catch by NAKAMURA Takumi

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=149172&r1=149171&r2=149172&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Jan 27 22:27:16 2012
@@ -484,7 +484,7 @@
     Indices2[1] = IRB.getInt32(0);
 
     G->replaceAllUsesWith(
-        ConstantExpr::getGetElementPtr(NewGlobal, Indices2, 2));
+        ConstantExpr::getGetElementPtr(NewGlobal, Indices2, true));
     NewGlobal->takeName(G);
     G->eraseFromParent();
 





More information about the llvm-commits mailing list