diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-03-17 20:33:27 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-03-17 20:33:27 +0000 | 
| commit | 488a80a292b3cb8c6bffb55ef2f8faaeb4c5919e (patch) | |
| tree | c74795da7c080662b83df8351f202dbdc1781b38 | |
| parent | 9c9f68c42f527d5ea5b484f08ab5fdce8c238dde (diff) | |
| download | bcm5719-llvm-488a80a292b3cb8c6bffb55ef2f8faaeb4c5919e.tar.gz bcm5719-llvm-488a80a292b3cb8c6bffb55ef2f8faaeb4c5919e.zip | |
add some possibly bogus assertions.
llvm-svn: 20665
| -rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructureAA.cpp | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp b/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp index 2d62162d1d9..8b606f2aabb 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp @@ -12,6 +12,8 @@  //  //===----------------------------------------------------------------------===// +#include "llvm/Constants.h" +#include "llvm/DerivedTypes.h"  #include "llvm/Module.h"  #include "llvm/Analysis/AliasAnalysis.h"  #include "llvm/Analysis/Passes.h" @@ -196,6 +198,14 @@ DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {        Result = ModRefResult(Result & ~Mod);      if (!N->isRead())       // We proved it was not read.        Result = ModRefResult(Result & ~Ref); +  } else { +    if (isa<ConstantPointerNull>(P)) +      Result = NoModRef; +    else +      assert(isa<GlobalVariable>(P) && +    cast<GlobalVariable>(P)->getType()->getElementType()->isFirstClassType() && +             "This isn't a global that DSA inconsiderately dropped " +             "from the graph?");    }    return Result;  } | 

