[cfe-commits] r146413 - in /cfe/trunk: include/clang/Basic/BuiltinsHexagon.def include/clang/Basic/LangOptions.def include/clang/Basic/TargetBuiltins.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/Basic/Targets.cpp lib/C

jverma at codeaurora.org jverma at codeaurora.org
Mon Dec 19 13:02:42 PST 2011


Hi All,

I have made the changes to remove assertions in the Hexagon backend
specific clang driver. Instead of asserting on invalid arch name, it has
been modified to use the default value.

Please find attached the patch file for the fix.

Thanks,
Jyotsna

> On 12 December 2011 13:14, Tony Linthicum <tlinth at codeaurora.org>
wrote:
>> Author: tlinth
>> Date: Mon Dec 12 15:14:55 2011
>> New Revision: 146413
>> URL: http://llvm.org/viewvc/llvm-project?rev=146413&view=rev
>> Log:
>> Hexagon backend support
> Congrats!
>> +static const char *getHexagonTargetCPU(const ArgList &Args)
>> +{
>> +  Arg *A;
>> +  llvm::StringRef WhichHexagon;
>> +
>> +  if ((A = getLastHexagonArchArg (Args))) {
>> +    if ((A->getOption().matches(options::OPT_march_EQ)) ||
>> +        (A->getOption().matches(options::OPT_mcpu_EQ))) {
>> +      WhichHexagon = A->getValue(Args);
>> +      if (WhichHexagon == "v2")
>> +        return "hexagonv2";
>> +      else if (WhichHexagon == "v3")
>> +        return "hexagonv3";
>> +      else if (WhichHexagon == "v4")
>> +        return "hexagonv4";
>> +      else
>> +        assert (0 && "Unknown -march or -mcpu value");
> Assert is not appropriate for verifying users options. Please use
"D.Diag(diag::err_drv_...) << ...".
> Nick







-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111219/0a43b25c/attachment.txt>


More information about the cfe-commits mailing list