[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 12 00:10:21 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 90a08fb4b7e79e79121a563ac9cd8138cfedeb3c ca6163e2e4cf1d0a7e3ba60feb28ede52dcd4f8d --extensions cpp -- clang/lib/Interpreter/Wasm.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp
index c12412c26d..6f584fab52 100644
--- a/clang/lib/Interpreter/Wasm.cpp
+++ b/clang/lib/Interpreter/Wasm.cpp
@@ -73,8 +73,9 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) {
}
llvm::TargetOptions TO = llvm::TargetOptions();
- llvm::TargetMachine *TargetMachine = Target->createTargetMachine(
- PTU.TheModule->getTargetTriple().str(), "", "", TO, llvm::Reloc::Model::PIC_);
+ llvm::TargetMachine *TargetMachine =
+ Target->createTargetMachine(PTU.TheModule->getTargetTriple().str(), "",
+ "", TO, llvm::Reloc::Model::PIC_);
PTU.TheModule->setDataLayout(TargetMachine->createDataLayout());
std::string ObjectFileName = PTU.TheModule->getName().str() + ".o";
std::string BinaryFileName = PTU.TheModule->getName().str() + ".wasm";
``````````
</details>
https://github.com/llvm/llvm-project/pull/130909
More information about the cfe-commits
mailing list