We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8d15e3 commit 8a4e694Copy full SHA for 8a4e694
Sources/LLVM/IRGlobal.swift
@@ -7,6 +7,14 @@ import cllvm
7
public protocol IRGlobal: IRConstant {}
8
9
extension IRGlobal {
10
+ /// Retrieves the "value type" of this global value.
11
+ ///
12
+ /// The formal type of a global value is always a pointer type. The value
13
+ /// type, in contrast, is the type of the value the global points to.
14
+ public var valueType: IRType {
15
+ return convertType(LLVMGlobalGetValueType(asLLVM()))
16
+ }
17
+
18
/// Retrieves the alignment of this value.
19
public var alignment: Alignment {
20
get { return Alignment(LLVMGetAlignment(asLLVM())) }
0 commit comments