diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
commit | 169d2bd06003c39970bc94c99669a34b61bb7e45 (patch) | |
tree | 06099edc18d30894081a822b756f117cbe0b8207 /lib/TableGen/Main.cpp | |
parent | 0ac5f94c68a3d8fbd1380dbba26d891ea7816b5e (diff) | |
download | FreeBSD-src-169d2bd06003c39970bc94c99669a34b61bb7e45.zip FreeBSD-src-169d2bd06003c39970bc94c99669a34b61bb7e45.tar.gz |
Vendor import of llvm trunk r178860:
http://llvm.org/svn/llvm-project/llvm/trunk@178860
Diffstat (limited to 'lib/TableGen/Main.cpp')
-rw-r--r-- | lib/TableGen/Main.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/TableGen/Main.cpp b/lib/TableGen/Main.cpp index d0ca756..dc4167b 100644 --- a/lib/TableGen/Main.cpp +++ b/lib/TableGen/Main.cpp @@ -64,11 +64,11 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) { return 1; } DepOut.os() << OutputFilename << ":"; - const std::vector<std::string> &Dependencies = Parser.getDependencies(); - for (std::vector<std::string>::const_iterator I = Dependencies.begin(), - E = Dependencies.end(); + const TGLexer::DependenciesMapTy &Dependencies = Parser.getDependencies(); + for (TGLexer::DependenciesMapTy::const_iterator I = Dependencies.begin(), + E = Dependencies.end(); I != E; ++I) { - DepOut.os() << " " << (*I); + DepOut.os() << " " << I->first; } DepOut.os() << "\n"; DepOut.keep(); @@ -117,11 +117,14 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) { if (MainFn(Out.os(), Records)) return 1; + if (ErrorsPrinted > 0) { + errs() << argv0 << ": " << ErrorsPrinted << " errors.\n"; + return 1; + } + // Declare success. Out.keep(); return 0; - - return 1; } } |