]> granicus.if.org Git - clang/commitdiff
Driver: Some minor bug fixes.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 13 Mar 2009 17:46:02 +0000 (17:46 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 13 Mar 2009 17:46:02 +0000 (17:46 +0000)
 - 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
lib/Driver/Driver.cpp
lib/Driver/Types.cpp

index 27b5526261f98cb0fb21dd9711c08f81ce9059f8..7b1789f0d8fec821c7022e0cbdf4e1a1e1ba1756 100644 (file)
@@ -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")
index fcfa9adca4a0b57b12968554dcd5278f34f78d06..b48d01c699a0658c3628243b2d2ef29a24d26aa8 100644 (file)
@@ -243,7 +243,7 @@ static unsigned PrintActions1(const ArgList &Args,
   
   os << Action::getClassName(A->getKind()) << ", ";
   if (InputAction *IA = dyn_cast<InputAction>(A)) {    
-    os << IA->getInputArg().getValue(Args) << "\"";
+    os << "\"" << IA->getInputArg().getValue(Args) << "\"";
   } else if (BindArchAction *BIA = dyn_cast<BindArchAction>(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());
 
index 96d76dd4d6067d522e829506b968278b6cb0ad9d..cef5c811b7bc7061c3bff22b75809d54fab0cd8d 100644 (file)
@@ -122,7 +122,7 @@ types::ID types::lookupTypeForTypeSpecifier(const char *Name) {
   for (unsigned i=0; i<numTypes; ++i) {
     types::ID Id = (types::ID) (i + 1);
     if (canTypeBeUserSpecified(Id) && 
-        memcmp(Name, getInfo(Id).Name, N) == 0)
+        memcmp(Name, getInfo(Id).Name, N + 1) == 0)
       return Id;
   }