Dont' print scalar nodes for ConstantPointerRefs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-07-01 16:27:32 +00:00
parent 17d5d863b2
commit d9dad2cf61

View File

@ -8,6 +8,7 @@
#include "llvm/Analysis/DSGraph.h" #include "llvm/Analysis/DSGraph.h"
#include "llvm/Analysis/DSGraphTraits.h" #include "llvm/Analysis/DSGraphTraits.h"
#include "llvm/Module.h" #include "llvm/Module.h"
#include "llvm/Constants.h"
#include "llvm/Assembly/Writer.h" #include "llvm/Assembly/Writer.h"
#include "Support/CommandLine.h" #include "Support/CommandLine.h"
#include "Support/GraphWriter.h" #include "Support/GraphWriter.h"
@ -99,7 +100,7 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
// Add scalar nodes to the graph... // Add scalar nodes to the graph...
const DSGraph::ScalarMapTy &VM = G->getScalarMap(); const DSGraph::ScalarMapTy &VM = G->getScalarMap();
for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I) for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I)
if (!isa<GlobalValue>(I->first)) { if (!isa<GlobalValue>(I->first) && !isa<ConstantPointerRef>(I->first)) {
std::stringstream OS; std::stringstream OS;
WriteAsOperand(OS, I->first, false, true, CurMod); WriteAsOperand(OS, I->first, false, true, CurMod);
GW.emitSimpleNode(I->first, "", OS.str()); GW.emitSimpleNode(I->first, "", OS.str());