diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-12 06:52:41 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-12 06:52:41 +0000 |
commit | 679e578c65d8283ae71409037d228ebcfdb28cff (patch) | |
tree | 7053ee0fc1762997ea483494ade62185d6ae9d04 /llvm/lib | |
parent | 6e8f8e899ac16725c01b9b9553cfc07377d4b285 (diff) | |
download | bcm5719-llvm-679e578c65d8283ae71409037d228ebcfdb28cff.tar.gz bcm5719-llvm-679e578c65d8283ae71409037d228ebcfdb28cff.zip |
We do not need to create a label for external defs and decls,
just emit a comment for readability.
llvm-svn: 71544
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/PIC16/PIC16.h | 14 | ||||
-rw-r--r-- | llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp | 7 |
2 files changed, 4 insertions, 17 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16.h b/llvm/lib/Target/PIC16/PIC16.h index ce7602cdd0f..40bed2f50e1 100644 --- a/llvm/lib/Target/PIC16/PIC16.h +++ b/llvm/lib/Target/PIC16/PIC16.h @@ -234,20 +234,6 @@ namespace PIC16CC { return o.str(); } - static std::string getDeclSectionName(void) { - std::string dsname = "section.0"; - dsname = addPrefix(dsname); - return dsname; - } - - // FIXME: currently decls for libcalls are into a separate section. - // merge the rest of decls to one. - static std::string getLibDeclSectionName(void) { - std::string dsname = "lib_decls.0"; - dsname = addPrefix(dsname); - return dsname; - } - inline static bool isLocalName (const std::string &Name) { if (getSymbolTag(Name) == AUTOS_LABEL) return true; diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp index 9dd4d3bc08c..1792eaa8351 100644 --- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp +++ b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp @@ -157,8 +157,7 @@ void PIC16AsmPrinter::printDecls(void) { // If no libcalls used, return. if (Decls.empty()) return; - const Section *S = TAI->getNamedSection(PAN::getLibDeclSectionName().c_str()); - SwitchToSection(S); + O << TAI->getCommentString() << "External decls for libcalls - BEGIN." <<"\n"; // Remove duplicate entries. Decls.sort(); Decls.unique(); @@ -169,6 +168,7 @@ void PIC16AsmPrinter::printDecls(void) { O << TAI->getExternDirective() << PAN::getArgsLabel(*I) << "\n"; O << TAI->getExternDirective() << PAN::getRetvalLabel(*I) << "\n"; } + O << TAI->getCommentString() << "External decls for libcalls - END." <<"\n"; } bool PIC16AsmPrinter::doInitialization (Module &M) { @@ -191,7 +191,7 @@ bool PIC16AsmPrinter::doInitialization (Module &M) { void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) { // Emit declarations for external functions. - O << PAN::getDeclSectionName() <<"\n"; + O << TAI->getCommentString() << "External defs and decls - BEGIN." <<"\n"; for (Module::iterator I = M.begin(), E = M.end(); I != E; I++) { std::string Name = Mang->getValueName(I); if (Name.compare("@abort") == 0) @@ -233,6 +233,7 @@ void PIC16AsmPrinter::EmitExternsAndGlobals (Module &M) { TAI->getGlobalDirective(); O << directive << Name << "\n"; } + O << TAI->getCommentString() << "External defs and decls - END." <<"\n"; } void PIC16AsmPrinter::EmitRomData (Module &M) |