Merge pull request #319 from emankov/issue_211

[HIPIFY][fix][#211] Algorithm for explicit insert of hip include directive
This commit is contained in:
Evgeny Mankov
2018-01-16 19:47:15 +03:00
committed by GitHub
5 changed files with 80 additions and 13 deletions
@@ -0,0 +1,10 @@
// RUN: %run_test hipify "%s" "%t" %cuda_args
// CHECK: #pragma once
// CHECK-NEXT: #include <hip/hip_runtime.h>
#pragma once
// CHECK-NOT: #include <hip/hip_runtime.h>
int main(int argc, char* argv[]) {
return 0;
}
@@ -0,0 +1,12 @@
// RUN: %run_test hipify "%s" "%t" %cuda_args
// CHECK: #include <hip/hip_runtime.h>
// CHECK-NEXT: #include <stdio.h>
// CHECK-NEXT: #include <iostream>
#include <stdio.h>
#include <iostream>
// CHECK-NOT: #include <hip/hip_runtime.h>
int main(int argc, char* argv[]) {
return 0;
}
@@ -0,0 +1,12 @@
// RUN: %run_test hipify "%s" "%t" %cuda_args
// CHECK: #pragma once
// CHECK-NEXT: #include <hip/hip_runtime.h>
#pragma once
// CHECK-NOT: #include <hip/hip_runtime.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
return 0;
}