[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-11-02 Thread Maksim Levental via cfe-commits
https://github.com/makslevental closed https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Maksim Levental via cfe-commits
@@ -257,14 +256,9 @@ const char *const Runtimes = R"( void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*, long double); void __clang_Interpreter_SetValueNoAlloc(void*,void*,void*,unsigned long long); template -void

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Vassil Vassilev via cfe-commits
@@ -24,6 +24,7 @@ #include "llvm/ExecutionEngine/Orc/LLJIT.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/TargetSelect.h" +#include "llvm/TargetParser/Host.h" vgvassilev wrote: The changes in this file should not be needed.

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Vassil Vassilev via cfe-commits
@@ -148,12 +161,12 @@ TEST(InterpreterTest, UndoCommand) { auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get()); // Fail to undo. - auto Err1 = Interp->Undo(); + auto Err1 = Interp->Undo(2); vgvassilev wrote: Likewise.

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-20 Thread Vassil Vassilev via cfe-commits
@@ -257,14 +256,9 @@ const char *const Runtimes = R"( void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*, long double); void __clang_Interpreter_SetValueNoAlloc(void*,void*,void*,unsigned long long); template -void

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 891cdd5ceea279362c3df221fd4ae73c142b2f7e Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
makslevental wrote: @vgvassilev this seems acceptable? https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 940da2de0fc92e8e0da64fd35ad08effb6093447 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 737bef4f36139f0347e9ab58838e41aadbb45d16 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From f2d35a0f0356d5ea570019bc02558bd5fc143afb Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` ---

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` ---

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Vassil Vassilev via cfe-commits
@@ -275,7 +274,14 @@ Interpreter::create(std::unique_ptr CI) { if (Err) return std::move(Err); - auto PTU = Interp->Parse(Runtimes); + std::string runtimes = ""; + if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) +runtimes += "#include \n";

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
@@ -275,7 +274,14 @@ Interpreter::create(std::unique_ptr CI) { if (Err) return std::move(Err); - auto PTU = Interp->Parse(Runtimes); + std::string runtimes = ""; + if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) +runtimes += "#include \n";

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Vassil Vassilev via cfe-commits
@@ -275,7 +274,14 @@ Interpreter::create(std::unique_ptr CI) { if (Err) return std::move(Err); - auto PTU = Interp->Parse(Runtimes); + std::string runtimes = ""; + if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) +runtimes += "#include \n";

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` ---

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/2] [clang][repl] fix `new` ---

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast makslevental wrote: This was to test (since `` transitively includes ``). https://github.com/llvm/llvm-project/pull/69072 ___

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Vassil Vassilev via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include vgvassilev

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Vassil Vassilev via cfe-commits
@@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast vgvassilev wrote: Why do we need this? https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maksim Levental (makslevental) Changes On Mac M1, if you load something that transitively loads `#include new`, it will fail because ``` In file included from inputs :1: In file included from input_line_22:1: In file included from

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/69072 On Mac M1, if you load something that transitively loads `#include `, it will fail because ``` In file included from <<< inputs >>>:1: In file included from input_line_22:1: In file included from