================
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM 
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___OVERRIDABLE_FUNCTION
+#define _LIBCPP___OVERRIDABLE_FUNCTION
+
+#include <__config>
+#include <cstdint>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#define _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE                           
                                        \
+  
__attribute__((__section__("__TEXT,__lcxx_override,regular,pure_instructions")))
----------------
rnk wrote:

To port this to ELF, I think you could use 
`__attribute__((section("lcxx_override")))`, and then declare external 
`__start_lcxx_override` and `__stop_lcxx_override` symbols. That should work 
with all the linkers we care about. COFF can probably be done, but I'm sure 
it's more involved and probably not worth doing.

https://github.com/llvm/llvm-project/pull/69498
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to