diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index d13a333ca34..cbbc530fefb 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -929,6 +929,9 @@ BasicAliasAnalysis::getModRefBehavior(Function *F, CallSite CS, } ValueName *Name = F->getValueName(); + if (!Name) + return UnknownModRefBehavior; + unsigned NameLen = Name->getKeyLength(); const char *NamePtr = Name->getKeyData();