fix a compiler crash in runtime/libprofile
authorChris Lattner <sabre@nondot.org>
Thu, 24 Mar 2005 01:22:52 +0000 (01:22 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 24 Mar 2005 01:22:52 +0000 (01:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20799 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IPA/GlobalsModRef.cpp

index d08c2583b9fbb7c69017eef6830609c1a417703a..5a2f921ebf4fed53494ab87c23264282e2f408e1 100644 (file)
@@ -280,7 +280,7 @@ void GlobalsModRef::AnalyzeSCC(std::vector<CallGraphNode *> &SCC) {
           ModRefBehavior MRB =
             AliasAnalysis::getModRefBehavior(Callee, CallSite());
           if (MRB != DoesNotAccessMemory) {
-            if (MRB == OnlyReadsMemory) {
+            if (MRB == OnlyReadsMemory && CalleeFR) {
               // This reads memory, but we don't know what, just say that it
               // reads all globals.
               for (std::map<GlobalValue*, unsigned>::iterator