Fix Casting

Use const_cast<> to avoid a cast-away-const error.

llvm-svn: 172564
This commit is contained in:
David Greene 2013-01-15 22:09:49 +00:00
parent 4320e5e114
commit 02b002ac37
1 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ void clang_getExpansionLocation(CXSourceLocation location,
}
if (file)
*file = (void *)SM.getFileEntryForSLocEntry(sloc);
*file = const_cast<FileEntry *>(SM.getFileEntryForSLocEntry(sloc));
if (line)
*line = SM.getExpansionLineNumber(ExpansionLoc);
if (column)
@ -309,7 +309,7 @@ void clang_getSpellingLocation(CXSourceLocation location,
return createNullLocation(file, line, column, offset);
if (file)
*file = (void *)SM.getFileEntryForID(FID);
*file = const_cast<FileEntry *>(SM.getFileEntryForID(FID));
if (line)
*line = SM.getLineNumber(FID, FileOffset);
if (column)