Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing C++ code from the C header file kv.h #355

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matthew-olson-intel
Copy link

When included in C code, kv.h causes various compiler errors as a result of including a C++ header file and using namespace and class names that won't compile with a C compiler. This patch uses a similar approach to another one that fixed the same issue in iga.h, as well as removes the function kv_get_swsb_info if the compiler is not C++.

This should enable C++ code to continue using the header as if nothing happened, while also allowing C code to use the header without errors.

This fixes #354.

When included in C code, kv.h causes various compiler errors as a result of
including a C++ header file and using namespace and class names that won't
compile with a C compiler. This patch uses a similar approach to another one
that fixed the same issue in `iga.h`, as well as removes the function
`kv_get_swsb_info` if the compiler is not C++.

This should enable C++ code to continue using the header as if nothing happened,
while also allowing C code to use the header without errors.

Signed-off-by: Ben Olson <[email protected]>
@matthew-olson-intel
Copy link
Author

CI errors seem unrelated to this patch; they're both:

In file included from /workspace/igc/IGC/VectorCompiler/lib/GenXOpts/CMAnalysis/InstructionSimplifyGenX.cpp:24:
In file included from /workspace/igc/IGC/VectorCompiler/include/vc/GenXOpts/GenXOpts.h:15:
/workspace/igc/IGC/VectorCompiler/include/vc/GenXOpts/GenXOptsNewPM.h:48:10: fatal error: 'GenXStatePointerFence.h' file not found
#include "GenXStatePointerFence.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

@igorban-intel
Copy link
Contributor

Please rebase your branch, it was expected that issue was fixed at ac5bbd1.

@matthew-olson-intel
Copy link
Author

Please rebase your branch, it was expected that issue was fixed at ac5bbd1.

Sure, done!

@matthew-olson-intel
Copy link
Author

Looks like the new failures are unrelated too:

CMake Error at IGC/cmake/igc_find_opencl_clang.cmake:95 (message):
  [IGC] : Cannot find opencl-clang tool-chain, please provide sources or
  install it on system.
Call Stack (most recent call first):
  IGC/CMakeLists.txt:1552 (include)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++ Used In IGA Headers
2 participants