add info about how to run the tests with valgrind
[oota-llvm.git] / docs / ProgrammersManual.html
index ba8a38be9a9029b36bf65e370dacec0e13221b4e..e7e4ce861547011959895ac474bf4f4044b6be3a 100644 (file)
@@ -1614,7 +1614,7 @@ class OurFunctionPass : public FunctionPass {
 
     virtual runOnFunction(Function& F) {
       for (Function::iterator b = F.begin(), be = F.end(); b != be; ++b) {
-        for (BasicBlock::iterator i = b->begin(); ie = b->end(); i != ie; ++i) {
+        for (BasicBlock::iterator i = b->begin(), ie = b->end(); i != ie; ++i) {
           if (<a href="#CallInst">CallInst</a>* callInst = <a href="#isa">dyn_cast</a>&lt;<a
  href="#CallInst">CallInst</a>&gt;(&amp;*i)) {
             // <i>We know we've encountered a call instruction, so we</i>
@@ -1956,7 +1956,7 @@ AllocaInst* instToReplace = ...;
 BasicBlock::iterator ii(instToReplace);
 
 ReplaceInstWithValue(instToReplace-&gt;getParent()-&gt;getInstList(), ii,
-                     Constant::getNullValue(PointerType::get(Type::Int32Ty)));
+                     Constant::getNullValue(PointerType::getUnqual(Type::Int32Ty)));
 </pre></div></li>
 
   <li><tt>ReplaceInstWithInst</tt> 
@@ -2091,7 +2091,7 @@ To build this, use the following LLVM APIs:
 // <i>Create the initial outer struct</i>
 <a href="#PATypeHolder">PATypeHolder</a> StructTy = OpaqueType::get();
 std::vector&lt;const Type*&gt; Elts;
-Elts.push_back(PointerType::get(StructTy));
+Elts.push_back(PointerType::getUnqual(StructTy));
 Elts.push_back(Type::Int32Ty);
 StructType *NewSTy = StructType::get(Elts);