[llvm-commits] [llvm] r161118 - /llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
Nuno Lopes
nunoplopes at sapo.pt
Wed Aug 1 09:58:51 PDT 2012
Author: nlopes
Date: Wed Aug 1 11:58:51 2012
New Revision: 161118
URL: http://llvm.org/viewvc/llvm-project?rev=161118&view=rev
Log:
(hopefuly) fix the remaining cases where null wasnt expected (PR13497).
I'll commit a test to the clang tree.
Modified:
llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
Modified: llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp?rev=161118&r1=161117&r2=161118&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp Wed Aug 1 11:58:51 2012
@@ -526,6 +526,8 @@
if (isFoldable(2, 1, true)) {
Value *Ret = EmitStrCpy(CI->getArgOperand(0), CI->getArgOperand(1), B, TD,
TLI, Name.substr(2, 6));
+ if (!Ret)
+ return false;
replaceCall(Ret);
return true;
}
@@ -545,6 +547,8 @@
Value *Ret = EmitStrNCpy(CI->getArgOperand(0), CI->getArgOperand(1),
CI->getArgOperand(2), B, TD, TLI,
Name.substr(2, 7));
+ if (!Ret)
+ return false;
replaceCall(Ret);
return true;
}
More information about the llvm-commits
mailing list