diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2012-07-06 22:00:04 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2012-07-06 22:00:04 +0000 |
| commit | 1e0719ef6f6809dad229b935f5b8f60ebd73dc21 (patch) | |
| tree | 2bb6b74eaf870f88fab9246e7536a272e2e4f8e6 | |
| parent | 5df10aa54091429270a319a062708f4c7b10bade (diff) | |
| download | bcm5719-llvm-1e0719ef6f6809dad229b935f5b8f60ebd73dc21.tar.gz bcm5719-llvm-1e0719ef6f6809dad229b935f5b8f60ebd73dc21.zip | |
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
| -rw-r--r-- | clang/include/clang/Basic/SourceLocation.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h index 3bac26fbaec..d6bba385633 100644 --- a/clang/include/clang/Basic/SourceLocation.h +++ b/clang/include/clang/Basic/SourceLocation.h @@ -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); } |

