Skip to content

Commit

Permalink
(hopefuly) fix the remaining cases where null wasnt expected (PR13497).
Browse files Browse the repository at this point in the history
I'll commit a test to the clang tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161118 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
nunoplopes committed Aug 1, 2012
1 parent b705e4a commit 28ad863
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Transforms/Utils/BuildLibCalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ bool SimplifyFortifiedLibCalls::fold(CallInst *CI, const TargetData *TD,
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;
}
Expand All @@ -545,6 +547,8 @@ bool SimplifyFortifiedLibCalls::fold(CallInst *CI, const TargetData *TD,
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;
}
Expand Down

0 comments on commit 28ad863

Please sign in to comment.