projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f5f5dce
)
Deallocate() methods now take a 'const void*' instead of a 'void *', matching observe...
author
Ted Kremenek
<kremenek@apple.com>
Fri, 6 Feb 2009 19:34:14 +0000
(19:34 +0000)
committer
Ted Kremenek
<kremenek@apple.com>
Fri, 6 Feb 2009 19:34:14 +0000
(19:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63956
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Allocator.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Allocator.h
b/include/llvm/Support/Allocator.h
index 97c6d187a72297f2115317380925f3fe61f3fc5f..f0c713af86d9ea6583a5dde98540e79e60521e2f 100644
(file)
--- a/
include/llvm/Support/Allocator.h
+++ b/
include/llvm/Support/Allocator.h
@@
-36,7
+36,7
@@
public:
return static_cast<T*>(malloc(sizeof(T)*Num));
}
- void Deallocate(
void *Ptr) { free(Ptr
); }
+ void Deallocate(
const void *Ptr) { free(const_cast<void*>(Ptr)
); }
void PrintStats() const {}
};
@@
-80,9
+80,8
@@
public:
unsigned EltSize = (sizeof(T)+Alignment-1)&~Alignment;
return static_cast<T*>(Allocate(Num * EltSize, Alignment));
}
-
-
- void Deallocate(void * /*Ptr*/) {}
+
+ void Deallocate(const void * /*Ptr*/) {}
void PrintStats() const;
};