aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-20 17:12:46 +0000
committerChris Lattner <sabre@nondot.org>2009-07-20 17:12:46 +0000
commit83757c7fb51bd60a8c264fba24a0b6f1b01efdd3 (patch)
tree2c984abe14acdf306942c1860840d4eaee5fe76c
parentd3eb106dfacda206b8651d1c39f5a26fc7be09a8 (diff)
rename TargetAsmInfo::getASDirective -> getDataASDirective
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76431 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetAsmInfo.h17
-rw-r--r--lib/Target/PIC16/PIC16TargetAsmInfo.cpp26
-rw-r--r--lib/Target/PIC16/PIC16TargetAsmInfo.h2
3 files changed, 20 insertions, 25 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index 50e08bda44..0ba79a408f 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -305,11 +305,10 @@ namespace llvm {
const char *Data32bitsDirective; // Defaults to "\t.long\t"
const char *Data64bitsDirective; // Defaults to "\t.quad\t"
- /// getASDirective - Targets can override it to provide different data
- /// directives for various sizes and non-default address spaces.
- virtual const char *getASDirective(unsigned size,
- unsigned AS) const {
- assert(AS > 0 && "Dont know the directives for default addr space");
+ /// getDataASDirective - Return the directive that should be used to emit
+ /// data of the specified size to the specified numeric address space.
+ virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
+ assert(AS != 0 && "Don't know the directives for default addr space");
return NULL;
}
@@ -631,16 +630,16 @@ namespace llvm {
// Data directive accessors
//
const char *getData8bitsDirective(unsigned AS = 0) const {
- return AS == 0 ? Data8bitsDirective : getASDirective(8, AS);
+ return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
}
const char *getData16bitsDirective(unsigned AS = 0) const {
- return AS == 0 ? Data16bitsDirective : getASDirective(16, AS);
+ return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
}
const char *getData32bitsDirective(unsigned AS = 0) const {
- return AS == 0 ? Data32bitsDirective : getASDirective(32, AS);
+ return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
}
const char *getData64bitsDirective(unsigned AS = 0) const {
- return AS == 0 ? Data64bitsDirective : getASDirective(64, AS);
+ return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
}
diff --git a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
index 2471bf747f..e8b86e0435 100644
--- a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
+++ b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
@@ -54,25 +54,21 @@ PIC16TargetAsmInfo(const PIC16TargetMachine &TM)
HasSingleParameterDotFile = false;
}
-const char *PIC16TargetAsmInfo::getRomDirective(unsigned size) const
-{
- if (size == 8)
- return RomData8bitsDirective;
- else if (size == 16)
- return RomData16bitsDirective;
- else if (size == 32)
- return RomData32bitsDirective;
- else
- return NULL;
+const char *PIC16TargetAsmInfo::getRomDirective(unsigned Size) const {
+ switch (Size) {
+ case 8: return RomData8bitsDirective;
+ case 16: return RomData16bitsDirective;
+ case 32: return RomData32bitsDirective;
+ default: return NULL;
+ }
}
-const char *PIC16TargetAsmInfo::getASDirective(unsigned size,
- unsigned AS) const {
+const char *PIC16TargetAsmInfo::
+getDataASDirective(unsigned Size, unsigned AS) const {
if (AS == PIC16ISD::ROM_SPACE)
- return getRomDirective(size);
- else
- return NULL;
+ return getRomDirective(Size);
+ return NULL;
}
const Section *
diff --git a/lib/Target/PIC16/PIC16TargetAsmInfo.h b/lib/Target/PIC16/PIC16TargetAsmInfo.h
index b97336bac3..92116afc8a 100644
--- a/lib/Target/PIC16/PIC16TargetAsmInfo.h
+++ b/lib/Target/PIC16/PIC16TargetAsmInfo.h
@@ -58,7 +58,7 @@ namespace llvm {
const char *RomData16bitsDirective;
const char *RomData32bitsDirective;
const char *getRomDirective(unsigned size) const;
- virtual const char *getASDirective(unsigned size, unsigned AS) const;
+ virtual const char *getDataASDirective(unsigned size, unsigned AS) const;
const Section *getBSSSectionForGlobal(const GlobalVariable *GV) const;
const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const;
const Section *getSectionForAuto(const GlobalVariable *GV) const;