@@ -640,15 +640,18 @@ llvm::Expected<Expr *> Interpreter::convertExprToValue(Expr *E) {
640
640
using namespace clang ;
641
641
642
642
// Temporary rvalue struct that need special care.
643
- extern " C" void *REPL_EXTERNAL_VISIBILITY __clang_Interpreter_SetValueWithAlloc (
644
- void *This, void *OutVal, void *OpaqueType) {
643
+ extern " C" {
644
+ REPL_EXTERNAL_VISIBILITY void *
645
+ __clang_Interpreter_SetValueWithAlloc (void *This, void *OutVal,
646
+ void *OpaqueType) {
645
647
Value &VRef = *(Value *)OutVal;
646
648
VRef = Value (static_cast <Interpreter *>(This), OpaqueType);
647
649
return VRef.getPtr ();
648
650
}
649
651
650
- extern " C" void REPL_EXTERNAL_VISIBILITY __clang_Interpreter_SetValueNoAlloc (
651
- void *This, void *OutVal, void *OpaqueType, ...) {
652
+ REPL_EXTERNAL_VISIBILITY void
653
+ __clang_Interpreter_SetValueNoAlloc (void *This, void *OutVal, void *OpaqueType,
654
+ ...) {
652
655
Value &VRef = *(Value *)OutVal;
653
656
Interpreter *I = static_cast <Interpreter *>(This);
654
657
VRef = Value (I, OpaqueType);
@@ -723,14 +726,15 @@ extern "C" void REPL_EXTERNAL_VISIBILITY __clang_Interpreter_SetValueNoAlloc(
723
726
}
724
727
va_end (args);
725
728
}
729
+ }
726
730
727
731
// A trampoline to work around the fact that operator placement new cannot
728
732
// really be forward declared due to libc++ and libstdc++ declaration mismatch.
729
733
// FIXME: __clang_Interpreter_NewTag is ODR violation because we get the same
730
734
// definition in the interpreter runtime. We should move it in a runtime header
731
735
// which gets included by the interpreter and here.
732
736
struct __clang_Interpreter_NewTag {};
733
- void *REPL_EXTERNAL_VISIBILITY
737
+ REPL_EXTERNAL_VISIBILITY void *
734
738
operator new (size_t __sz, void *__p, __clang_Interpreter_NewTag) noexcept {
735
739
// Just forward to the standard operator placement new.
736
740
return operator new (__sz, __p);
0 commit comments