r206595 - Add more constness to module-related APIs
Dmitri Gribenko
gribozavr at gmail.com
Fri Apr 18 07:36:52 PDT 2014
Author: gribozavr
Date: Fri Apr 18 09:36:51 2014
New Revision: 206595
URL: http://llvm.org/viewvc/llvm-project?rev=206595&view=rev
Log:
Add more constness to module-related APIs
Modified:
cfe/trunk/include/clang/Basic/Module.h
cfe/trunk/include/clang/Lex/ModuleMap.h
cfe/trunk/lib/Basic/Module.cpp
cfe/trunk/lib/Lex/ModuleMap.cpp
Modified: cfe/trunk/include/clang/Basic/Module.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Module.h?rev=206595&r1=206594&r2=206595&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Module.h (original)
+++ cfe/trunk/include/clang/Basic/Module.h Fri Apr 18 09:36:51 2014
@@ -307,7 +307,7 @@ public:
/// \brief Determine whether this module is a submodule of the given other
/// module.
- bool isSubModuleOf(Module *Other) const;
+ bool isSubModuleOf(const Module *Other) const;
/// \brief Determine whether this module is a part of a framework,
/// either because it is a framework module or because it is a submodule
Modified: cfe/trunk/include/clang/Lex/ModuleMap.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/ModuleMap.h?rev=206595&r1=206594&r2=206595&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/ModuleMap.h (original)
+++ cfe/trunk/include/clang/Lex/ModuleMap.h Fri Apr 18 09:36:51 2014
@@ -258,7 +258,7 @@ public:
/// \brief Determine whether the given header is unavailable as part
/// of the specified module.
bool isHeaderUnavailableInModule(const FileEntry *Header,
- Module *RequestingModule) const;
+ const Module *RequestingModule) const;
/// \brief Retrieve a module with the given name.
///
Modified: cfe/trunk/lib/Basic/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Module.cpp?rev=206595&r1=206594&r2=206595&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Module.cpp (original)
+++ cfe/trunk/lib/Basic/Module.cpp Fri Apr 18 09:36:51 2014
@@ -91,7 +91,7 @@ Module::isAvailable(const LangOptions &L
llvm_unreachable("could not find a reason why module is unavailable");
}
-bool Module::isSubModuleOf(Module *Other) const {
+bool Module::isSubModuleOf(const Module *Other) const {
const Module *This = this;
do {
if (This == Other)
Modified: cfe/trunk/lib/Lex/ModuleMap.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/ModuleMap.cpp?rev=206595&r1=206594&r2=206595&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/ModuleMap.cpp (original)
+++ cfe/trunk/lib/Lex/ModuleMap.cpp Fri Apr 18 09:36:51 2014
@@ -411,8 +411,9 @@ bool ModuleMap::isHeaderInUnavailableMod
return isHeaderUnavailableInModule(Header, 0);
}
-bool ModuleMap::isHeaderUnavailableInModule(const FileEntry *Header,
- Module *RequestingModule) const {
+bool
+ModuleMap::isHeaderUnavailableInModule(const FileEntry *Header,
+ const Module *RequestingModule) const {
HeadersMap::const_iterator Known = Headers.find(Header);
if (Known != Headers.end()) {
for (SmallVectorImpl<KnownHeader>::const_iterator
More information about the cfe-commits
mailing list