summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-30 04:15:15 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-30 04:15:15 +0000
commite409f0a779008ad71f8ebb88431630d1d9e33a86 (patch)
tree9d66e3368f9007416fffdc37246e5ef1324594cc /lib/Target/PIC16/PIC16.h
parent0165a2ca897598bb95baec031362921565e24f2b (diff)
downloadllvm-e409f0a779008ad71f8ebb88431630d1d9e33a86.tar.gz
llvm-e409f0a779008ad71f8ebb88431630d1d9e33a86.tar.bz2
llvm-e409f0a779008ad71f8ebb88431630d1d9e33a86.tar.xz
Keep track of references to mem(cpy,move,set) and then print only one extern
declaration for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16.h')
-rw-r--r--lib/Target/PIC16/PIC16.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h
index 447beba7d6..09453fb3c6 100644
--- a/lib/Target/PIC16/PIC16.h
+++ b/lib/Target/PIC16/PIC16.h
@@ -255,6 +255,20 @@ namespace PIC16CC {
return false;
}
+ // FIXME: currently we track both @memcpy and memcpy, as
+ // the first one is generated by clang, and the second one by codegen
+ // while lowering intrinsics. One we fix codegen to use RTLIB, we can
+ // have only @memcpy here.
+ inline static bool isMemIntrinsic (const std::string &Name) {
+ if (Name.compare("@memcpy") == 0 || Name.compare("memcpy") == 0 ||
+ Name.compare("@memset") == 0 || Name.compare("memset") == 0 ||
+ Name.compare("@memmove") == 0 || Name.compare("memmove") == 0) {
+ return true;
+ }
+
+ return false;
+ }
+
inline static bool isLocalToFunc (std::string &Func, std::string &Var) {
if (! isLocalName(Var)) return false;