[llvm-commits] [poolalloc] r132362 - /poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue May 31 14:28:21 PDT 2011
Author: aggarwa4
Date: Tue May 31 16:28:21 2011
New Revision: 132362
URL: http://llvm.org/viewvc/llvm-project?rev=132362&view=rev
Log:
Add an option to not differentiate between pointer
types, when typechecking.
Modified:
poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
Modified: poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecks.cpp?rev=132362&r1=132361&r2=132362&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Tue May 31 16:28:21 2011
@@ -44,6 +44,10 @@
cl::desc("Use DSA pass"),
cl::Hidden,
cl::init(false));
+ static cl::opt<bool> DisablePointerTypeChecks("disable-ptr-type-checks",
+ cl::desc("DONT Distinguish pointer types"),
+ cl::Hidden,
+ cl::init(false));
}
static int tagCounter = 0;
@@ -55,6 +59,11 @@
unsigned int
TypeChecks::getTypeMarker(const Type * Ty) {
+ if(DisablePointerTypeChecks) {
+ if(Ty->isPointerTy()) {
+ Ty = VoidPtrTy;
+ }
+ }
if(UsedTypes.find(Ty) == UsedTypes.end())
UsedTypes[Ty] = UsedTypes.size();
More information about the llvm-commits
mailing list