Skip to content

Commit fd31b57

Browse files
committed
[llvm-c] Guard include llvm-config in C-API header
1 parent 4d2288d commit fd31b57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/include/llvm-c/Visibility.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
#ifndef LLVM_C_VISIBILITY_H
1717
#define LLVM_C_VISIBILITY_H
1818

19+
#if defined __has_include
20+
#if __has_include("llvm/Config/llvm-config.h")
1921
#include "llvm/Config/llvm-config.h"
22+
#endif
23+
#endif
2024

2125
/// LLVM_C_ABI is the export/visibility macro used to mark symbols declared in
2226
/// llvm-c as exported when built as a shared library.

0 commit comments

Comments
 (0)