[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 27 16:52:05 PST 2019


aheejin accepted this revision.
aheejin added a comment.

This looks a nice improvement! Thank you.



================
Comment at: clang/include/clang/Driver/ToolChain.h:456
   /// getThreadModel() - Which thread model does this target use?
-  virtual std::string getThreadModel(const llvm::opt::ArgList &) const {
-    return "posix";
-  }
+  virtual std::string getThreadModel() const { return "posix"; }
 
----------------
I think now we can delete this overridden method, because the default value for this is "posix". See Dan's [[ https://github.com/llvm/llvm-project/commit/1384ee936e46816f348bc3756704aeaff92e86fe | commit ]].


================
Comment at: clang/lib/Driver/ToolChains/WebAssembly.cpp:135
+          << "-pthread"
+          << "-mno-atomics";
+    if (DriverArgs.hasFlag(options::OPT_mno_bulk_memory,
----------------
This is nicer! Given that the default values for both options were false, we didn't need to care whether a user explicitly gave it or not after all.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp:150
                        ? FSAttr.getValueAsString().str()
                        : TargetFS;
 
----------------
Aha, this is the info.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58742/new/

https://reviews.llvm.org/D58742





More information about the llvm-commits mailing list