Always pass -fmessage-length using separate arguments.

llvm-svn: 90121
This commit is contained in:
Daniel Dunbar 2009-11-30 08:40:54 +00:00
parent 0429c5ef3a
commit 84bb793718
1 changed files with 2 additions and 2 deletions

View File

@ -867,13 +867,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
}
// Pass -fmessage-length=.
CmdArgs.push_back("-fmessage-length");
if (Arg *A = Args.getLastArg(options::OPT_fmessage_length_EQ)) {
A->render(Args, CmdArgs);
CmdArgs.push_back(A->getValue(Args));
} else {
// If -fmessage-length=N was not specified, determine whether this is a
// terminal and, if so, implicitly define -fmessage-length appropriately.
unsigned N = llvm::sys::Process::StandardErrColumns();
CmdArgs.push_back("-fmessage-length");
CmdArgs.push_back(Args.MakeArgString(llvm::Twine(N)));
}