[llvm-commits] [poolalloc] r131040 - /poolalloc/trunk/lib/AssistDS/TypeChecks.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Fri May 6 17:19:40 PDT 2011
Author: aggarwa4
Date: Fri May 6 19:19:40 2011
New Revision: 131040
URL: http://llvm.org/viewvc/llvm-project?rev=131040&view=rev
Log:
Added fread. Needed by 464.h264ref.
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=131040&r1=131039&r2=131040&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecks.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecks.cpp Fri May 6 19:19:40 2011
@@ -588,6 +588,16 @@
Constant *F = M.getOrInsertFunction("trackInitInst", VoidTy, VoidPtrTy, I->getType(), Int32Ty, NULL);
CallInst *CI = CallInst::Create(F, Args.begin(), Args.end());
CI->insertAfter(BCI);
+ } else if(F->getNameStr() == std::string("fread")) {
+ CastInst *BCI = BitCastInst::CreatePointerCast(I->getOperand(1), VoidPtrTy);
+ BCI->insertAfter(I);
+ std::vector<Value *> Args;
+ Args.push_back(BCI);
+ Args.push_back(I);
+ Args.push_back(ConstantInt::get(Int32Ty, tagCounter++));
+ Constant *F = M.getOrInsertFunction("trackInitInst", VoidTy, VoidPtrTy, I->getType(), Int32Ty, NULL);
+ CallInst *CI = CallInst::Create(F, Args.begin(), Args.end());
+ CI->insertAfter(BCI);
} else if(F->getNameStr() == std::string("calloc")) {
CastInst *BCI = BitCastInst::CreatePointerCast(I, VoidPtrTy);
BCI->insertAfter(I);
More information about the llvm-commits
mailing list