[llvm-commits] [poolalloc] r128815 - in /poolalloc/trunk: include/assistDS/TypeChecks.h lib/AssistDS/TypeChecks.cpp lib/AssistDS/TypeChecks.h

Arushi Aggarwal aggarwa4 at illinois.edu
Mon Apr 4 07:26:22 PDT 2011


Author: aggarwa4
Date: Mon Apr  4 09:26:22 2011
New Revision: 128815

URL: http://llvm.org/viewvc/llvm-project?rev=128815&view=rev
Log:
Move header file to the include folder.

Added:
    poolalloc/trunk/include/assistDS/TypeChecks.h
Removed:
    poolalloc/trunk/lib/AssistDS/TypeChecks.h
Modified:
    poolalloc/trunk/lib/AssistDS/TypeChecks.cpp

Added: poolalloc/trunk/include/assistDS/TypeChecks.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/assistDS/TypeChecks.h?rev=128815&view=auto
==============================================================================
--- poolalloc/trunk/include/assistDS/TypeChecks.h (added)
+++ poolalloc/trunk/include/assistDS/TypeChecks.h Mon Apr  4 09:26:22 2011
@@ -0,0 +1,62 @@
+//===------------- TypeChecks.h - Insert runtime type checks --------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This pass inserts checks to enforce type safety during runtime.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TYPE_CHECKS_H
+#define TYPE_CHECKS_H
+
+#include "llvm/Instructions.h"
+#include "llvm/Pass.h"
+
+#include <map>
+
+namespace llvm {
+
+class Type;
+class Value;
+
+class TypeChecks : public ModulePass {
+private:
+  unsigned int maxType;
+  std::map<const Type *, unsigned int> UsedTypes;
+  std::map<const Value *, const Type *> UsedValues;
+
+  // Incorporate one type and all of its subtypes into the collection of used types.
+  void IncorporateType(const Type *Ty);
+
+  // Incorporate all of the types used by this value.
+  void IncorporateValue(const Value *V);
+
+public:
+  static char ID;
+  TypeChecks() : ModulePass(&ID) {}
+  virtual bool runOnModule(Module &M);
+  virtual void print(raw_ostream &OS, const Module *M) const;
+
+  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+  }
+
+  bool initShadow(Module &M, StoreInst &SI);
+  bool initShadowLI(Module &M, LoadInst &LI);
+  bool unmapShadow(Module &M, Instruction &I);
+  bool visitLoadInst(Module &M, LoadInst &LI);
+  bool visitStoreInst(Module &M, StoreInst &SI);
+
+  // Return the map containing all of the types used in the module.
+  const std::map<const Type *, unsigned int> &getTypes() const {
+    return UsedTypes;
+  }
+};
+
+} // End llvm namespace
+
+#endif

Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=128815&r1=128814&r2=128815&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Mon Apr  4 09:26:22 2011
@@ -11,7 +11,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "TypeChecks.h"
+#include "assistDS/TypeChecks.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"

Removed: poolalloc/trunk/lib/AssistDS/TypeChecks.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.h?rev=128814&view=auto
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecks.h (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecks.h (removed)
@@ -1,62 +0,0 @@
-//===------------- TypeChecks.h - Insert runtime type checks --------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This pass inserts checks to enforce type safety during runtime.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef TYPE_CHECKS_H
-#define TYPE_CHECKS_H
-
-#include "llvm/Instructions.h"
-#include "llvm/Pass.h"
-
-#include <map>
-
-namespace llvm {
-
-class Type;
-class Value;
-
-class TypeChecks : public ModulePass {
-private:
-  unsigned int maxType;
-  std::map<const Type *, unsigned int> UsedTypes;
-  std::map<const Value *, const Type *> UsedValues;
-
-  // Incorporate one type and all of its subtypes into the collection of used types.
-  void IncorporateType(const Type *Ty);
-
-  // Incorporate all of the types used by this value.
-  void IncorporateValue(const Value *V);
-
-public:
-  static char ID;
-  TypeChecks() : ModulePass(&ID) {}
-  virtual bool runOnModule(Module &M);
-  virtual void print(raw_ostream &OS, const Module *M) const;
-
-  virtual void getAnalysisUsage(AnalysisUsage &AU) const {
-  }
-
-  bool initShadow(Module &M, StoreInst &SI);
-  bool initShadowLI(Module &M, LoadInst &LI);
-  bool unmapShadow(Module &M, Instruction &I);
-  bool visitLoadInst(Module &M, LoadInst &LI);
-  bool visitStoreInst(Module &M, StoreInst &SI);
-
-  // Return the map containing all of the types used in the module.
-  const std::map<const Type *, unsigned int> &getTypes() const {
-    return UsedTypes;
-  }
-};
-
-} // End llvm namespace
-
-#endif





More information about the llvm-commits mailing list