Skip to content

Commit f3a8c27

Browse files
committed
TBAA: try to fix the dragonegg bots.
llvm-svn: 191585
1 parent 5d783df commit f3a8c27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ TypeBasedAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
326326
/// it as struct-path aware TBAA format, otherwise, we treat it as scalar TBAA
327327
/// format.
328328
static bool isStructPathTBAA(const MDNode *MD) {
329-
return isa<MDNode>(MD->getOperand(0));
329+
// Anonymous TBAA root starts with a MDNode and dragonegg uses it as
330+
// a TBAA tag.
331+
return isa<MDNode>(MD->getOperand(0)) && MD->getNumOperands() >= 3;
330332
}
331333

332334
/// Aliases - Test whether the type represented by A may alias the

0 commit comments

Comments
 (0)