[llvm] ac30379 - [IR] Add doc about Function::createWithDefaultAttr. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 16:20:57 PDT 2021
Author: Fangrui Song
Date: 2021-04-21T16:20:50-07:00
New Revision: ac303795a7862ae0e3b50a5d1a9ff4914a141338
URL: https://github.com/llvm/llvm-project/commit/ac303795a7862ae0e3b50a5d1a9ff4914a141338
DIFF: https://github.com/llvm/llvm-project/commit/ac303795a7862ae0e3b50a5d1a9ff4914a141338.diff
LOG: [IR] Add doc about Function::createWithDefaultAttr. NFC
Added:
Modified:
llvm/include/llvm/IR/Function.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h
index 8bc5e12a5bc8..e0094e2afff2 100644
--- a/llvm/include/llvm/IR/Function.h
+++ b/llvm/include/llvm/IR/Function.h
@@ -153,6 +153,11 @@ class Function : public GlobalObject, public ilist_node<Function> {
static Function *Create(FunctionType *Ty, LinkageTypes Linkage,
const Twine &N, Module &M);
+ /// Creates a function with some attributes recorded in llvm.module.flags
+ /// applied.
+ ///
+ /// Use this when synthesizing new functions that need attributes that would
+ /// have been set by command line options.
static Function *createWithDefaultAttr(FunctionType *Ty, LinkageTypes Linkage,
unsigned AddrSpace,
const Twine &N = "",
More information about the llvm-commits
mailing list