aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-16 15:03:24 +0000
committerDan Gohman <gohman@apple.com>2010-08-16 15:03:24 +0000
commit1878aba8e4753f82a8e7c7390e0adbeb0a393bb5 (patch)
tree0928776d86fe57dd154b185dfb95c3e9db1de510 /include/llvm/ADT
parent6616f7e2f147c2320973993cbfb241a82262b764 (diff)
downloadexternal_llvm-1878aba8e4753f82a8e7c7390e0adbeb0a393bb5.zip
external_llvm-1878aba8e4753f82a8e7c7390e0adbeb0a393bb5.tar.gz
external_llvm-1878aba8e4753f82a8e7c7390e0adbeb0a393bb5.tar.bz2
Constify FoldingSetNodeIDRef's Data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/FoldingSet.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index 0a7401d..432ff27 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -217,13 +217,13 @@ template<typename T> struct FoldingSetTrait {
/// is often much larger than necessary, and the possibility of heap
/// allocation means it requires a non-trivial destructor call.
class FoldingSetNodeIDRef {
- unsigned* Data;
+ const unsigned* Data;
size_t Size;
public:
FoldingSetNodeIDRef() : Data(0), Size(0) {}
- FoldingSetNodeIDRef(unsigned *D, size_t S) : Data(D), Size(S) {}
+ FoldingSetNodeIDRef(const unsigned *D, size_t S) : Data(D), Size(S) {}
- unsigned *getData() const { return Data; }
+ const unsigned *getData() const { return Data; }
size_t getSize() const { return Size; }
};