Fix a typo that broke SimplifyLibCalls/SPrintF.ll (pr1315)
authorChris Lattner <sabre@nondot.org>
Sun, 8 Apr 2007 18:11:26 +0000 (18:11 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 8 Apr 2007 18:11:26 +0000 (18:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35768 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/SimplifyLibCalls.cpp

index 7d65028601c80245fc64858d9c469a4a68893d19..87c1480fba72ea328944ce4eadf9861005bf0dfa 100644 (file)
@@ -1342,7 +1342,7 @@ public:
       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),