Fix a typo that broke SimplifyLibCalls/SPrintF.ll (pr1315)
llvm-svn: 35768
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 7d65028..87c1480 100644
--- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -1342,7 +1342,7 @@
return false;
// Get the second character and switch on its value
- switch (FormatStr[2]) {
+ switch (FormatStr[1]) {
case 'c': {
// sprintf(dest,"%c",chr) -> store chr, dest
Value *V = CastInst::createTruncOrBitCast(CI->getOperand(3),