From 7912ef97ffde3ab3334143ddfb4cafdf04e2ebfc Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 20 Nov 2011 19:37:06 +0000 Subject: Less template, more virtual! Refactoring suggested by Chris in code review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145014 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/MemoryDependenceAnalysis.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp') diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index e779bf2b99..128c7f93a4 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -336,7 +336,7 @@ getLoadLoadClobberFullWidthSize(const Value *MemLocBase, int64_t MemLocOffs, namespace { /// Only find pointer captures which happen before the given instruction. Uses /// the dominator tree to determine whether one instruction is before another. - struct CapturesBefore { + struct CapturesBefore : public CaptureTracker { CapturesBefore(const Instruction *I, DominatorTree *DT) : BeforeHere(I), DT(DT), Captured(false) {} @@ -381,7 +381,7 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst, if (!CS.getInstruction()) return AliasAnalysis::ModRef; CapturesBefore CB(Inst, DT); - llvm::PointerMayBeCaptured(Object, CB); + llvm::PointerMayBeCaptured(Object, &CB); if (isa(Object) || CS.getInstruction() == Object || CB.Captured) return AliasAnalysis::ModRef; -- cgit v1.2.3