diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-21 20:09:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-21 20:09:13 +0000 |
commit | 40f5fbcc5c95bb96c43ce2d06d57ae9b7f852539 (patch) | |
tree | 0d0a9412ccb8baf2ddc8c217b9dfa91af481da1d | |
parent | 21c60904ce6b937cb0c8744375e9c1a95fe0e495 (diff) | |
download | external_llvm-40f5fbcc5c95bb96c43ce2d06d57ae9b7f852539.zip external_llvm-40f5fbcc5c95bb96c43ce2d06d57ae9b7f852539.tar.gz external_llvm-40f5fbcc5c95bb96c43ce2d06d57ae9b7f852539.tar.bz2 |
add a copy ctor to TargetLibraryInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131806 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetLibraryInfo.h | 1 | ||||
-rw-r--r-- | lib/Target/TargetLibraryInfo.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index 0914b5d..02a1a3c 100644 --- a/include/llvm/Target/TargetLibraryInfo.h +++ b/include/llvm/Target/TargetLibraryInfo.h @@ -51,6 +51,7 @@ public: static char ID; TargetLibraryInfo(); TargetLibraryInfo(const Triple &T); + explicit TargetLibraryInfo(const TargetLibraryInfo &TLI); /// has - This function is used by optimizations that want to match on or form /// a given library function. diff --git a/lib/Target/TargetLibraryInfo.cpp b/lib/Target/TargetLibraryInfo.cpp index e336b09..4b985b8 100644 --- a/lib/Target/TargetLibraryInfo.cpp +++ b/lib/Target/TargetLibraryInfo.cpp @@ -61,6 +61,12 @@ TargetLibraryInfo::TargetLibraryInfo(const Triple &T) : ImmutablePass(ID) { initialize(*this, T); } +TargetLibraryInfo::TargetLibraryInfo(const TargetLibraryInfo &TLI) + : ImmutablePass(ID) { + memcpy(AvailableArray, TLI.AvailableArray, sizeof(AvailableArray)); +} + + /// disableAllFunctions - This disables all builtins, which is used for options /// like -fno-builtin. void TargetLibraryInfo::disableAllFunctions() { |