[clang] Fix build dllexport/dllimport issues when doing a shared build for Windows using GCC (PR #66881)

Brecht Sanders via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 02:52:06 PDT 2023


https://github.com/brechtsanders created https://github.com/llvm/llvm-project/pull/66881

Fix build dllexport/dllimport issues when doing a shared build for Windows using GCC

>From b524ba27418a78a7314af53d36adefb947f2960d Mon Sep 17 00:00:00 2001
From: Brecht Sanders <brecht at sanders.org>
Date: Wed, 20 Sep 2023 11:48:54 +0200
Subject: [PATCH] Update Interpreter.h

Fix build dllexport/dllimport issues when doing a shared build for Windows
---
 clang/include/clang/Interpreter/Interpreter.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/include/clang/Interpreter/Interpreter.h b/clang/include/clang/Interpreter/Interpreter.h
index 43573fb1a4b8915..e8a8745919a33aa 100644
--- a/clang/include/clang/Interpreter/Interpreter.h
+++ b/clang/include/clang/Interpreter/Interpreter.h
@@ -40,7 +40,7 @@ class IncrementalExecutor;
 class IncrementalParser;
 
 /// Create a pre-configured \c CompilerInstance for incremental processing.
-class IncrementalCompilerBuilder {
+class REPL_EXTERNAL_VISIBILITY IncrementalCompilerBuilder {
 public:
   IncrementalCompilerBuilder() {}
 
@@ -73,7 +73,7 @@ class IncrementalCompilerBuilder {
 };
 
 /// Provides top-level interfaces for incremental compilation and execution.
-class Interpreter {
+class REPL_EXTERNAL_VISIBILITY Interpreter {
   std::unique_ptr<llvm::orc::ThreadSafeContext> TSCtx;
   std::unique_ptr<IncrementalParser> IncrParser;
   std::unique_ptr<IncrementalExecutor> IncrExecutor;



More information about the cfe-commits mailing list