Make the ptrtoint comparison simplification work if one side is a global.
[oota-llvm.git] / test / LLVMC / HookWithArguments.td
index 0f7c3797cb449825e57f8174de5130dcb29e510a..ba0bbe10d37a7c04f08cdc20c11f7fdcc88cc440 100644 (file)
@@ -1,12 +1,15 @@
 // Check that hooks with arguments work.
-// RUN: tblgen -I $srcroot/include --gen-llvmc %s -o %t
-// RUN: grep {Hook(const char\\* Arg0, const char\\* Arg1, const char\\* Arg2);} %t | count 1
-// RUN: grep "/path" %t | count 1
-// RUN: grep "VARIABLE" %t | count 1
-// RUN: grep "/2path" %t | count 1
+// RUN: tblgen -I %p/../../include --gen-llvmc %s -o %t
+// RUN: FileCheck -input-file %t %s
+// RUN: %compile_cxx -fexceptions -x c++ %t
 
 include "llvm/CompilerDriver/Common.td"
 
+// CHECK: Hook(const char* Arg0, const char* Arg1, const char* Arg2);
+// CHECK: std::getenv("VARIABLE")
+// CHECK: "/2path"
+// CHECK: "/path"
+
 def dummy_tool : Tool<[
 (cmd_line "$CALL(Hook, 'Arg1',   'Arg2', 'Arg3 Arg3Cont')/path arg1 $ENV(VARIABLE)/2path arg2 $INFILE"),
 (in_language "dummy"),