summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16/PIC16TargetObjectFile.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-10-21 10:42:44 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-10-21 10:42:44 +0000
commit4e4bba5c80cc1168d244397f3fe09f301237638a (patch)
treebc65d3b7f488e1336a7b582b8fa7441daa4c4ec4 /lib/Target/PIC16/PIC16TargetObjectFile.cpp
parentdb1d9dbdd72db4254a7ff033331970ad7fa9dd41 (diff)
downloadllvm-4e4bba5c80cc1168d244397f3fe09f301237638a.tar.gz
llvm-4e4bba5c80cc1168d244397f3fe09f301237638a.tar.bz2
llvm-4e4bba5c80cc1168d244397f3fe09f301237638a.tar.xz
Add a pass to overlay pic16 data sections for function frame and automatic
variables. This pass can be invoked by llvm-ld or opt to traverse over the call graph to detect what function frames and their automatic variables can be overlaid. Currently this builds an archive , but needs to be changed to a loadable module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16TargetObjectFile.cpp')
-rw-r--r--lib/Target/PIC16/PIC16TargetObjectFile.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16TargetObjectFile.cpp b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
index 11c579cc57..7eedf7fe23 100644
--- a/lib/Target/PIC16/PIC16TargetObjectFile.cpp
+++ b/lib/Target/PIC16/PIC16TargetObjectFile.cpp
@@ -25,6 +25,18 @@ PIC16TargetObjectFile::PIC16TargetObjectFile() {
PIC16TargetObjectFile::~PIC16TargetObjectFile() {
}
+/// Find a pic16 section. Return null if not found. Do not create one.
+PIC16Section *PIC16TargetObjectFile::
+findPIC16Section(const std::string &Name) {
+ /// Return if we have an already existing one.
+ PIC16Section *Entry = SectionsByName[Name];
+ if (Entry)
+ return Entry;
+
+ return NULL;
+}
+
+
/// Find a pic16 section. If not found, create one.
PIC16Section *PIC16TargetObjectFile::
getPIC16Section(const std::string &Name, PIC16SectionType Ty,