From: Daniel Dunbar Date: Thu, 19 Mar 2009 17:36:04 +0000 (+0000) Subject: Driver/clang: -mattr strings were not comma separated. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55b3b5f5c6c92f5dbb10dfe96a7de07a2b364338;p=clang Driver/clang: -mattr strings were not comma separated. - Apologies for commits w/o test cases; they are coming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67310 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 7000590654..34538114a5 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -197,9 +197,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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; }