r211622 - Simplify optimization-remark.c test following r211610
Alp Toker
alp at nuanti.com
Tue Jun 24 12:23:10 PDT 2014
Author: alp
Date: Tue Jun 24 14:23:10 2014
New Revision: 211622
URL: http://llvm.org/viewvc/llvm-project?rev=211622&view=rev
Log:
Simplify optimization-remark.c test following r211610
With LocTrackingOnly there's no longer a user-facing distinction so the NDEBUG
checks can go away. (Except maybe column info, but -verify only checks line
numbers anyway.)
Also add a RUN line to validate the traditional !LocTrackingOnly case.
Modified:
cfe/trunk/test/Frontend/optimization-remark.c
Modified: cfe/trunk/test/Frontend/optimization-remark.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/optimization-remark.c?rev=211622&r1=211621&r2=211622&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/optimization-remark.c (original)
+++ cfe/trunk/test/Frontend/optimization-remark.c Tue Jun 24 14:23:10 2014
@@ -4,7 +4,7 @@
// optimization level.
// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -verify
-// RUN: %clang_cc1 %s -DNDEBUG -Rpass=inline -emit-llvm-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -gline-tables-only -verify
// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>/dev/null | FileCheck %s
// -Rpass should produce source location annotations, exclusively (just
@@ -26,16 +26,11 @@ float foz(int x, int y) { return x * y;
// twice.
//
int bar(int j) {
-#ifndef NDEBUG
-// expected-remark at +7 {{foz should never be inlined (cost=never)}}
-// expected-remark at +6 {{foz will not be inlined into bar}}
-// expected-remark at +5 {{foz should never be inlined}}
-// expected-remark at +4 {{foz will not be inlined into bar}}
-// expected-remark at +3 {{foo should always be inlined}}
-// expected-remark at +2 {{foo inlined into bar}}
-#endif
+// expected-remark at +6 {{foz should never be inlined (cost=never)}}
+// expected-remark at +5 {{foz will not be inlined into bar}}
+// expected-remark at +4 {{foz should never be inlined}}
+// expected-remark at +3 {{foz will not be inlined into bar}}
+// expected-remark at +2 {{foo should always be inlined}}
+// expected-remark at +1 {{foo inlined into bar}}
return foo(j, j - 2) * foz(j - 2, j);
}
-#ifdef NDEBUG
-// expected-remark at -3 {{foo inlined into bar}}
-#endif
More information about the cfe-commits
mailing list