Skip to content

Commit ffa5c3a

Browse files
committed
Fix warning on llvm-else-after-return. NFC.
1 parent 720766a commit ffa5c3a

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

llvm/lib/Analysis/AliasAnalysis.cpp

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,18 @@ ModRefInfo AAResults::getModRefInfo(Instruction *I, const CallBase *Call2,
200200
if (const auto *Call1 = dyn_cast<CallBase>(I)) {
201201
// Check if the two calls modify the same memory.
202202
return getModRefInfo(Call1, Call2, AAQI);
203-
} else if (I->isFenceLike()) {
204-
// If this is a fence, just return ModRef.
205-
return ModRefInfo::ModRef;
206-
} else {
207-
// Otherwise, check if the call modifies or references the
208-
// location this memory access defines. The best we can say
209-
// is that if the call references what this instruction
210-
// defines, it must be clobbered by this location.
211-
const MemoryLocation DefLoc = MemoryLocation::get(I);
212-
ModRefInfo MR = getModRefInfo(Call2, DefLoc, AAQI);
213-
if (isModOrRefSet(MR))
214-
return setModAndRef(MR);
215203
}
204+
// If this is a fence, just return ModRef.
205+
if (I->isFenceLike())
206+
return ModRefInfo::ModRef;
207+
// Otherwise, check if the call modifies or references the
208+
// location this memory access defines. The best we can say
209+
// is that if the call references what this instruction
210+
// defines, it must be clobbered by this location.
211+
const MemoryLocation DefLoc = MemoryLocation::get(I);
212+
ModRefInfo MR = getModRefInfo(Call2, DefLoc, AAQI);
213+
if (isModOrRefSet(MR))
214+
return setModAndRef(MR);
216215
return ModRefInfo::NoModRef;
217216
}
218217

@@ -808,11 +807,6 @@ AAResults::Concept::~Concept() = default;
808807
// Provide a definition for the static object used to identify passes.
809808
AnalysisKey AAManager::Key;
810809

811-
namespace {
812-
813-
814-
} // end anonymous namespace
815-
816810
ExternalAAWrapperPass::ExternalAAWrapperPass() : ImmutablePass(ID) {
817811
initializeExternalAAWrapperPassPass(*PassRegistry::getPassRegistry());
818812
}

0 commit comments

Comments
 (0)