forked from OSchip/llvm-project
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:
parent
5df10aa540
commit
1e0719ef6f
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue