llvm.org GIT mirror llvm / 7d3c316
inalloca: *Really* fix the docs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204890 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 5 years ago
1 changed file(s) with 2 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
33
44 Introduction
55 ============
6
7 .. Warning:: This feature is unstable and not fully implemented.
86
97 The :ref:`inalloca ` attribute is designed to allow
108 taking the address of an aggregate argument that is being passed by
5351 entry:
5452 %base = call i8* @llvm.stacksave()
5553 %memargs = alloca <{ %struct.Foo, %struct.Foo }>
56 %b = getelementptr <{ %struct.Foo, %struct.Foo }>*, i32 1
54 %b = getelementptr <{ %struct.Foo, %struct.Foo }>* %memargs, i32 1
5755 call void @Foo_ctor(%struct.Foo* %b)
5856
5957 ; If a's ctor throws, we must destruct b.
60 %a = getelementptr <{ %struct.Foo, %struct.Foo }>*, i32 0
58 %a = getelementptr <{ %struct.Foo, %struct.Foo }>* %memargs, i32 0
6159 invoke void @Foo_ctor(%struct.Foo* %a)
6260 to label %invoke.cont unwind %invoke.unwind
6361