Skip to content

Commit ac30379

Browse files
committed
[IR] Add doc about Function::createWithDefaultAttr. NFC
1 parent 775a948 commit ac30379

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/IR/Function.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ class Function : public GlobalObject, public ilist_node<Function> {
153153
static Function *Create(FunctionType *Ty, LinkageTypes Linkage,
154154
const Twine &N, Module &M);
155155

156+
/// Creates a function with some attributes recorded in llvm.module.flags
157+
/// applied.
158+
///
159+
/// Use this when synthesizing new functions that need attributes that would
160+
/// have been set by command line options.
156161
static Function *createWithDefaultAttr(FunctionType *Ty, LinkageTypes Linkage,
157162
unsigned AddrSpace,
158163
const Twine &N = "",

0 commit comments

Comments
 (0)