aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-08 04:50:14 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-08 04:50:14 +0000
commit03fb67c6098d4688d01609cde53844832b956a5a (patch)
tree160e3f9555dc44fd2625488c2a7dbbf30dcac520 /lib/Target/PIC16/PIC16TargetAsmInfo.cpp
parent1a5ede92e5246b0332855b88ea37c5665a94b793 (diff)
downloadexternal_llvm-03fb67c6098d4688d01609cde53844832b956a5a.zip
external_llvm-03fb67c6098d4688d01609cde53844832b956a5a.tar.gz
external_llvm-03fb67c6098d4688d01609cde53844832b956a5a.tar.bz2
Moved pic16 naming functions to correct place.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16TargetAsmInfo.cpp')
-rw-r--r--lib/Target/PIC16/PIC16TargetAsmInfo.cpp54
1 files changed, 1 insertions, 53 deletions
diff --git a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
index 731329e..8be9a33 100644
--- a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
+++ b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
@@ -192,7 +192,7 @@ void PIC16TargetAsmInfo::SetSectionForGVs(Module &M) {
// variable and should not be printed in global data section.
std::string name = I->getName();
if (name.find(".auto.") != std::string::npos
- || name.find(".arg.") != std::string::npos)
+ || name.find(".args.") != std::string::npos)
continue;
int AddrSpace = I->getType()->getAddressSpace();
@@ -202,58 +202,6 @@ void PIC16TargetAsmInfo::SetSectionForGVs(Module &M) {
}
-// Helper routine.
-// Func name starts after prefix and followed by a .
-static std::string getFuncNameForSym(const std::string &Sym,
- PIC16ABINames::IDs PrefixType) {
-
- const char *prefix = getIDName (PIC16ABINames::PREFIX_SYMBOL);
-
- // This name may or may not start with prefix;
- // Func names start after prfix in that case.
- size_t func_name_start = 0;
- if (Sym.find(prefix, 0, strlen(prefix)) != std::string::npos)
- func_name_start = strlen(prefix);
-
- // Position of the . after func name.
- size_t func_name_end = Sym.find ('.', func_name_start);
-
- return Sym.substr (func_name_start, func_name_end);
-}
-
-// Helper routine to create a section name given the section prefix
-// and func name.
-static std::string
-getSectionNameForFunc (const std::string &Fname,
- const PIC16ABINames::IDs sec_id) {
- std::string sec_id_string = getIDName (sec_id);
- return sec_id_string + "." + Fname + ".#";
-}
-
-
-// Get the section for the given external symbol names.
-// This function is meant for only mangled external symbol names.
-std::string
-llvm::getSectionNameForSym(const std::string &Sym) {
- std::string SectionName;
-
- PIC16ABINames::IDs id = getID (Sym);
- std::string Fname = getFuncNameForSym (Sym, id);
-
- switch (id) {
- default : assert (0 && "Could not determine external symbol type");
- case PIC16ABINames::FUNC_FRAME:
- case PIC16ABINames::FUNC_RET:
- case PIC16ABINames::FUNC_TEMPS:
- case PIC16ABINames::FUNC_ARGS: {
- return getSectionNameForFunc (Fname, PIC16ABINames::FRAME_SECTION);
- }
- case PIC16ABINames::FUNC_AUTOS: {
- return getSectionNameForFunc (Fname, PIC16ABINames::AUTOS_SECTION);
- }
- }
-}
-
PIC16TargetAsmInfo::~PIC16TargetAsmInfo() {
for (unsigned i = 0; i < BSSSections.size(); i++) {