[llvm-commits] [poolalloc] r129007 - /poolalloc/trunk/lib/AssistDS/ArgCast.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Wed Apr 6 09:31:50 PDT 2011
Author: aggarwa4
Date: Wed Apr 6 11:31:50 2011
New Revision: 129007
URL: http://llvm.org/viewvc/llvm-project?rev=129007&view=rev
Log:
Expanded comment.
Modified:
poolalloc/trunk/lib/AssistDS/ArgCast.cpp
Modified: poolalloc/trunk/lib/AssistDS/ArgCast.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/ArgCast.cpp?rev=129007&r1=129006&r2=129007&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/ArgCast.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/ArgCast.cpp Wed Apr 6 11:31:50 2011
@@ -137,12 +137,15 @@
FormalType, false, "", CI);
Args.push_back(CastI);
} else {
- // Use ZExt in default case.
- // TODO: is this correct?
+ // Use ZExt in default case.
+ // Derived from InstCombine. Also, the only reason this should happen
+ // is mismatched prototypes.
+ // Seen in case of integer constants which get interpreted as i32,
+ // even if being used as i64.
+ // TODO: is this correct?
CastInst *CastI = CastInst::CreateIntegerCast(CI->getOperand(i+1),
FormalType, false, "", CI);
Args.push_back(CastI);
- break;
}
}
} else {
More information about the llvm-commits
mailing list