Update MSIL BE. This patch fixes most weird glitches outlined in
README.txt. Patch by Roman Samoilov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36890 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h
index 3db825f..c2cd0ab 100644
--- a/lib/Target/MSIL/MSILWriter.h
+++ b/lib/Target/MSIL/MSILWriter.h
@@ -16,6 +16,7 @@
 #include "llvm/Constants.h"
 #include "llvm/Module.h"
 #include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
 #include "llvm/Pass.h"
 #include "llvm/PassManager.h"
 #include "llvm/Analysis/FindUsedTypes.h"
@@ -67,7 +68,7 @@
         : constant(_constant), offset(_offset) {} 
     };
 
-    uint64_t UniqID;    
+    uint64_t UniqID;
 
     uint64_t getUniqID() {
       return ++UniqID;
@@ -119,6 +120,8 @@
 
     virtual bool doFinalization(Module &M);
 
+    void printModuleStartup();
+
     bool isZeroValue(const Value* V);
 
     std::string getValueName(const Value* V);
@@ -137,15 +140,20 @@
 
     std::string getPointerTypeName(const Type* Ty);
 
-    std::string getTypeName(const Type* Ty, bool isSigned = false);
+    std::string getTypeName(const Type* Ty, bool isSigned = false,
+                            bool isNested = false);
 
     ValueType getValueLocation(const Value* V);
 
     std::string getTypePostfix(const Type* Ty, bool Expand,
                                bool isSigned = false);
 
+    void printConvToPtr();
+
     void printPtrLoad(uint64_t N);
 
+    void printValuePtrLoad(const Value* V);
+
     void printConstLoad(const Constant* C);
 
     void printValueLoad(const Value* V);
@@ -170,7 +178,9 @@
 
     void printIndirectLoad(const Value* V);
 
-    void printStoreInstruction(const Instruction* Inst);
+    void printIndirectSave(const Value* Ptr, const Value* Val);
+
+    void printIndirectSave(const Type* Ty);
 
     void printCastInstruction(unsigned int Op, const Value* V,
                               const Type* Ty);
@@ -184,6 +194,8 @@
 
     void printFunctionCall(const Value* FnVal, const Instruction* Inst);
 
+    void printIntrinsicCall(const IntrinsicInst* Inst);
+
     void printCallInstruction(const Instruction* Inst);
 
     void printICmpInstruction(unsigned Predicate, const Value* Left,
@@ -196,6 +208,10 @@
 
     void printSwitchInstruction(const SwitchInst* Inst);
 
+    void printVAArgInstruction(const VAArgInst* Inst);
+
+    void printAllocaInstruction(const AllocaInst* Inst);
+
     void printInstruction(const Instruction* Inst);
 
     void printLoop(const Loop* L);
@@ -224,8 +240,16 @@
 
     void printGlobalVariables();
 
+    const char* getLibraryName(const Function* F);
+
+    const char* getLibraryName(const GlobalVariable* GV); 
+    
+    const char* getLibraryForSymbol(const char* Name, bool isFunction,
+                                    unsigned CallingConv);
+
     void printExternals();
   };
 }
 
 #endif
+