https://github.com/aytey updated https://github.com/llvm/llvm-project/pull/86727
>From 784dd45324566775439b3c06674ab7d70b292d0b Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" <andrew.te...@vector.com> Date: Tue, 26 Mar 2024 20:10:24 +0000 Subject: [PATCH 1/2] [clang-repl] Add call to 'InitializeAllAsmParsers' Signed-off-by: Andrew V. Teylu <andrew.te...@vector.com> --- clang/tools/clang-repl/ClangRepl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/tools/clang-repl/ClangRepl.cpp b/clang/tools/clang-repl/ClangRepl.cpp index 5bad8145324d06..aecf61b97fc719 100644 --- a/clang/tools/clang-repl/ClangRepl.cpp +++ b/clang/tools/clang-repl/ClangRepl.cpp @@ -152,6 +152,7 @@ int main(int argc, const char **argv) { llvm::InitializeAllTargets(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmPrinters(); + llvm::InitializeAllAsmParsers(); if (OptHostSupportsJit) { auto J = llvm::orc::LLJITBuilder().create(); >From 04e6bbdbcda1173fcfb872bd4bcbb110e9ca5ffc Mon Sep 17 00:00:00 2001 From: "Andrew V. Teylu" <andrew.te...@vector.com> Date: Tue, 26 Mar 2024 20:49:53 +0000 Subject: [PATCH 2/2] [clang-repl] add test for inline asm Signed-off-by: Andrew V. Teylu <andrew.te...@vector.com> --- clang/test/Interpreter/inline-asm.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 clang/test/Interpreter/inline-asm.cpp diff --git a/clang/test/Interpreter/inline-asm.cpp b/clang/test/Interpreter/inline-asm.cpp new file mode 100644 index 00000000000000..f94f14df72f80e --- /dev/null +++ b/clang/test/Interpreter/inline-asm.cpp @@ -0,0 +1,17 @@ +// REQUIRES: host-supports-jit, x86_64-linux +// UNSUPPORTED: system-aix +// +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t +// +// RUN: cat %t/inline-asm.txt | clang-repl -Xcc="-I%t" + +//--- inline-asm.cpp +__asm(".globl _ZSt21ios_base_library_initv"); +int x; + +//--- inline-asm.txt +#include "inline-asm.cpp" +x = 10; +%quit _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits