[all-commits] [llvm/llvm-project] 4e799a: [CodeGen] Attach no-builtin attributes to function...

Visoiu Mistrih Francis via All-commits all-commits at lists.llvm.org
Tue Jan 28 13:59:19 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e799ada5860d1029ea89226b9b867302e792251
      https://github.com/llvm/llvm-project/commit/4e799ada5860d1029ea89226b9b867302e792251
  Author: Francis Visoiu Mistrih <francisvm at yahoo.com>
  Date:   2020-01-28 (Tue, 28 Jan 2020)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/test/CodeGenCXX/global-init.cpp

  Log Message:
  -----------
  [CodeGen] Attach no-builtin attributes to function definitions with no Decl

When using -fno-builtin[-<name>], we don't attach the IR attributes to
function definitions with no Decl, like the ones created through
`CreateGlobalInitOrDestructFunction`.

This results in projects using -fno-builtin or -ffreestanding to start
seeing symbols like _memset_pattern16.

The fix changes the behavior to always add the attribute if LangOptions
requests it.

Differential Revision: https://reviews.llvm.org/D73495




More information about the All-commits mailing list