[cfe-commits] r67310 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Thu Mar 19 10:36:04 PDT 2009


Author: ddunbar
Date: Thu Mar 19 12:36:04 2009
New Revision: 67310

URL: http://llvm.org/viewvc/llvm-project?rev=67310&view=rev
Log:
Driver/clang: -mattr strings were not comma separated.
 - Apologies for commits w/o test cases; they are coming.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=67310&r1=67309&r2=67310&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Mar 19 12:36:04 2009
@@ -197,9 +197,13 @@
     std::string Attrs;
     for (unsigned i=0; i < NumFeatureOptions; ++i) {
       if (Args.hasArg(FeatureOptions[i].Pos)) {
+        if (!Attrs.empty())
+          Attrs += ',';
         Attrs += '+';
         Attrs += FeatureOptions[i].Name;
       } else if (Args.hasArg(FeatureOptions[i].Neg)) {
+        if (!Attrs.empty())
+          Attrs += ',';
         Attrs += '-';
         Attrs += FeatureOptions[i].Name;
       }





More information about the cfe-commits mailing list