Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa committed Apr 23, 2024
1 parent 8408421 commit 4d60675
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions libclambcc/ClamBCRebuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ class ClamBCRebuild : public PassInfoMixin<ClamBCRebuild>, public InstVisitor<Cl

Value * findDuplicateType(Value * v, Type * t){
if (BitCastInst * bci = llvm::dyn_cast<BitCastInst>(v)){
DEBUG_VALUE(bci->getOperand(0));
DEBUG_VALUE(bci->getOperand(0)->getType());
DEBUG_VALUE(bci->getSrcTy());
DEBUG_VALUE(t);
//DEBUG_VALUE(bci->getOperand(0));
//DEBUG_VALUE(bci->getOperand(0)->getType());
//DEBUG_VALUE(bci->getSrcTy());
//DEBUG_VALUE(t);
if (bci->getSrcTy() == t){
return bci->getOperand(0);
}
Expand All @@ -324,18 +324,17 @@ class ClamBCRebuild : public PassInfoMixin<ClamBCRebuild>, public InstVisitor<Cl
{

//looking for concat_var
DEBUG_VALUE(V);
DEBUG_VALUE(Ty);
//DEBUG_VALUE(V);
//DEBUG_VALUE(Ty);
Value * v = findDuplicateType(V, Ty);
if (v){
DEBUG_VALUE(v);
//DEBUG_VALUE(v);
return v;
}





if (V->getType() == Ty) {
return V;
}
Expand Down
2 changes: 1 addition & 1 deletion libclambcc/ClamBCWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ class ClamBCWriter : public PassInfoMixin<ClamBCWriter>, public InstVisitor<Clam

void visitCallInst(CallInst &CI)
{
DEBUG_VALUE(&CI);
//DEBUG_VALUE(&CI);
Function *F = CI.getCalledFunction();
if (!F) {
stop("Indirect calls are not implemented yet!", &CI);
Expand Down

0 comments on commit 4d60675

Please sign in to comment.