[PATCH] D55616: Emit ASM input in a constant context

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 13 16:11:29 PST 2018


void updated this revision to Diff 178158.
void added a comment.

The `n` constriant *requires* a known integer. Therefore, enforce this in both
Sema and CodeGen by setting the "requires immediate" flag and evaluating to a
known integer instead of random "int"..

This doesn't so much address `i`, which has other semantics. However, it
shouldn't regress how the `i` constraint is currently used.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55616

Files:
  lib/Basic/TargetInfo.cpp
  lib/CodeGen/CGStmt.cpp
  lib/Sema/SemaStmtAsm.cpp
  test/CodeGen/builtin-constant-p.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55616.178158.patch
Type: text/x-patch
Size: 6913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181214/170c9a13/attachment-0001.bin>


More information about the cfe-commits mailing list