Fixed few warnings.
authorGalina Kistanova <gkistanova@gmail.com>
Thu, 19 Jul 2012 04:50:12 +0000 (04:50 +0000)
committerGalina Kistanova <gkistanova@gmail.com>
Thu, 19 Jul 2012 04:50:12 +0000 (04:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160493 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/ExecutionEngine.h
include/llvm/Support/GraphWriter.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index e920e98a0bf6076eeb5aea89ab79317548e995e4..ae8b68d0241ec3895b24d4cf54e295f5cd4b18b7 100644 (file)
@@ -354,7 +354,7 @@ public:
   /// variable, possibly emitting it to memory if needed.  This is used by the
   /// Emitter.
   virtual void *getOrEmitGlobalVariable(const GlobalVariable *GV) {
-    return getPointerToGlobal((GlobalValue*)GV);
+    return getPointerToGlobal((const GlobalValue *)GV);
   }
 
   /// Registers a listener to be called back on various events within
index ae32da59dc22c26426628b0e784d5ba2c330a514..f178b0caa8aa9e26b177c942e7dd76f3ec45660d 100644 (file)
@@ -172,7 +172,7 @@ public:
 
       // If we should include the address of the node in the label, do so now.
       if (DTraits.hasNodeAddressLabel(Node, G))
-        O << "|" << (void*)Node;
+        O << "|" << static_cast<const void*>(Node);
     }
 
     std::string edgeSourceLabels;
@@ -192,7 +192,7 @@ public:
 
       // If we should include the address of the node in the label, do so now.
       if (DTraits.hasNodeAddressLabel(Node, G))
-        O << "|" << (void*)Node;
+        O << "|" << static_cast<const void*>(Node);
     }
 
     if (DTraits.hasEdgeDestLabels()) {
index d6e1834aed7332c57ceaa4b05e5822d12dc2c0fb..8cbe8182818b1cd0951c0420d08b9c78653deb95 100644 (file)
@@ -942,7 +942,7 @@ void SelectionDAGBuilder::visit(unsigned Opcode, const User &I) {
   default: llvm_unreachable("Unknown instruction type encountered!");
     // Build the switch statement using the Instruction.def file.
 #define HANDLE_INST(NUM, OPCODE, CLASS) \
-    case Instruction::OPCODE: visit##OPCODE((CLASS&)I); break;
+    case Instruction::OPCODE: visit##OPCODE((const CLASS&)I); break;
 #include "llvm/Instruction.def"
   }