diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /lib/Serialization/ModuleManager.cpp | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'lib/Serialization/ModuleManager.cpp')
-rw-r--r-- | lib/Serialization/ModuleManager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Serialization/ModuleManager.cpp b/lib/Serialization/ModuleManager.cpp index f3d53ad..9c4b3d9 100644 --- a/lib/Serialization/ModuleManager.cpp +++ b/lib/Serialization/ModuleManager.cpp @@ -12,10 +12,10 @@ // //===----------------------------------------------------------------------===// #include "clang/Lex/ModuleMap.h" -#include "clang/Serialization/ModuleManager.h" #include "clang/Serialization/GlobalModuleIndex.h" +#include "clang/Serialization/ModuleManager.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/PathV2.h" +#include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" @@ -62,11 +62,13 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type, // Look for the file entry. This only fails if the expected size or // modification time differ. const FileEntry *Entry; - if (lookupModuleFile(FileName, ExpectedSize, ExpectedModTime, Entry)) + if (lookupModuleFile(FileName, ExpectedSize, ExpectedModTime, Entry)) { + ErrorStr = "module file out of date"; return OutOfDate; + } if (!Entry && FileName != "-") { - ErrorStr = "file not found"; + ErrorStr = "module file not found"; return Missing; } @@ -332,8 +334,7 @@ ModuleManager::visit(bool (*Visitor)(ModuleFile &M, void *UserData), break; // Pop the next module off the stack. - NextModule = State->Stack.back(); - State->Stack.pop_back(); + NextModule = State->Stack.pop_back_val(); } while (true); } |