summaryrefslogtreecommitdiff
path: root/include/llvm/IR/DataLayout.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-07-05 14:21:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-07-05 14:21:36 +0000
commit1a82d4c088707c791c792f6822f611b47a12bdfe (patch)
tree7c411f9b5d807f7f204fdd16965d8925a82b6d18 /include/llvm/IR/DataLayout.h
parent3a0822f094b578157263e04114075ad7df81db41 (diff)
Notes
Diffstat (limited to 'include/llvm/IR/DataLayout.h')
-rw-r--r--include/llvm/IR/DataLayout.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h
index 81cf66509042..892d6c9936c0 100644
--- a/include/llvm/IR/DataLayout.h
+++ b/include/llvm/IR/DataLayout.h
@@ -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(); }
@@ -542,6 +544,6 @@ inline uint64_t DataLayout::getTypeSizeInBits(Type *Ty) const {
}
}
-} // namespace llvm
+} // End llvm namespace
#endif