aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Utils/BuildLibCalls.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-11-17 01:27:36 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-11-17 01:27:36 +0000
commit9d434dbff3eb0501efc3457acec2401afdffef2f (patch)
treef07d875db36c105c6b61d98649ab84727af3160b /include/llvm/Transforms/Utils/BuildLibCalls.h
parentd5889d8c7fcd97994cf38bb7469a703fe3db3672 (diff)
downloadexternal_llvm-9d434dbff3eb0501efc3457acec2401afdffef2f.zip
external_llvm-9d434dbff3eb0501efc3457acec2401afdffef2f.tar.gz
external_llvm-9d434dbff3eb0501efc3457acec2401afdffef2f.tar.bz2
Add support for custom names for library functions in TargetLibraryInfo. Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom
names for fwrite and fputs. Fixes <rdar://problem/9815881>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/BuildLibCalls.h')
-rw-r--r--include/llvm/Transforms/Utils/BuildLibCalls.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Utils/BuildLibCalls.h b/include/llvm/Transforms/Utils/BuildLibCalls.h
index 53ff282..17cd58e 100644
--- a/include/llvm/Transforms/Utils/BuildLibCalls.h
+++ b/include/llvm/Transforms/Utils/BuildLibCalls.h
@@ -20,6 +20,7 @@
namespace llvm {
class Value;
class TargetData;
+ class TargetLibraryInfo;
/// CastToCStr - Return V if it is an i8*, otherwise cast it to i8*.
Value *CastToCStr(Value *V, IRBuilder<> &B);
@@ -86,12 +87,13 @@ namespace llvm {
/// EmitFPutS - Emit a call to the puts function. Str is required to be a
/// pointer and File is a pointer to FILE.
- void EmitFPutS(Value *Str, Value *File, IRBuilder<> &B, const TargetData *TD);
+ void EmitFPutS(Value *Str, Value *File, IRBuilder<> &B, const TargetData *TD,
+ const TargetLibraryInfo *TLI);
/// EmitFWrite - Emit a call to the fwrite function. This assumes that Ptr is
/// a pointer, Size is an 'intptr_t', and File is a pointer to FILE.
void EmitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B,
- const TargetData *TD);
+ const TargetData *TD, const TargetLibraryInfo *TLI);
/// SimplifyFortifiedLibCalls - Helper class for folding checked library
/// calls (e.g. __strcpy_chk) into their unchecked counterparts.