IRGen: Generate swift_fixLifetime marker as a private stub.

This lets us remove `swift_fixLifetime` as a real runtime entry point. Also, avoid generating the marker at all if the LLVM ARC optimizer won't be run, as in -Onone or -disable-llvm-arc-optimizer mode.
This commit is contained in:
Joe Groff
2015-12-21 17:56:03 -08:00
parent a5ba9e06cd
commit cf87b9d571
7 changed files with 71 additions and 35 deletions

View File

@@ -581,11 +581,6 @@ void swift::swift_deallocObject(HeapObject *object, size_t allocatedSize,
}
}
/// This is a function that is opaque to the optimizer. It is called to ensure
/// that an object is alive at least until that time.
extern "C" void swift_fixLifetime(OpaqueValue *value) {
}
void swift::swift_weakInit(WeakReference *ref, HeapObject *value) {
ref->Value = value;
swift_unownedRetain(value);