[clang] [clang-repl] Move the produced temporary files in wasm in a temp folder. (PR #175508)

Anutosh Bhat via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 12 01:53:51 PST 2026


anutosh491 wrote:

Ahh getting this error while building
```
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:60:26: error: out-of-line definition of 'WasmIncrementalExecutor' does not match any declaration in 'clang::WasmIncrementalExecutor'
   60 | WasmIncrementalExecutor::WasmIncrementalExecutor(llvm::Error &Err) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.h:24:7: note: WasmIncrementalExecutor defined here
   24 | class WasmIncrementalExecutor : public IncrementalExecutor {
      |       ^~~~~~~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:67:26: error: no member named 'createUniqueDirectory' in namespace 'llvm::sys::fs'
   67 |           llvm::sys::fs::createUniqueDirectory("clang-wasm-exec-", TempDir))
      |                          ^~~~~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:67:68: error: use of undeclared identifier 'TempDir'
   67 |           llvm::sys::fs::createUniqueDirectory("clang-wasm-exec-", TempDir))
      |                                                                    ^~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:91:41: error: unknown type name 'TempDir'
   91 |   llvm::SmallString<256> ObjectFileName(TempDir);
      |                                         ^
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:91:40: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
   91 |   llvm::SmallString<256> ObjectFileName(TempDir);
      |                                        ^~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:91:41: note: add a pair of parentheses to declare a variable
   91 |   llvm::SmallString<256> ObjectFileName(TempDir);
      |                                         ^
      |                                         (
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:92:14: error: no member named 'path' in namespace 'llvm::sys'
   92 |   llvm::sys::path::append(ObjectFileName,
      |   ~~~~~~~~~~~^
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:95:41: error: unknown type name 'TempDir'
   95 |   llvm::SmallString<256> BinaryFileName(TempDir);
      |                                         ^
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:95:40: warning: parentheses were disambiguated as a function declaration [-Wvexing-parse]
   95 |   llvm::SmallString<256> BinaryFileName(TempDir);
      |                                        ^~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:95:41: note: add a pair of parentheses to declare a variable
   95 |   llvm::SmallString<256> BinaryFileName(TempDir);
      |                                         ^
      |                                         (
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.cpp:96:14: error: no member named 'path' in namespace 'llvm::sys'
   96 |   llvm::sys::path::append(BinaryFileName,
      |   ~~~~~~~~~~~^
In file included from /Users/anutosh491/work/llvm-project/clang/lib/Interpreter/IncrementalExecutor.cpp:13:
In file included from /Users/anutosh491/work/llvm-project/clang/include/clang/Interpreter/IncrementalExecutor.h:16:
In file included from /Users/anutosh491/work/llvm-project/llvm/include/llvm/Support/CodeGen.h:18:
In file included from /Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/optional:1294:
In file included from /Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/memory:944:
In file included from /Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/inout_ptr.h:16:
In file included from /Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/shared_ptr.h:32:
/Users/anutosh491/work/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/unique_ptr.h:634:30: error: no matching constructor for initialization of 'clang::WasmIncrementalExecutor'
  634 |   return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...));
      |                              ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/IncrementalExecutor.cpp:407:19: note: in instantiation of function template specialization 'std::make_unique<clang::WasmIncrementalExecutor, llvm::Error &>' requested here
  407 |   Executor = std::make_unique<WasmIncrementalExecutor>(Err);
      |                   ^
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.h:24:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'llvm::Error' to 'const WasmIncrementalExecutor' for 1st argument
   24 | class WasmIncrementalExecutor : public IncrementalExecutor {
      |       ^~~~~~~~~~~~~~~~~~~~~~~
/Users/anutosh491/work/llvm-project/clang/lib/Interpreter/Wasm.h:26:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
   26 |   WasmIncrementalExecutor();
      |   ^
1 error generated.
make[3]: *** [tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/IncrementalExecutor.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
2 warnings and 7 errors generated.
make[3]: *** [tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/Wasm.cpp.o] Error 1
make[2]: *** [tools/clang/lib/Interpreter/CMakeFiles/obj.clangInterpreter.dir/all] Error 2
make[1]: *** [tools/clang/lib/Interpreter/CMakeFiles/clangInterpreter.dir/rule] Error 2
make: *** [clangInterpreter] Error 2
emmake: error: 'make clangInterpreter ClangReplInterpreterTests -j8' failed (returned 2)
```

https://github.com/llvm/llvm-project/pull/175508


More information about the cfe-commits mailing list