Make data structure acurately get ALL edges, even loads of null fields of
nodes that are not shadow nodes

This fixes em3d to be _correct_ if not optimial


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2274 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DataStructure/FunctionRepBuilder.h b/lib/Analysis/DataStructure/FunctionRepBuilder.h
index 54bfbba..e45ea41 100644
--- a/lib/Analysis/DataStructure/FunctionRepBuilder.h
+++ b/lib/Analysis/DataStructure/FunctionRepBuilder.h
@@ -12,7 +12,7 @@
 #include "llvm/Support/InstVisitor.h"
 
 // DEBUG_DATA_STRUCTURE_CONSTRUCTION - Define this to 1 if you want debug output
-#define DEBUG_DATA_STRUCTURE_CONSTRUCTION 0
+//#define DEBUG_DATA_STRUCTURE_CONSTRUCTION 1
 
 class FunctionRepBuilder;
 
@@ -82,7 +82,8 @@
   const std::vector<GlobalDSNode*> &getGlobalNodes() const {return GlobalNodes;}
   const std::vector<CallDSNode*>   &getCallNodes() const { return CallNodes; }
 
-  void addShadowNode(ShadowDSNode *SN) { ShadowNodes.push_back(SN); }
+
+  ShadowDSNode *makeSynthesizedShadow(const Type *Ty, DSNode *Parent);
 
   const PointerValSet &getRetNode() const { return RetNode; }
 
@@ -96,12 +97,12 @@
     // While the worklist still has instructions to process, process them!
     while (!WorkList.empty()) {
       Instruction *I = WorkList.back(); WorkList.pop_back();
-#if DEBUG_DATA_STRUCTURE_CONSTRUCTION
+#ifdef DEBUG_DATA_STRUCTURE_CONSTRUCTION
       cerr << "Processing worklist inst: " << I;
 #endif
     
       visit(I);  // Dispatch to a visitXXX function based on instruction type...
-#if DEBUG_DATA_STRUCTURE_CONSTRUCTION
+#ifdef DEBUG_DATA_STRUCTURE_CONSTRUCTION
       if (I->hasName() && ValueMap.count(I)) {
         cerr << "Inst %" << I->getName() << " value is:\n";
         ValueMap[I].print(cerr);