Split ConstantVals.h into Constant.h and Constants.h
authorChris Lattner <sabre@nondot.org>
Sun, 28 Apr 2002 19:55:58 +0000 (19:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 28 Apr 2002 19:55:58 +0000 (19:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2378 91177308-0d34-0410-b5e6-96231b3b80d8

49 files changed:
include/llvm/Constant.h [new file with mode: 0644]
include/llvm/ConstantHandling.h
include/llvm/Constants.h
lib/Analysis/DataStructure/FunctionRepBuilder.cpp
lib/Analysis/InductionVariable.cpp
lib/AsmParser/ParserInternals.h
lib/Bytecode/Reader/ConstantReader.cpp
lib/Bytecode/Reader/Reader.cpp
lib/Bytecode/Writer/ConstantWriter.cpp
lib/Bytecode/Writer/SlotCalculator.cpp
lib/Bytecode/Writer/Writer.cpp
lib/CodeGen/InstrSelection/InstrForest.cpp
lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp
lib/ExecutionEngine/Interpreter/Execution.cpp
lib/Linker/LinkModules.cpp
lib/Target/SparcV9/InstrSelection/InstrForest.cpp
lib/Target/SparcV9/InstrSelection/InstrSelectionSupport.cpp
lib/Target/SparcV9/SparcV9AsmPrinter.cpp
lib/Target/SparcV9/SparcV9InstrInfo.cpp
lib/Target/SparcV9/SparcV9InstrSelection.cpp
lib/Target/TargetData.cpp
lib/Transforms/ExprTypeConvert.cpp
lib/Transforms/IPO/MutateStructTypes.cpp
lib/Transforms/IPO/OldPoolAllocate.cpp
lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp
lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
lib/Transforms/Instrumentation/TraceValues.cpp
lib/Transforms/LevelRaise.cpp
lib/Transforms/Scalar/ConstantProp.cpp
lib/Transforms/Scalar/DCE.cpp
lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/InductionVars.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/TransformInternals.cpp
lib/Transforms/TransformInternals.h
lib/Transforms/Utils/Linker.cpp
lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
lib/VMCore/AsmWriter.cpp
lib/VMCore/BasicBlock.cpp
lib/VMCore/ConstantFold.h
lib/VMCore/ConstantFolding.h
lib/VMCore/Constants.cpp
lib/VMCore/Linker.cpp
lib/VMCore/Module.cpp
lib/VMCore/SlotCalculator.cpp
lib/VMCore/Type.cpp
lib/VMCore/iMemory.cpp

diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
new file mode 100644 (file)
index 0000000..572d1d1
--- /dev/null
@@ -0,0 +1,47 @@
+//===-- llvm/Constant.h - Constant class definition --------------*- C++ -*--=//
+//
+// This file contains the declaration of the Constant class.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CONSTANT_H
+#define LLVM_CONSTANT_H
+
+#include "llvm/User.h"
+
+class Constant : public User {
+protected:
+  inline Constant(const Type *Ty) : User(Ty, Value::ConstantVal) {}
+  ~Constant() {}
+
+  // destroyConstant - Called if some element of this constant is no longer
+  // valid.  At this point only other constants may be on the use_list for this
+  // constant.  Any constants on our Use list must also be destroy'd.  The
+  // implementation must be sure to remove the constant from the list of
+  // available cached constants.  Implementations should call
+  // destroyConstantImpl as the last thing they do, to destroy all users and
+  // delete this.
+  //
+  virtual void destroyConstant() { assert(0 && "Not reached!"); }
+  void destroyConstantImpl();
+public:
+  // Specialize setName to handle symbol table majik...
+  virtual void setName(const std::string &name, SymbolTable *ST = 0);
+
+  // Static constructor to get a '0' constant of arbitrary type...
+  static Constant *getNullValue(const Type *Ty);
+
+  // isNullValue - Return true if this is the value that would be returned by
+  // getNullValue.
+  virtual bool isNullValue() const = 0;
+
+  virtual void print(std::ostream &O) const;
+
+  // Methods for support type inquiry through isa, cast, and dyn_cast:
+  static inline bool classof(const Constant *) { return true; }
+  static inline bool classof(const Value *V) {
+    return V->getValueType() == Value::ConstantVal;
+  }
+};
+
+#endif
index 1479fe01ef889d6bfee42aa4b32c480874145227..14231cb6abfbf129a600d86db48a8bde955c3e05 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef LLVM_CONSTANTHANDLING_H
 #define LLVM_CONSTANTHANDLING_H
 
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Instruction.h"
 #include "llvm/Type.h"
 class PointerType;
index 1253974da06c33f26e94e21d1c57deeeb0b725e3..119dd8ffa5b0a346dc31f20a8f0a45bf78085cc6 100644 (file)
@@ -1,65 +1,20 @@
-//===-- llvm/ConstantVals.h - Constant Value nodes ---------------*- C++ -*--=//
+//===-- llvm/Constants.h - Constant class subclass definitions ---*- C++ -*--=//
 //
-// This file contains the declarations for the Constant class and all of
-// its subclasses, which represent the different type of constant pool values
+// This file contains the declarations for the subclasses of Constant, which
+// represent the different type of constant pool values
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_CONSTANT_VALS_H
-#define LLVM_CONSTANT_VALS_H
+#ifndef LLVM_CONSTANTS_H
+#define LLVM_CONSTANTS_H
 
-#include "llvm/User.h"
+#include "llvm/Constant.h"
 #include "Support/DataTypes.h"
 
 class ArrayType;
 class StructType;
 class PointerType;
 
-//===----------------------------------------------------------------------===//
-//                                Constant Class
-//===----------------------------------------------------------------------===//
-
-class Constant : public User {
-protected:
-  inline Constant(const Type *Ty) : User(Ty, Value::ConstantVal) {}
-  ~Constant() {}
-
-  // destroyConstant - Called if some element of this constant is no longer
-  // valid.  At this point only other constants may be on the use_list for this
-  // constant.  Any constants on our Use list must also be destroy'd.  The
-  // implementation must be sure to remove the constant from the list of
-  // available cached constants.  Implementations should call
-  // destroyConstantImpl as the last thing they do, to destroy all users and
-  // delete this.
-  //
-  virtual void destroyConstant() { assert(0 && "Not reached!"); }
-  void destroyConstantImpl();
-public:
-  // Specialize setName to handle symbol table majik...
-  virtual void setName(const std::string &name, SymbolTable *ST = 0);
-
-  // Static constructor to get a '0' constant of arbitrary type...
-  static Constant *getNullValue(const Type *Ty);
-
-  // isNullValue - Return true if this is the value that would be returned by
-  // getNullValue.
-  virtual bool isNullValue() const = 0;
-
-  virtual void print(std::ostream &O) const;
-
-  // Methods for support type inquiry through isa, cast, and dyn_cast:
-  static inline bool classof(const Constant *) { return true; }
-  static inline bool classof(const Value *V) {
-    return V->getValueType() == Value::ConstantVal;
-  }
-};
-
-
-
-//===----------------------------------------------------------------------===//
-//              Classes to represent constant pool variable defs
-//===----------------------------------------------------------------------===//
-
 //===---------------------------------------------------------------------------
 // ConstantBool - Boolean Values
 //
index e9b6f199d7e2e59a97a1d7393c8a7960a081ea9b..1566ca87da0f62cbeeda75eea97a659f15f73634 100644 (file)
@@ -12,7 +12,7 @@
 #include "llvm/iOther.h"
 #include "llvm/iTerminators.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "Support/STLExtras.h"
 #include <algorithm>
 
index 3214b79ce60088313cd715443fbdfe03fd036e78..f0b01e845542262e759644ff38ee8bc04a7ac87d 100644 (file)
@@ -22,7 +22,7 @@
 #include "llvm/iPHINode.h"
 #include "llvm/InstrTypes.h"
 #include "llvm/Type.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 
 using analysis::ExprType;
 
index 8b10c36e60f5934030f2d60382d10c5a91fd6c54..db84f92f7b04875563e09f20eb367f6b87a947de 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "llvm/InstrTypes.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/iOther.h"
 #include "llvm/Function.h"
 #include "llvm/DerivedTypes.h"
index 89beddb956800c97466fe15d6a461cd362d23561..4c7ebb119acf6f3a7eabeb426d5715b07ac0193f 100644 (file)
@@ -11,7 +11,7 @@
 #include "ReaderInternals.h"
 #include "llvm/Module.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/GlobalVariable.h"
 #include <algorithm>
 #include <iostream>
index fff2d02898c45002b4d98e6eebadf9d33e753437..7418c81bbea1f239d5ea77db93b6fd6456b077f5 100644 (file)
@@ -16,7 +16,7 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Module.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/iPHINode.h"
 #include "llvm/iOther.h"
 #include "llvm/Argument.h"
index 296e326445afd7237186e59270724e857e5a3138..d85ee2fe755dbe2c54fad89c08aed5ebb87117aa 100644 (file)
@@ -10,7 +10,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "WriterInternals.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/DerivedTypes.h"
 #include <iostream>
index ce62df9b721109a224380343449490e18d9af62e..6dad92609a2e6021fd0cf9b1ce22c87d9024835d 100644 (file)
@@ -15,8 +15,8 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Module.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
 #include "llvm/iOther.h"
+#include "llvm/Constant.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/Argument.h"
index 2f427770d9083aca56340bc5b87720aefb6161f5..145004b716dabdeb9c68a5488e263935965f4c66 100644 (file)
@@ -24,7 +24,6 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/DerivedTypes.h"
 #include "Support/STLExtras.h"
@@ -78,8 +77,8 @@ void BytecodeWriter::outputConstants(bool isFunction) {
 
     unsigned NC = ValNo;              // Number of constants
     for (; NC < Plane.size() && 
-          (isa<Constant>(Plane[NC]) || 
-            isa<Type>(Plane[NC])); NC++) /*empty*/;
+          (isa<Constant>(Plane[NC]) || isa<Type>(Plane[NC])); NC++)
+      /*empty*/;
     NC -= ValNo;                      // Convert from index into count
     if (NC == 0) continue;            // Skip empty type planes...
 
@@ -125,7 +124,7 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) {
 
     // If we have an initializer, output it now.
     if (GV->hasInitializer()) {
-      Slot = Table.getValSlot(GV->getInitializer());
+      Slot = Table.getValSlot((Value*)GV->getInitializer());
       assert(Slot != -1 && "No slot for global var initializer!");
       output_vbr((unsigned)Slot, Out);
     }
index e2f45a0285be7254e1b147cab294bfd280511e37..8fa59584c02892dd44da519e2659eaeffa51c658 100644 (file)
@@ -24,7 +24,7 @@
 #include "llvm/Function.h"
 #include "llvm/iTerminators.h"
 #include "llvm/iMemory.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constant.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/CodeGen/MachineInstr.h"
 #include "Support/STLExtras.h"
index 24efdf1456c6c186edd6c9fe968d57b240886d90..c042e368c9d80d82b2902d193f3e72ed1c024c31 100644 (file)
@@ -19,7 +19,7 @@
 #include "llvm/CodeGen/InstrForest.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/MachineRegInfo.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Type.h"
index 91f3e8914472af92cc2ebf2e3267d1ea4810b362..321003c1fdc0b7acd85f1c9b03f76ae30eab07ba 100644 (file)
@@ -11,7 +11,7 @@
 #include "llvm/iTerminators.h"
 #include "llvm/iMemory.h"
 #include "llvm/Type.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Assembly/Writer.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/GlobalVariable.h"
index 086c6c6b28f062fc4b897297a6f37989ac20cbfb..2de6f81fdf9ef46d1448c49c89efe836bbd8b3e3 100644 (file)
@@ -17,7 +17,7 @@
 #include "llvm/SymbolTable.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iOther.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Argument.h"
 #include <iostream>
 using std::cerr;
index e2f45a0285be7254e1b147cab294bfd280511e37..8fa59584c02892dd44da519e2659eaeffa51c658 100644 (file)
@@ -24,7 +24,7 @@
 #include "llvm/Function.h"
 #include "llvm/iTerminators.h"
 #include "llvm/iMemory.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constant.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/CodeGen/MachineInstr.h"
 #include "Support/STLExtras.h"
index 24efdf1456c6c186edd6c9fe968d57b240886d90..c042e368c9d80d82b2902d193f3e72ed1c024c31 100644 (file)
@@ -19,7 +19,7 @@
 #include "llvm/CodeGen/InstrForest.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/MachineRegInfo.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Type.h"
index 77c9d3183a12e3dee4ba7ba722ab90899ebd92b2..c823e91d1c99bcb99ea8b3b69d44cbf56496adfc 100644 (file)
@@ -15,7 +15,7 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/MachineCodeForMethod.h"
 #include "llvm/GlobalVariable.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Annotation.h"
 #include "llvm/BasicBlock.h"
@@ -307,13 +307,13 @@ SparcFunctionAsmPrinter::printOneOperand(const MachineOperand &op)
         const Value *Val = op.getVRegValue();
         if (!Val)
           toAsm << "\t<*NULL Value*>";
-        else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(Val))
+        else if (const BasicBlock *BB = dyn_cast<BasicBlock>(Val))
           toAsm << getID(BB);
-        else if (const Function *M = dyn_cast<const Function>(Val))
+        else if (const Function *M = dyn_cast<Function>(Val))
           toAsm << getID(M);
-        else if (const GlobalVariable *GV=dyn_cast<const GlobalVariable>(Val))
+        else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(Val))
           toAsm << getID(GV);
