From 3dbd6c51bcd8a730c3fe58e29d7e0d999a94fa91 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 13 Mar 2009 17:46:02 +0000 Subject: [PATCH] Driver: Some minor bug fixes. - language recognition was recognizing prefixes incorrectly. - -x none wasn't working. - test for "can lipo" was backwords. - missed a '"' in -ccc-print-phases git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Types.def | 2 +- lib/Driver/Driver.cpp | 4 ++-- lib/Driver/Types.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/clang/Driver/Types.def b/include/clang/Driver/Types.def index 27b5526261..7b1789f0d8 100644 --- a/include/clang/Driver/Types.def +++ b/include/clang/Driver/Types.def @@ -74,4 +74,4 @@ TYPE("precompiled-header", PCH, INVALID, "gch", "A") TYPE("object", Object, INVALID, "o", "") TYPE("treelang", Treelang, INVALID, 0, "u") TYPE("image", Image, INVALID, "out", "") -TYPE("nothing", Nothing, INVALID, 0, "") +TYPE("none", Nothing, INVALID, 0, "u") diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index fcfa9adca4..b48d01c699 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -243,7 +243,7 @@ static unsigned PrintActions1(const ArgList &Args, os << Action::getClassName(A->getKind()) << ", "; if (InputAction *IA = dyn_cast(A)) { - os << IA->getInputArg().getValue(Args) << "\""; + os << "\"" << IA->getInputArg().getValue(Args) << "\""; } else if (BindArchAction *BIA = dyn_cast(A)) { os << "\"" << BIA->getArchName() << "\", " << "{" << PrintActions1(Args, *BIA->begin(), Ids) << "}"; @@ -326,7 +326,7 @@ void Driver::BuildUniversalActions(ArgList &Args, ActionList &Actions) { // include the arch, which would also fix // -save-temps. Compatibility wins for now. - if (Archs.size() > 1 && types::canLipoType(Act->getType())) + if (Archs.size() > 1 && !types::canLipoType(Act->getType())) Diag(clang::diag::err_drv_invalid_output_with_multiple_archs) << types::getTypeName(Act->getType()); diff --git a/lib/Driver/Types.cpp b/lib/Driver/Types.cpp index 96d76dd4d6..cef5c811b7 100644 --- a/lib/Driver/Types.cpp +++ b/lib/Driver/Types.cpp @@ -122,7 +122,7 @@ types::ID types::lookupTypeForTypeSpecifier(const char *Name) { for (unsigned i=0; i