Revert "Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)"

This reverts commit ece0951924.

This results in lldb failues on linux that I can't readily debug.
Backing out until they can be resolved.
This commit is contained in:
Andrew Trick
2016-07-26 02:50:57 -07:00
parent b65244805a
commit 0ed9ee8dee
74 changed files with 307 additions and 339 deletions

View File

@@ -371,16 +371,23 @@ VarDecl *Module::getDSOHandle() {
if (DSOHandle)
return DSOHandle;
auto unsafeMutableRawPtr = getASTContext().getUnsafeMutableRawPointerDecl();
if (!unsafeMutableRawPtr)
auto unsafeMutablePtr = getASTContext().getUnsafeMutablePointerDecl();
if (!unsafeMutablePtr)
return nullptr;
Type arg;
auto &ctx = getASTContext();
if (auto voidDecl = ctx.getVoidDecl()) {
arg = voidDecl->getDeclaredInterfaceType();
} else {
arg = TupleType::getEmpty(ctx);
}
Type type = BoundGenericType::get(unsafeMutablePtr, Type(), { arg });
auto handleVar = new (ctx) VarDecl(/*IsStatic=*/false, /*IsLet=*/false,
SourceLoc(),
ctx.getIdentifier("__dso_handle"),
unsafeMutableRawPtr->getDeclaredType(),
Files[0]);
type, Files[0]);
handleVar->setImplicit(true);
handleVar->getAttrs().add(
new (ctx) SILGenNameAttr("__dso_handle", /*Implicit=*/true));