-        else if (const Constant *CV = dyn_cast<const Constant>(Val))
+        else if (const Constant *CV = dyn_cast<Constant>(Val))
           toAsm << getID(CV);
         else
           toAsm << "<unknown value=" << Val << ">";
index aa618c9259aef4f1d5545834065ee1f0da72becd..354c39aa6bcd5da7406932842aea85dabf1d81f5 100644 (file)
@@ -18,7 +18,7 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/MachineCodeForMethod.h"
 #include "llvm/Function.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 
 
index cff0a845c2f03051b7e63fa2699ebc60c37e10a2..7054ae9c44d825697c8c1ff31971f7487da86eee 100644 (file)
@@ -25,7 +25,7 @@
 #include "llvm/iOther.h"
 #include "llvm/BasicBlock.h"
 #include "llvm/Function.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "Support/MathExtras.h"
 #include <math.h>
 using std::vector;
index d347730ee0b89062a7c063819821ed6246c67f56..8479c6c8dbdae0a92b230538a858fbe901ba84d3 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "llvm/Target/TargetData.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 
 static inline void getTypeInfo(const Type *Ty, const TargetData *TD,
                               unsigned &Size, unsigned char &Alignment);
index 181ff70657c14b23bc6f754809d44641ba389e6f..cd14bb38284e9126082a948e5212f437650768b6 100644 (file)
@@ -11,7 +11,7 @@
 #include "llvm/iOther.h"
 #include "llvm/iPHINode.h"
 #include "llvm/iMemory.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/ConstantHandling.h"
 #include "llvm/Transforms/Scalar/DCE.h"
 #include "llvm/Analysis/Expressions.h"
