diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-26 17:02:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-26 17:02:08 +0000 |
commit | c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707 (patch) | |
tree | 25c6a5fb60aefed9e2f8e77e751c3e4b915a8e9b /include/llvm/IR | |
parent | e3561972d45633cee705084ce1e26c4ecbbe8d43 (diff) | |
download | llvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.gz llvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.bz2 llvm-c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707.tar.xz |
Compare DataLayout by Value, not by pointer.
This fixes spurious warnings in llvm-link about the datalayout not matching.
Thanks to Zalman Stern for reporting the bug!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR')
-rw-r--r-- | include/llvm/IR/DataLayout.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h index e26dd026bd..cfed302e65 100644 --- a/include/llvm/IR/DataLayout.h +++ b/include/llvm/IR/DataLayout.h @@ -193,6 +193,9 @@ public: return *this; } + bool operator==(const DataLayout &Other) const; + bool operator!=(const DataLayout &Other) const { return !(*this == Other); } + ~DataLayout(); // Not virtual, do not subclass this class /// Parse a data layout string (with fallback to default values). |