aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-30 04:25:10 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-01-30 04:25:10 +0000
commitc8d7bc850ddf5a5df503a173b0bc0f8c03ffec96 (patch)
tree63c0d229e09fd5c3a9e90677ac7cd1b4a091eefc /include/llvm/CodeGen
parent826d11463b3fb0ecadae532821e6d11170276dc1 (diff)
Enable emitting of constant values in non-default address space as well. The APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index cdc7951625..d63b06d954 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -309,7 +309,7 @@ namespace llvm {
protected:
/// EmitZeros - Emit a block of zeros.
///
- void EmitZeros(uint64_t NumZeros) const;
+ void EmitZeros(uint64_t NumZeros, unsigned AddrSpace = 0) const;
/// EmitString - Emit a zero-byte-terminated string constant.
///
@@ -320,7 +320,7 @@ namespace llvm {
void EmitConstantValueOnly(const Constant *CV);
/// EmitGlobalConstant - Print a general LLVM constant to the .s file.
- void EmitGlobalConstant(const Constant* CV);
+ void EmitGlobalConstant(const Constant* CV, unsigned AddrSpace = 0);
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV);
@@ -351,7 +351,7 @@ namespace llvm {
/// printDataDirective - This method prints the asm directive for the
/// specified type.
- void printDataDirective(const Type *type);
+ void printDataDirective(const Type *type, unsigned AddrSpace = 0);
/// printSuffixedName - This prints a name with preceding
/// getPrivateGlobalPrefix and the specified suffix, handling quoted names
@@ -371,11 +371,12 @@ namespace llvm {
const GlobalValue *findGlobalValue(const Constant* CV);
void EmitLLVMUsedList(Constant *List);
void EmitXXStructorList(Constant *List);
- void EmitGlobalConstantStruct(const ConstantStruct* CVS);
+ void EmitGlobalConstantStruct(const ConstantStruct* CVS,
+ unsigned AddrSpace);
void EmitGlobalConstantArray(const ConstantArray* CVA);
void EmitGlobalConstantVector(const ConstantVector* CP);
- void EmitGlobalConstantFP(const ConstantFP* CFP);
- void EmitGlobalConstantLargeInt(const ConstantInt* CI);
+ void EmitGlobalConstantFP(const ConstantFP* CFP, unsigned AddrSpace);
+ void EmitGlobalConstantLargeInt(const ConstantInt* CI, unsigned AddrSpace);
GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy *C);
};
}