index 2a6d18460d59209cf49e92c8388cddb671b7a175..5cb3ee0b90190704fee68b9f683ec11ea1e02780 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/iTerminators.h"
 #include "llvm/iOther.h"
 #include "llvm/Argument.h"
+#include "llvm/Constants.h"
 #include "Support/STLExtras.h"
 #include <algorithm>
 using std::map;
index bd67fe1cc9736cfab2332342a2513d701a801cd1..6ccd043a85cf8a52d211d17a7ecca280db92ed76 100644 (file)
@@ -21,7 +21,7 @@
 #include "llvm/iPHINode.h"
 #include "llvm/iOther.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Support/InstVisitor.h"
 #include "llvm/Argument.h"
index 41d4a72d7616c5e9d329788c457668d10c791f31..0b6d17d683dc0b40d44e77c23963a47f41361eb7 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "Graph.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iMemory.h"
 #include "llvm/iTerminators.h"
index b967db64c68d67b6760ed09fbd940540ea4a8fb6..26fa86661614d354c373e95bc077d98151362dd5 100644 (file)
@@ -29,7 +29,7 @@
 #include "llvm/Support/CFG.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iMemory.h"
 #include "llvm/Pass.h"
index d05d33dc721befae04f46c09d2e2b3f5a0d466b5..7b263c76ad8b76ddb69e30d131d952d5e494b432 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "llvm/Transforms/Instrumentation/TraceValues.h"
 #include "llvm/GlobalVariable.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iMemory.h"
 #include "llvm/iTerminators.h"
