mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-06-26 10:29:57 +00:00
DataLayout now returns a const ref to its member string representation
There was no particular reason to return by value in the first place. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e874345be4
commit
237b76d740
|
@ -222,7 +222,9 @@ public:
|
|||
/// This representation is in the same format accepted by the string
|
||||
/// constructor above. This should not be used to compare two DataLayout as
|
||||
/// different string can represent the same layout.
|
||||
std::string getStringRepresentation() const { return StringRepresentation; }
|
||||
const std::string &getStringRepresentation() const {
|
||||
return StringRepresentation;
|
||||
}
|
||||
|
||||
/// \brief Test if the DataLayout was constructed from an empty string.
|
||||
bool isDefault() const { return StringRepresentation.empty(); }
|
||||
|
|
|
@ -249,7 +249,7 @@ public:
|
|||
|
||||
/// Get the data layout string for the module's target platform. This is
|
||||
/// equivalent to getDataLayout()->getStringRepresentation().
|
||||
const std::string getDataLayoutStr() const {
|
||||
const std::string &getDataLayoutStr() const {
|
||||
return DL.getStringRepresentation();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user