mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Use the Objective-C runtime to unique selectors in JIT'd code.
When generating IR for the JIT, use sel_registerName() to unique the selector references we generate. Static code doesn't need this pessimization. Fixes <rdar://problem/12764732>. Swift SVN r3403
This commit is contained in:
@@ -143,7 +143,8 @@ void swift::RunImmediately(TranslationUnit *TU) {
|
||||
Options.Triple = llvm::sys::getDefaultTargetTriple();
|
||||
Options.OptLevel = 2;
|
||||
Options.OutputKind = irgen::OutputKind::Module;
|
||||
|
||||
Options.UseJIT = true;
|
||||
|
||||
// IRGen the main module.
|
||||
llvm::LLVMContext LLVMContext;
|
||||
llvm::Module Module(TU->Name.str(), LLVMContext);
|
||||
@@ -299,7 +300,8 @@ void swift::REPL(ASTContext &Context) {
|
||||
Options.Triple = llvm::sys::getDefaultTargetTriple();
|
||||
Options.OptLevel = 0;
|
||||
Options.OutputKind = irgen::OutputKind::Module;
|
||||
|
||||
Options.UseJIT = true;
|
||||
|
||||
EditLineWrapper e;
|
||||
|
||||
char* CurBuffer = const_cast<char*>(Buffer->getBufferStart());
|
||||
|
||||
Reference in New Issue
Block a user