index f556cedcd8fd2c1c850a212cf2c1b546a701e4c7..77d06a0946cde6f38651603d1442cde4782cf070 100644 (file)
@@ -11,7 +11,7 @@
 #include "llvm/Function.h"
 #include "llvm/iOther.h"
 #include "llvm/iMemory.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Pass.h"
 #include "llvm/ConstantHandling.h"
 #include "llvm/Transforms/Scalar/DCE.h"
index a8cd02fed0561ebedbc32b41fe0727cef9afd831..0f1d0aea323afc24ee71503ff95175f5a67404de 100644 (file)
@@ -30,7 +30,6 @@
 #include "llvm/iPHINode.h"
 #include "llvm/iOther.h"
 #include "llvm/Pass.h"
-#include "llvm/ConstantVals.h"
 
 inline static bool 
 ConstantFoldUnaryInst(BasicBlock *BB, BasicBlock::iterator &II,
index 0d6f293cd06d8bd1e650de28ed788c2e50bc9dd8..1a3073c3c745199c26624b8ddd5f4ebfe6165cc5 100644 (file)
@@ -30,7 +30,7 @@
 #include "llvm/BasicBlock.h"
 #include "llvm/iTerminators.h"
 #include "llvm/iPHINode.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constant.h"
 #include "llvm/Support/CFG.h"
 #include "llvm/Pass.h"
 #include "Support/STLExtras.h"
index 0ec72c65e011a088e858790521236ca57c9c9368..78dcfd50dd64dfcd82ebb4e743459f67966c8d3e 100644 (file)
@@ -10,7 +10,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Transforms/Scalar/DecomposeMultiDimRefs.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/iMemory.h"
 #include "llvm/iOther.h"
 #include "llvm/BasicBlock.h"
index d9b841599266053274c106103f1cfeffe4b607fa..a115e050d17f2aa77251f21f117ef36cadaf00c4 100644 (file)
@@ -12,7 +12,7 @@
 #include "llvm/iOther.h"
 #include "llvm/Type.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CFG.h"
 #include "Support/STLExtras.h"
index 0225cd5e3d52cc1c86a33ae9eb16825b912bb9ca..ee7c4c8a727196532c0bf0e4ce52823083ac2ec9 100644 (file)
@@ -20,7 +20,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Transforms/Scalar/InductionVars.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Analysis/IntervalPartition.h"
 #include "llvm/iPHINode.h"
 #include "llvm/Function.h"
index e723fc833bbed6f55a6a10ee012147b5ae5f39d4..c68004d24550e0c3abc70e27572791bce8fec175 100644 (file)
@@ -19,7 +19,7 @@
 #include "llvm/ConstantHandling.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/iPHINode.h"
 #include "llvm/iMemory.h"
 #include "llvm/iTerminators.h"
index 55b9dda67e6532d0188d4297f965fb751d38328f..e5a88c592f5d0ce13130f85db0d74350b58dcfab 100644 (file)
@@ -7,7 +7,6 @@
 
 #include "TransformInternals.h"
 #include "llvm/Type.h"
-#include "llvm/ConstantVals.h"
 #include "llvm/Analysis/Expressions.h"
 #include "llvm/Function.h"
 #include "llvm/iOther.h"
index a93f63ece1523dfd2d676aa4970184d5f1ff852e..f57ed3ea6ecfab099e7b83e92a0e523a0f9ce4fa 100644 (file)
@@ -12,7 +12,7 @@
 #include "llvm/Instruction.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include <map>
 #include <set>
 
index 086c6c6b28f062fc4b897297a6f37989ac20cbfb..2de6f81fdf9ef46d1448c49c89efe836bbd8b3e3 100644 (file)
@@ -17,7 +17,7 @@
 #include "llvm/SymbolTable.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iOther.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Argument.h"
 #include <iostream>
 using std::cerr;
index 42524c8be86c2dfbef2421351e23e16ae71ab69e..21456a27d0d1ed811b0046e3e0946e3e8fa83743 100644 (file)
@@ -14,7 +14,7 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/iMemory.h"
 #include "llvm/iOther.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Pass.h"
 #include "TransformInternals.h"
 using std::vector;
index 8679701e6a7d0233cd27040e2758cfd0ab233b95..ab94550077731653a307261e477c126a905ecffe 100644 (file)
@@ -25,7 +25,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Function.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constant.h"
 
 using std::vector;
 using std::map;
@@ -79,7 +79,7 @@ static inline bool isSafeAlloca(const AllocaInst *AI) {
       if (MAI->hasIndices()) {  // indexed?
         // Allow the access if there is only one index and the index is
         // zero.
-        if (*MAI->idx_begin() != ConstantUInt::get(Type::UIntTy, 0) ||
+        if (*MAI->idx_begin() != Constant::getNullValue(Type::UIntTy) ||
             MAI->idx_begin()+1 != MAI->idx_end())
           return false;
       }
index 51ffbf6784dc2bb4976490a27f116846b3aded1c..316baf124fac50898782a4bdd9ff49d50e491c93 100644 (file)
@@ -18,7 +18,7 @@
 #include "llvm/Function.h"
 #include "llvm/GlobalVariable.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/iMemory.h"
 #include "llvm/iTerminators.h"
 #include "llvm/iPHINode.h"
index e126d702b40525b44a407c27c508ab9387925ebf..bd750df1bfee301f8a5c19e9acd179c637d0e3e7 100644 (file)
@@ -76,7 +76,7 @@ void BasicBlock::dropAllReferences() {
 //
 bool BasicBlock::hasConstantReferences() const {
   for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I)
-    if (::isa<Constant>(*I))
+    if (::isa<Constant>((Value*)*I))
       return true;
 
   return false;
index 1479fe01ef889d6bfee42aa4b32c480874145227..14231cb6abfbf129a600d86db48a8bde955c3e05 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef LLVM_CONSTANTHANDLING_H
 #define LLVM_CONSTANTHANDLING_H
 
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Instruction.h"
 #include "llvm/Type.h"
 class PointerType;
index 1479fe01ef889d6bfee42aa4b32c480874145227..14231cb6abfbf129a600d86db48a8bde955c3e05 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef LLVM_CONSTANTHANDLING_H
 #define LLVM_CONSTANTHANDLING_H
 
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Instruction.h"
 #include "llvm/Type.h"
 class PointerType;
index 8bf1d9cc199ad6cb51730b344b12ff84ca7733e0..7487bb480195e28f2059793f40c475ccb069eb3e 100644 (file)
@@ -1,11 +1,11 @@
-//===-- ConstantVals.cpp - Implement Constant nodes --------------*- C++ -*--=//
+//===-- Constants.cpp - Implement Constant nodes -----------------*- C++ -*--=//
 //
 // This file implements the Constant* classes...
 //
 //===----------------------------------------------------------------------===//
 
 #define __STDC_LIMIT_MACROS           // Get defs for INT64_MAX and friends...
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/GlobalValue.h"
index 086c6c6b28f062fc4b897297a6f37989ac20cbfb..2de6f81fdf9ef46d1448c49c89efe836bbd8b3e3 100644 (file)
@@ -17,7 +17,7 @@
 #include "llvm/SymbolTable.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/iOther.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/Argument.h"
 #include <iostream>
 using std::cerr;
index 08bc38723cea49a3ef1a3e60eab2aa941ae842fd..f06c9e3f60e338a725f77c937258fd573c54173d 100644 (file)
@@ -9,7 +9,7 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/InstrTypes.h"
 #include "llvm/Type.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "Support/STLExtras.h"
 #include "ValueHolderImpl.h"
index ce62df9b721109a224380343449490e18d9af62e..6dad92609a2e6021fd0cf9b1ce22c87d9024835d 100644 (file)
@@ -15,8 +15,8 @@
 #include "llvm/GlobalVariable.h"
 #include "llvm/Module.h"
 #include "llvm/BasicBlock.h"
-#include "llvm/ConstantVals.h"
 #include "llvm/iOther.h"
+#include "llvm/Constant.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/SymbolTable.h"
 #include "llvm/Argument.h"
index 7a17d06ff6a1d246665471b2fb94d4e8d87d5506..3ea928e4eb02890921f515bdbd7de042f0671ff0 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "llvm/DerivedTypes.h"
 #include "llvm/SymbolTable.h"
+#include "llvm/Constants.h"
 #include "Support/StringExtras.h"
 #include "Support/STLExtras.h"
 #include <iostream>
index 79c697edc8fbd0440ff5db752d8e9494c191cc80..09d9d156bf63183d05bf7006c9ce7676cf74fd50 100644 (file)
@@ -5,7 +5,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/iMemory.h"
-#include "llvm/ConstantVals.h"
+#include "llvm/Constants.h"
 
 static inline const Type *checkType(const Type *Ty) {
   assert(Ty && "Invalid indices for type!");