summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-13 17:46:02 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-13 17:46:02 +0000
commite2ca3bddde5953de14d11a20c68cc4457b7f3d3c (patch)
tree0ed769b7498c11e888e9b2fb8c318e1898ea69aa
parentcda4d7e19619e136f2b597110b6a52ee9d641862 (diff)
downloadbcm5719-llvm-e2ca3bddde5953de14d11a20c68cc4457b7f3d3c.tar.gz
bcm5719-llvm-e2ca3bddde5953de14d11a20c68cc4457b7f3d3c.zip
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 llvm-svn: 66911
-rw-r--r--clang/include/clang/Driver/Types.def2
-rw-r--r--clang/lib/Driver/Driver.cpp4
-rw-r--r--clang/lib/Driver/Types.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/clang/include/clang/Driver/Types.def b/clang/include/clang/Driver/Types.def
index 27b5526261f..7b1789f0d8f 100644
--- a/clang/include/clang/Driver/Types.def
+++ b/clang/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/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index fcfa9adca4a..b48d01c699a 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -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());
diff --git a/clang/lib/Driver/Types.cpp b/clang/lib/Driver/Types.cpp
index 96d76dd4d60..cef5c811b7b 100644
--- a/clang/lib/Driver/Types.cpp
+++ b/clang/lib/Driver/Types.cpp
@@ -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;
}
OpenPOWER on IntegriCloud