[opaque pointer type] API migration for GEP constant factories
[oota-llvm.git] / lib / Transforms / Instrumentation / AddressSanitizer.cpp
index f29fd0508061d22fe10d589423f3f39cf357042f..e483d6f9e3b09c7f945a82e7eeb9095a6410f5e8 100644 (file)
@@ -1326,7 +1326,7 @@ bool AddressSanitizerModule::InstrumentGlobals(IRBuilder<> &IRB, Module &M) {
     Indices2[1] = IRB.getInt32(0);
 
     G->replaceAllUsesWith(
-        ConstantExpr::getGetElementPtr(NewGlobal, Indices2, true));
+        ConstantExpr::getGetElementPtr(NewTy, NewGlobal, Indices2, true));
     NewGlobal->takeName(G);
     G->eraseFromParent();