summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-11-30 22:11:57 +0000
committerDouglas Gregor <dgregor@apple.com>2012-11-30 22:11:57 +0000
commit4565e487531c7bf6d348dbe9f5529784966fc7ae (patch)
treea5f8b2e873fe6337f779643ef31b1df1461b4812 /lib
parent6c3254316de2d0d554b19702f4b10117ae46b77b (diff)
downloadclang-4565e487531c7bf6d348dbe9f5529784966fc7ae.tar.gz
Rename ModuleBuildPath -> ModuleBuildStack. Thanks, Dmitri!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Frontend/CompilerInstance.cpp12
-rw-r--r--lib/Frontend/DiagnosticRenderer.cpp20
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 150f99578c..d481ebf511 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -859,14 +859,14 @@ static void compileModule(CompilerInstance &ImportingInstance,
/*ShouldOwnClient=*/true,
/*ShouldCloneClient=*/true);
- // Note that this module is part of the module build path, so that we
+ // Note that this module is part of the module build stack, so that we
// can detect cycles in the module graph.
Instance.createFileManager(); // FIXME: Adopt file manager from importer?
Instance.createSourceManager(Instance.getFileManager());
SourceManager &SourceMgr = Instance.getSourceManager();
- SourceMgr.setModuleBuildPath(
- ImportingInstance.getSourceManager().getModuleBuildPath());
- SourceMgr.appendModuleBuildPath(Module->getTopLevelModuleName(),
+ SourceMgr.setModuleBuildStack(
+ ImportingInstance.getSourceManager().getModuleBuildStack());
+ SourceMgr.pushModuleBuildStack(Module->getTopLevelModuleName(),
FullSourceLoc(ImportLoc, ImportingInstance.getSourceManager()));
@@ -947,8 +947,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
// build the module.
// Check whether there is a cycle in the module graph.
- ModuleBuildPath Path = getSourceManager().getModuleBuildPath();
- ModuleBuildPath::iterator Pos = Path.begin(), PosEnd = Path.end();
+ ModuleBuildStack Path = getSourceManager().getModuleBuildStack();
+ ModuleBuildStack::iterator Pos = Path.begin(), PosEnd = Path.end();
for (; Pos != PosEnd; ++Pos) {
if (Pos->first == ModuleName)
break;
diff --git a/lib/Frontend/DiagnosticRenderer.cpp b/lib/Frontend/DiagnosticRenderer.cpp
index 4a332ae82f..c2128878da 100644
--- a/lib/Frontend/DiagnosticRenderer.cpp
+++ b/lib/Frontend/DiagnosticRenderer.cpp
@@ -205,7 +205,7 @@ void DiagnosticRenderer::emitIncludeStack(SourceLocation Loc,
if (IncludeLoc.isValid())
emitIncludeStackRecursively(IncludeLoc, SM);
else {
- emitModuleBuildPath(SM);
+ emitModuleBuildStack(SM);
emitImportStack(Loc, SM);
}
}
@@ -215,7 +215,7 @@ void DiagnosticRenderer::emitIncludeStack(SourceLocation Loc,
void DiagnosticRenderer::emitIncludeStackRecursively(SourceLocation Loc,
const SourceManager &SM) {
if (Loc.isInvalid()) {
- emitModuleBuildPath(SM);
+ emitModuleBuildStack(SM);
return;
}
@@ -244,7 +244,7 @@ void DiagnosticRenderer::emitIncludeStackRecursively(SourceLocation Loc,
void DiagnosticRenderer::emitImportStack(SourceLocation Loc,
const SourceManager &SM) {
if (Loc.isInvalid()) {
- emitModuleBuildPath(SM);
+ emitModuleBuildStack(SM);
return;
}
@@ -275,17 +275,17 @@ void DiagnosticRenderer::emitImportStackRecursively(SourceLocation Loc,
emitImportLocation(Loc, PLoc, ModuleName, SM);
}
-/// \brief Emit the module build path, for cases where a module is (re-)built
+/// \brief Emit the module build stack, for cases where a module is (re-)built
/// on demand.
-void DiagnosticRenderer::emitModuleBuildPath(const SourceManager &SM) {
- ModuleBuildPath Path = SM.getModuleBuildPath();
- for (unsigned I = 0, N = Path.size(); I != N; ++I) {
- const SourceManager &CurSM = Path[I].second.getManager();
- SourceLocation CurLoc = Path[I].second;
+void DiagnosticRenderer::emitModuleBuildStack(const SourceManager &SM) {
+ ModuleBuildStack Stack = SM.getModuleBuildStack();
+ for (unsigned I = 0, N = Stack.size(); I != N; ++I) {
+ const SourceManager &CurSM = Stack[I].second.getManager();
+ SourceLocation CurLoc = Stack[I].second;
emitBuildingModuleLocation(CurLoc,
CurSM.getPresumedLoc(CurLoc,
DiagOpts->ShowPresumedLoc),
- Path[I].first,
+ Stack[I].first,
CurSM);
}
}