25075729f9
...while including HIP main header file, which is inserted now after #indef controlling macro, or after #pragma once, if it's occurred earlier. + Add a couple of unit tests. ToDo: Check backward compatibility on older clang versions.
15 lines
460 B
Plaintext
15 lines
460 B
Plaintext
// RUN: %run_test hipify "%s" "%t" %hipify_args %clang_args
|
|
|
|
// Checks that HIP header file is included after include guard controlling macro,
|
|
// which goes before #pragma once.
|
|
// CHECK: #ifndef HEADERS_TEST_10_H
|
|
// CHECK-NEXT: #include <hip/hip_runtime.h>
|
|
#ifndef HEADERS_TEST_10_H
|
|
// CHECK: #pragma once
|
|
#pragma once
|
|
// CHECK-NOT: #include <hip/hip_runtime.h>
|
|
#define HEADERS_TEST_10_H
|
|
#include <stdio.h>
|
|
static int counter = 0;
|
|
#endif // HEADERS_TEST_10_H
|