Browse code

bb #1800.

Török Edvin authored on 2010/03/10 18:44:30
Showing 1 changed files
... ...
@@ -57,7 +57,6 @@
57 57
 #include "llvm/Analysis/Verifier.h"
58 58
 #include "llvm/Transforms/Scalar.h"
59 59
 #include "llvm/System/ThreadLocal.h"
60
-#include "dconf.h"
61 60
 #include <cstdlib>
62 61
 #include <csetjmp>
63 62
 #include <new>
... ...
@@ -77,8 +76,10 @@
77 77
 #undef PACKAGE_STRING
78 78
 #undef PACKAGE_TARNAME
79 79
 #undef PACKAGE_VERSION
80
+#undef PACKAGE_URL
80 81
 #include "clamav-config.h"
81 82
 #endif
83
+#include "dconf.h"
82 84
 #include "clamav.h"
83 85
 #include "clambc.h"
84 86
 #include "bytecode.h"
... ...
@@ -258,7 +259,10 @@ public:
258 258
 		    break;
259 259
 		}
260 260
 		case DPointerType:
261
-		    Ty = PointerType::getUnqual(Elts[0]);
261
+		    if (!PointerType::isValidElementType(Elts[0]))
262
+			Ty = PointerType::getUnqual(Type::getInt8Ty(Context));
263
+		    else
264
+			Ty = PointerType::getUnqual(Elts[0]);
262 265
 		    break;
263 266
 		case DStructType:
264 267
 		    Ty = StructType::get(Context, Elts);
... ...
@@ -651,7 +655,6 @@ public:
651 651
 	    Functions[j]->setCallingConv(CallingConv::Fast);
652 652
 	}
653 653
 	const Type *I32Ty = Type::getInt32Ty(Context);
654
-	const Type *I64Ty = Type::getInt64Ty(Context);
655 654
 	if (!bc->trusted)
656 655
 	    PM.add(createClamBCRTChecks());
657 656
 	for (unsigned j=0;j<bc->num_func;j++) {