-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[llvm] annotate LLVMCloneModule
for export
#145570
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
Conversation
@llvm/pr-subscribers-llvm-transforms Author: Andrew Rogers (andrurogerz) ChangesPurposeThis patch is one in a series of code-mods that annotate LLVM’s public interface for export. This patch effectively annotates the implementation of BackgroundThis effort is tracked in #109483. Additional context is provided in this discourse, and documentation for ValidationLocal builds and tests to validate cross-platform compatibility. This included llvm, clang, and lldb on the following configurations:
Full diff: https://github.com/llvm/llvm-project/pull/145570.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp
index 55fb0acd39eae..ae6234c1349d6 100644
--- a/llvm/lib/Transforms/Utils/CloneModule.cpp
+++ b/llvm/lib/Transforms/Utils/CloneModule.cpp
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm-c/Core.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Module.h"
#include "llvm/Transforms/Utils/Cloning.h"
|
@compnerd, @vgvassilev another simple one, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this is the right direction. "LLVM C" sits atop of LLVM, providing the C interface to the C++ library. This inverts that by making LLVM C a dependency of LLVM.
Ah, ok. I see what you mean. There are a few places outside of |
cdbf07c
to
914916a
Compare
LLVMCloneModule
for export
914916a
to
c318882
Compare
Purpose
This patch is one in a series of code-mods that annotate LLVM’s public interface for export. This patch annotates the implementation of
LLVMCloneModule
withLLVM_ABI
to match its declaration inllvm-c/Core.h
. The annotation currently has no meaningful impact on the LLVM build; however, it is a prerequisite to support an LLVM Windows DLL (shared library) build.Background
This effort is tracked in #109483. Additional context is provided in this discourse, and documentation for
LLVM_ABI
and related annotations is found in the LLVM repo here.Validation
Local builds and tests to validate cross-platform compatibility. This included llvm, clang, and lldb on the following configurations: