[PATCH] D31094: [BuildLibCalls] emitPutChar should infer its function attributes
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 17:00:22 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL298171: [BuildLibCalls] emitPutChar should infer function attributes for putchar (authored by ctopper).
Changed prior to commit:
https://reviews.llvm.org/D31094?vs=92179&id=92232#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31094
Files:
llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
Index: llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
+++ llvm/trunk/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -920,6 +920,7 @@
Module *M = B.GetInsertBlock()->getModule();
Value *PutChar = M->getOrInsertFunction("putchar", B.getInt32Ty(),
B.getInt32Ty(), nullptr);
+ inferLibFuncAttributes(*M->getFunction("putchar"), *TLI);
CallInst *CI = B.CreateCall(PutChar,
B.CreateIntCast(Char,
B.getInt32Ty(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31094.92232.patch
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170318/af77e6a7/attachment.bin>
More information about the llvm-commits
mailing list