This is an archive of the discontinued LLVM Phabricator instance.

Get rid of CHECK-SAME-NOT in tests.
ClosedPublic

Authored by jlebar on Feb 9 2016, 3:32 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 47385.Feb 9 2016, 3:32 PM
jlebar retitled this revision from to Get rid of CHECK-SAME-NOT in tests..
jlebar updated this object.
jlebar added a reviewer: majnemer.
jlebar added a subscriber: cfe-commits.
jroelofs added inline comments.
test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

While you're here, may as well shorten these three lines to:

// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -debug-info-kind=limited -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NEG

(as long as you also move the one CHECK-NEG-NOT line up before all of the other CHECK lines)

25 ↗(On Diff #47385)

This CHECK-SAME line and all the others are still dead. There's no --check-prefix=CHECK-SAME. This is really fishy.

jlebar added inline comments.Feb 9 2016, 4:04 PM
test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

I don't think that means the same thing? CHECK-NOT: foo checks that "foo" does not appear between the last match (or the beginning of the file, if there was no last match) *and the next match*.

25 ↗(On Diff #47385)

CHECK-SAME means "check on the same line"?

jlebar marked an inline comment as done.Feb 9 2016, 4:05 PM
jlebar added inline comments.
test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

Oh, I see, it's CHECK-NEG-NOT, so there are no other instances of CHECK-NEG, it's fine how you say. I'll change it, sure.

jroelofs added inline comments.Feb 9 2016, 4:07 PM
test/Modules/ModuleDebugInfo.cpp
25 ↗(On Diff #47385)

Ohhh. I've never encountered CHECK-SAME before. Just looked it up. Neat.

jlebar marked 3 inline comments as done.Feb 9 2016, 4:21 PM
jlebar added inline comments.
test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

Actually, if you don't mind, I'd rather do that in a separate patch, in case it breaks something. I'll send you a patch in a sec.

jroelofs accepted this revision.Feb 9 2016, 4:24 PM
jroelofs added a reviewer: jroelofs.

LGTM.

test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

I don't mind.

This revision is now accepted and ready to land.Feb 9 2016, 4:24 PM
jlebar marked 2 inline comments as done.Feb 9 2016, 4:39 PM
jlebar added inline comments.
test/Modules/ModuleDebugInfo.cpp
10 ↗(On Diff #47385)

OK, this is not so simple (or else, perhaps, it's I who is simple). The output is sometimes empty, which makes FileCheck unhappy, and I don't even know what else is going on. I've spent 20 minutes on this now, which I think is a fair penalty for stirring this pot. :) Feel free to send me a review.

This revision was automatically updated to reflect the committed changes.