Remove prepending of '$' to module names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonathan D. Turner 2011-07-22 17:25:03 +00:00
Родитель 832d620b4a
Коммит 9461fccd05
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -980,7 +980,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
goto error; goto error;
if (OverrideMainBuffer) { if (OverrideMainBuffer) {
std::string ModName = "$" + PreambleFile; std::string ModName = PreambleFile;
TranslateStoredDiagnostics(Clang->getModuleManager(), ModName, TranslateStoredDiagnostics(Clang->getModuleManager(), ModName,
getSourceManager(), PreambleDiagnostics, getSourceManager(), PreambleDiagnostics,
StoredDiagnostics); StoredDiagnostics);
@ -2293,7 +2293,7 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column,
if (Act->BeginSourceFile(*Clang.get(), Clang->getFrontendOpts().Inputs[0].second, if (Act->BeginSourceFile(*Clang.get(), Clang->getFrontendOpts().Inputs[0].second,
Clang->getFrontendOpts().Inputs[0].first)) { Clang->getFrontendOpts().Inputs[0].first)) {
if (OverrideMainBuffer) { if (OverrideMainBuffer) {
std::string ModName = "$" + PreambleFile; std::string ModName = PreambleFile;
TranslateStoredDiagnostics(Clang->getModuleManager(), ModName, TranslateStoredDiagnostics(Clang->getModuleManager(), ModName,
getSourceManager(), PreambleDiagnostics, getSourceManager(), PreambleDiagnostics,
StoredDiagnostics); StoredDiagnostics);

Просмотреть файл

@ -2643,8 +2643,8 @@ ASTReader::ASTReadResult ASTReader::ReadASTCore(llvm::StringRef FileName,
else else
FirstInSource = &F; FirstInSource = &F;
F.Loaders.push_back(Prev); F.Loaders.push_back(Prev);
// A non-module AST file's module name is $filename.
Modules["$" + FileName.str()] = &F; Modules[FileName.str()] = &F;
// Set the AST file name. // Set the AST file name.
F.FileName = FileName; F.FileName = FileName;