mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Add SILGlobalAddrInst.
Like GlobalAddrInst, but for SILGlobalVariables. These would become the same instruction when SILGlobalVariable can replace AST-level global references. Swift SVN r10510
This commit is contained in:
@@ -327,6 +327,11 @@ FunctionRefInst::~FunctionRefInst() {
|
||||
Function->RefCount--;
|
||||
}
|
||||
|
||||
SILGlobalAddrInst::SILGlobalAddrInst(SILLocation Loc, SILGlobalVariable *Global)
|
||||
: SILInstruction(ValueKind::SILGlobalAddrInst, Loc,
|
||||
Global->getLoweredType().getAddressType()),
|
||||
Global(Global)
|
||||
{}
|
||||
|
||||
const IntrinsicInfo &BuiltinFunctionRefInst::getIntrinsicInfo() {
|
||||
return getModule().getIntrinsicInfo(Function);
|
||||
|
||||
Reference in New Issue
Block a user