[PATCH] D72829: Implement -fsemantic-interposition

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 03:13:07 PST 2020


serge-sans-paille created this revision.
serge-sans-paille added reviewers: MaskRay, hfinkel.
Herald added subscribers: llvm-commits, cfe-commits, haicheng, hiraditya, eraman.
Herald added projects: clang, LLVM.
serge-sans-paille added a comment.

@MaskRay no example yet, I'd like your opinion on the approach first. It has the advantage of being non intrusive to the code base...


First attempt at implementing -fsemantic-interposition.

Rely on `GlobalValue::isInterposable` that already captures most of the expected behavior.

Rely on a `ModuleFlag` to state whether we should respect SemanticInterposition or not. The default remains no.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72829

Files:
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  llvm/include/llvm/IR/GlobalValue.h
  llvm/include/llvm/IR/Module.h
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/IR/Globals.cpp
  llvm/lib/IR/Module.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72829.238443.patch
Type: text/x-patch
Size: 7369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200116/4397a6b8/attachment.bin>


More information about the llvm-commits mailing list