mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Add AsmPrinter (aka MCLowering) support for ConstantDataSequential,
and clean up some other misc stuff. Unlike ConstantArray, we will prefer to emit .fill directives for "String" arrays that all have the same value, since they are denser than emitting a .ascii git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -640,7 +640,10 @@ public:
|
||||
/// getAsString - If this array is isString(), then this method returns the
|
||||
/// array as a StringRef. Otherwise, it asserts out.
|
||||
///
|
||||
StringRef getAsString() const;
|
||||
StringRef getAsString() const {
|
||||
assert(isString() && "Not a string");
|
||||
return getRawDataValues();
|
||||
}
|
||||
|
||||
/// getAsCString - If this array is isCString(), then this method returns the
|
||||
/// array (without the trailing null byte) as a StringRef. Otherwise, it
|
||||
@@ -652,6 +655,10 @@ public:
|
||||
return Str.substr(0, Str.size()-1);
|
||||
}
|
||||
|
||||
/// getRawDataValues - Return the raw, underlying, bytes of this data. Note
|
||||
/// that this is an extremely tricky thing to work with, as it exposes the
|
||||
/// host endianness of the data elements.
|
||||
StringRef getRawDataValues() const;
|
||||
|
||||
virtual void destroyConstant();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user