llvm-project/clang
Chris Bieneman 121b2252de AddGlobalAnnotations for function with or without function body.
When AnnotateAttr is on a function, AddGlobalAnnotations is only called
in CodeGenModule::EmitGlobalFunctionDefinition which means AnnotateAttr
on function declaration without function body will be ignored.
The patch will move AddGlobalAnnotations  to
CodeGenModule::SetFunctionAttributes, so with or without function body,
the AnnotateAttr will get code gen for a function.

It'll help case when AnnotateAttr is on external function, and the
AnnotateAttr will be consumed in IR level.

For example, a pass to collect num of uses for functions with
__attribute((annotate("count_use"))) after optimizations,
As long as there's __attribute((annotate("count_use"))), function with
or without function body should be counted.

Reviewed By: aaron.ballman

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

Patch by:  python3kgae (Xiang Li)
2021-10-11 14:50:34 -05:00
..
INPUTS
bindings [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
cmake [CMake] Include llvm-libtool-darwin in Fuchsia toolchain 2021-10-07 16:44:40 -07:00
docs [docs] Mention in release notes that we now support 2^32 alignment 2021-10-11 10:23:15 -07:00
examples Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-10-08 17:43:23 -07:00
include [MS compat] Handle #pragma fenv_access like #pragma STDC FENV_ACCESS (PR50694) 2021-10-11 17:07:26 +02:00
lib AddGlobalAnnotations for function with or without function body. 2021-10-11 14:50:34 -05:00
runtime Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
test AddGlobalAnnotations for function with or without function body. 2021-10-11 14:50:34 -05:00
tools Move TargetRegistry.(h|cpp) from Support to MC 2021-10-08 14:51:48 -07:00
unittests Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case."" 2021-10-08 17:43:23 -07:00
utils [RISCV] Require tail policy argument to builtins to be an integer constant expression 2021-10-11 09:55:04 -07:00
www PR52073: Fix equivalence computation for lambda-expressions. 2021-10-08 13:54:01 -07:00
.clang-format
.clang-tidy .clang-tidy: Disable misc-no-recursion in general/across the monorepo 2021-06-08 08:31:33 -07:00
.gitignore
CMakeLists.txt [CMake] Fix typo in error message for LLD in bootstrap builds. 2021-10-06 22:38:12 +05:30
CODE_OWNERS.TXT Add myself as a code owner for SYCL support 2021-09-20 09:32:25 +03:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/