[llvm] r192463 - Fix handling of CHECK-DAG inside of CHECK-LABEL.
Stephen Lin
swlin at post.harvard.edu
Fri Oct 11 11:42:53 PDT 2013
FYI, we discussed this offline and discovered issues that I resolved in
r192477 (which actually just restores things back to an earlier state).
On Fri, Oct 11, 2013 at 9:48 AM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:
> Author: rafael
> Date: Fri Oct 11 11:48:02 2013
> New Revision: 192463
>
> URL: http://llvm.org/viewvc/llvm-project?rev=192463&view=rev
> Log:
> Fix handling of CHECK-DAG inside of CHECK-LABEL.
>
> Added:
> llvm/trunk/test/FileCheck/check-label-dag.txt
> Modified:
> llvm/trunk/utils/FileCheck/FileCheck.cpp
>
> Added: llvm/trunk/test/FileCheck/check-label-dag.txt
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FileCheck/check-label-dag.txt?rev=192463&view=auto
>
> ==============================================================================
> --- llvm/trunk/test/FileCheck/check-label-dag.txt (added)
> +++ llvm/trunk/test/FileCheck/check-label-dag.txt Fri Oct 11 11:48:02 2013
> @@ -0,0 +1,11 @@
> +; RUN: not FileCheck -input-file %s %s 2>&1 | FileCheck
> --check-prefix=ERROR %s
> +
> +bar
> +zed
> +
> +CHECK-LABEL: {{^}}bar
> +CHECK-DAG: {{^}}foo
> +CHECK-LABEL: {{^}}zed
> +
> +ERROR: error: expected string not found in input
> +ERROR-NEXT: CHECK-DAG: {{.....}}foo
>
> Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=192463&r1=192462&r2=192463&view=diff
>
> ==============================================================================
> --- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
> +++ llvm/trunk/utils/FileCheck/FileCheck.cpp Fri Oct 11 11:48:02 2013
> @@ -879,12 +879,10 @@ size_t CheckString::Check(const SourceMg
> size_t LastPos = 0;
> std::vector<const Pattern *> NotStrings;
>
> - if (CheckTy != Check::CheckLabel) {
> - // Match "dag strings" (with mixed "not strings" if any).
> - LastPos = CheckDag(SM, Buffer, NotStrings, VariableTable);
> - if (LastPos == StringRef::npos)
> - return StringRef::npos;
> - }
> + // Match "dag strings" (with mixed "not strings" if any).
> + LastPos = CheckDag(SM, Buffer, NotStrings, VariableTable);
> + if (LastPos == StringRef::npos)
> + return StringRef::npos;
>
> // Match itself from the last position after matching CHECK-DAG.
> StringRef MatchBuffer = Buffer.substr(LastPos);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131011/a054485b/attachment.html>
More information about the llvm-commits
mailing list