[PATCH] D72829: Implement -fsemantic-interposition

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 09:51:20 PST 2020


MaskRay added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:488
+  if (Context.getLangOpts().SemanticInterposition &&
+      (Context.getLangOpts().PICLevel && !Context.getLangOpts().PIE))
+    // Require various optimization to respect semantic interposition.
----------------
MaskRay wrote:
> The parentheses can be deleted.
An alternative is to move the PIC/PIE logic to lib/Frontend/CompilerInvocation.cpp

Then we should be able to use `if (Context.getLangOpts().SemanticInterposition)` here


================
Comment at: llvm/test/Transforms/Inline/inline-semantic-interposition.ll:1
+; RUN: opt < %s -inline  -S | FileCheck %s
+
----------------
serge-sans-paille wrote:
> MaskRay wrote:
> > excess space
> > 
> > Add a comment what happened here.
> I'm not sure about the excess space comment, but comment added.
Nit: there are two spaces between -inline and -S.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72829





More information about the llvm-commits mailing list