[llvm-commits] [llvm] r171119 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Bob Wilson
bob.wilson at apple.com
Fri Feb 8 13:49:35 PST 2013
On Dec 26, 2012, at 8:03 PM, Bob Wilson <bob.wilson at apple.com> wrote:
> Thanks, Nick. This code was the main thing that prompted my change to add emitWarning to LLVMContext. I think I'll just revert that when I get a chance.
Better late than never! I've reverted that emitWarning method in 174748
>
> On Dec 26, 2012, at 2:00 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>
>> Author: nicholas
>> Date: Wed Dec 26 16:00:35 2012
>> New Revision: 171119
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=171119&view=rev
>> Log:
>> Remove mid-optimizer warning. This situation should be handled differently,
>> such as by a compiler warning, a check in clang -fsanitizer=undefined, being
>> optimized to unreachable, or a combination of the above. PR14722.
>>
>> Modified:
>> llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=171119&r1=171118&r2=171119&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
>> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Wed Dec 26 16:00:35 2012
>> @@ -1153,11 +1153,8 @@
>>
>> // If we are removing arguments to the function, emit an obnoxious warning.
>> if (FT->getNumParams() < NumActualArgs) {
>> - if (!FT->isVarArg()) {
>> - FT->getContext().emitWarning("while resolving call to function '" +
>> - Callee->getName() +
>> - "' arguments were dropped");
>> - } else {
>> + // TODO: if (!FT->isVarArg()) this call may be unreachable. PR14722
>> + if (FT->isVarArg()) {
>> // Add all of the arguments in their promoted form to the arg list.
>> for (unsigned i = FT->getNumParams(); i != NumActualArgs; ++i, ++AI) {
>> Type *PTy = getPromotedType((*AI)->getType());
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list