]> granicus.if.org Git - clang/commit
Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer*
authorNico Weber <nicolasweber@gmx.de>
Thu, 4 Apr 2019 21:06:41 +0000 (21:06 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 4 Apr 2019 21:06:41 +0000 (21:06 +0000)
commit51ca2d3ac1081b943629550a829f6b4f13467a6b
tree57570637e673f53a4bd0479be643c42d1720c3ae
parentfac080d750560c3997969b05a2b25be940754723
Make SourceManager::createFileID(UnownedTag, ...) take a const llvm::MemoryBuffer*

Requires making the llvm::MemoryBuffer* stored by SourceManager const,
which in turn requires making the accessors for that return const
llvm::MemoryBuffer*s and updating all call sites.

The original motivation for this was to use it and fix the TODO in
CodeGenAction.cpp's ConvertBackendLocation() by using the UnownedTag
version of createFileID, and since llvm::SourceMgr* hands out a const
llvm::MemoryBuffer* this is required. I'm not sure if fixing the TODO
this way actually works, but this seems like a good change on its own
anyways.

No intended behavior change.

Differential Revision: https://reviews.llvm.org/D60247

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357724 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/SourceManager.h
include/clang/Frontend/FrontendOptions.h
lib/Basic/SourceManager.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenAction.cpp
lib/Frontend/PrecompiledPreamble.cpp
lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
lib/StaticAnalyzer/Core/IssueHash.cpp
tools/clang-import-test/clang-import-test.cpp
tools/libclang/CIndex.cpp