forked from OSchip/llvm-project
				
			rename TargetAsmInfo::getASDirective -> getDataASDirective
llvm-svn: 76431
This commit is contained in:
		
							parent
							
								
									0854f5c6a8
								
							
						
					
					
						commit
						d290543332
					
				| 
						 | 
					@ -305,11 +305,10 @@ namespace llvm {
 | 
				
			||||||
    const char *Data32bitsDirective;      // Defaults to "\t.long\t"
 | 
					    const char *Data32bitsDirective;      // Defaults to "\t.long\t"
 | 
				
			||||||
    const char *Data64bitsDirective;      // Defaults to "\t.quad\t"
 | 
					    const char *Data64bitsDirective;      // Defaults to "\t.quad\t"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// getASDirective - Targets can override it to provide different data
 | 
					    /// getDataASDirective - Return the directive that should be used to emit
 | 
				
			||||||
    /// directives for various sizes and non-default address spaces.
 | 
					    /// data of the specified size to the specified numeric address space.
 | 
				
			||||||
    virtual const char *getASDirective(unsigned size, 
 | 
					    virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
 | 
				
			||||||
                                       unsigned AS) const {
 | 
					      assert(AS != 0 && "Don't know the directives for default addr space");
 | 
				
			||||||
      assert(AS > 0 && "Dont know the directives for default addr space");
 | 
					 | 
				
			||||||
      return NULL;
 | 
					      return NULL;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -631,16 +630,16 @@ namespace llvm {
 | 
				
			||||||
    // Data directive accessors
 | 
					    // Data directive accessors
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
    const char *getData8bitsDirective(unsigned AS = 0) const {
 | 
					    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 {
 | 
					    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 {
 | 
					    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 {
 | 
					    const char *getData64bitsDirective(unsigned AS = 0) const {
 | 
				
			||||||
      return AS == 0 ? Data64bitsDirective : getASDirective(64, AS);
 | 
					      return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,24 +54,20 @@ PIC16TargetAsmInfo(const PIC16TargetMachine &TM)
 | 
				
			||||||
  HasSingleParameterDotFile = false;
 | 
					  HasSingleParameterDotFile = false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const char *PIC16TargetAsmInfo::getRomDirective(unsigned size) const
 | 
					const char *PIC16TargetAsmInfo::getRomDirective(unsigned Size) const {
 | 
				
			||||||
{
 | 
					  switch (Size) {
 | 
				
			||||||
  if (size == 8)
 | 
					  case  8: return RomData8bitsDirective;
 | 
				
			||||||
    return RomData8bitsDirective;
 | 
					  case 16: return RomData16bitsDirective;
 | 
				
			||||||
  else if (size == 16)
 | 
					  case 32: return RomData32bitsDirective;
 | 
				
			||||||
    return RomData16bitsDirective;
 | 
					  default: return NULL;
 | 
				
			||||||
  else if (size == 32)
 | 
					  }
 | 
				
			||||||
    return RomData32bitsDirective;
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    return NULL;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const char *PIC16TargetAsmInfo::getASDirective(unsigned size, 
 | 
					const char *PIC16TargetAsmInfo::
 | 
				
			||||||
                                               unsigned AS) const {
 | 
					getDataASDirective(unsigned Size, unsigned AS) const {
 | 
				
			||||||
  if (AS == PIC16ISD::ROM_SPACE)
 | 
					  if (AS == PIC16ISD::ROM_SPACE)
 | 
				
			||||||
    return getRomDirective(size);
 | 
					    return getRomDirective(Size);
 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
  return NULL;
 | 
					  return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,7 +58,7 @@ namespace llvm {
 | 
				
			||||||
    const char *RomData16bitsDirective;
 | 
					    const char *RomData16bitsDirective;
 | 
				
			||||||
    const char *RomData32bitsDirective;
 | 
					    const char *RomData32bitsDirective;
 | 
				
			||||||
    const char *getRomDirective(unsigned size) const;
 | 
					    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 *getBSSSectionForGlobal(const GlobalVariable *GV) const;
 | 
				
			||||||
    const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const;
 | 
					    const Section *getIDATASectionForGlobal(const GlobalVariable *GV) const;
 | 
				
			||||||
    const Section *getSectionForAuto(const GlobalVariable *GV) const;
 | 
					    const Section *getSectionForAuto(const GlobalVariable *GV) const;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue