Compiler under llvm 12 release llvm12
authorweiyu <weiyuluo1232@gmail.com>
Mon, 10 May 2021 21:06:51 +0000 (14:06 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Mon, 10 May 2021 21:06:51 +0000 (14:06 -0700)
CDSPass.cpp

index aee977f..26f8601 100644 (file)
@@ -482,7 +482,7 @@ void CDSPass::chooseInstructionsToInstrument(
                Value *Addr = isa<StoreInst>(*I)
                        ? cast<StoreInst>(I)->getPointerOperand()
                        : cast<LoadInst>(I)->getPointerOperand();
-               if (isa<AllocaInst>(GetUnderlyingObject(Addr, DL)) &&
+               if (isa<AllocaInst>(getUnderlyingObject(Addr)) &&
                                !PointerMayBeCaptured(Addr, true, true)) {
                        // The variable is addressable but not captured, so it cannot be
                        // referenced from a different thread and participate in a data race