Skip to content

Commit 2f05f12

Browse files
committed
Remove typos
1 parent 53da6f1 commit 2f05f12

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

Sources/LLVM/BasicBlock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import cllvm
5959
///
6060
/// The first basic block (the entry block) in a `Function` is special:
6161
///
62-
/// - The entry block is immediately executed when the flo wof control enters
62+
/// - The entry block is immediately executed when the flow of control enters
6363
/// its parent function.
6464
/// - The entry block is not allowed to have predecessor basic blocks
6565
/// (i.e. there cannot be any branches to the entry block of a function).

Sources/LLVM/Function.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ import llvmshims
88
/// and provide a way to append to that sequence to build out its body.
99
///
1010
/// A LLVM function definition contains a list of basic blocks, starting with
11-
/// a privileged first block called the "entry block", and proceeding its
12-
/// terminating instruction to zero or more other basic blocks. The path the
11+
/// a privileged first block called the "entry block". After the entry blocks'
12+
/// terminating instruction come zero or more other basic blocks. The path the
1313
/// flow of control can potentially take, from each block to its terminator
14-
/// and back again, forms the "Control Flow Graph" (CFG) for the function.
14+
/// and on to other blocks, forms the "Control Flow Graph" (CFG) for the
15+
/// function. The nodes of the CFG are the basic blocks, and the edges are
16+
/// directed from the terminator instruction of one block to any number of
17+
/// potential target blocks.
1518
///
1619
/// Additional basic blocks may be created and appended to the function at
1720
/// any time.
@@ -27,7 +30,7 @@ import llvmshims
2730
/// let freestanding = BasicBlock(name: "freestanding")
2831
/// fun.append(freestanding)
2932
///
30-
/// A LLVM function always has the type `FunctionType`. This type is used to
33+
/// An LLVM function always has the type `FunctionType`. This type is used to
3134
/// determine the number and kind of parameters to the function as well as its
3235
/// return value, if any. The parameter values, which would normally enter
3336
/// the entry block, are instead attached to the function and are accessible
@@ -54,7 +57,7 @@ import llvmshims
5457
/// Sections
5558
/// ========
5659
///
57-
/// A function may optionally state the section in the object file the function
60+
/// A function may optionally state the section in the object file it
5861
/// should reside in through the use of a metadata attachment. This can be
5962
/// useful to satisfy target-specific data layout constraints, or to provide
6063
/// some hints to optimizers and linkers. LLVMSwift provides a convenience

Tests/LLVMTests/ConstantSpec.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ import FileCheck
44
import Foundation
55

66
class ConstantSpec : XCTestCase {
7-
func foo() {
8-
let mdBuilder = MDBuilder()
9-
let hotAttr = mdBuilder.buildFunctionSectionPrefix(".hot")
10-
11-
let module = Module(name: "Example")
12-
let builder = IRBuilder(module: module)
13-
let fun = builder.addFunction("example",
14-
type: FunctionType(argTypes: [],
15-
returnType: VoidType()))
16-
fun.appendBasicBlock(named: "entry")
17-
let freestanding = BasicBlock(name: "freestanding")
18-
fun.append(freestanding)
19-
fun.addMetadata(hotAttr, kind: .sectionPrefix)
20-
}
217
func testConstants() {
228
XCTAssert(fileCheckOutput(of: .stderr, withPrefixes: ["SIGNEDCONST"]) {
239
// SIGNEDCONST: ; ModuleID = '[[ModuleName:ConstantTest]]'

0 commit comments

Comments
 (0)