[llvm-commits] [PATCH] Error cannot be reached

Chris Lattner clattner at apple.com
Thu May 12 21:18:06 PDT 2011


On May 12, 2011, at 2:47 PM, Cameron McInally wrote:

> A silly little patch for unreachable code. It's self-explanatory:

How is that unreachable?  OpName != R->getName()

-Chris

> 
> mcinally/llvm> svn diff
> Index: utils/TableGen/CodeGenDAGPatterns.cpp
> ===================================================================
> --- utils/TableGen/CodeGenDAGPatterns.cpp    (revision 131245)
> +++ utils/TableGen/CodeGenDAGPatterns.cpp    (working copy)
> @@ -1732,7 +1732,7 @@
> 
>     // Input argument?
>     TreePatternNode *Res = new TreePatternNode(DI, 1);
> -    if (R->getName() == "node" && !OpName.empty()) {
> +    if (R->getName() == "node") {
>       if (OpName.empty())
>         error("'node' argument requires a name to match with operand
> list");
>       Args.push_back(OpName);
> 
> mcinally/llvm> svn info
> Path: .
> URL: http://llvm.org/svn/llvm-project/llvm/trunk
> Repository Root: http://llvm.org/svn/llvm-project
> Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8
> Revision: 131241
> Node Kind: directory
> Schedule: normal
> Last Changed Author: evancheng
> Last Changed Rev: 131241
> Last Changed Date: 2011-05-12 15:30:01 -0500 (Thu, 12 May 2011)
> 
> Thanks,
> Cameron
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list