Constify the argument to SourceLocation::getFromPtrEncoding.

This allows SourceLocations to be stored in generic "data" fields
that are typed as "const void *" and are also used to point to
const objects.

Really we should probably be returning a const pointer from
getPtrEncoding as well, but in some places we want to store
SourceLocations in the same generic "data" field as proper
pointers to /mutable/ objects. Oh well.

llvm-svn: 159868
This commit is contained in:
Jordan Rose 2012-07-06 22:00:04 +00:00
parent 5df10aa540
commit 1e0719ef6f
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ public:
/// getFromPtrEncoding - Turn a pointer encoding of a SourceLocation object
/// into a real SourceLocation.
static SourceLocation getFromPtrEncoding(void *Encoding) {
static SourceLocation getFromPtrEncoding(const void *Encoding) {
return getFromRawEncoding((unsigned)(uintptr_t)Encoding);
}