aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Malara <antonio.malara@gmail.com>2023-07-09 16:00:22 +0200
committerGitHub <noreply@github.com>2023-07-09 09:00:22 -0500
commit1feaa088b47d609d2787b0a1bdf1f76b0dc5b5f6 (patch)
treee3e680e60d34703a8875867520517218b2fa2879
parentd1bb24820662126d082de765e93d0da8a18541ff (diff)
downloadcompiler-explorer-gh-8087.tar.gz
compiler-explorer-gh-8087.zip
Add LLVMOptPipelineView support for Swift compilers (#5241)gh-8087
This PR adds support for the LLVM optimisation pipeline view pane for the Swift family of compilers.
-rw-r--r--lib/compilers/swift.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compilers/swift.ts b/lib/compilers/swift.ts
index b944dac92..6b4406aeb 100644
--- a/lib/compilers/swift.ts
+++ b/lib/compilers/swift.ts
@@ -26,11 +26,21 @@ import {BaseCompiler} from '../base-compiler.js';
import {SwiftParser} from './argument-parsers.js';
+import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js';
+
export class SwiftCompiler extends BaseCompiler {
static get key() {
return 'swift';
}
+ constructor(info: PreliminaryCompilerInfo, env) {
+ super(info, env);
+ this.compiler.supportsLLVMOptPipelineView = true;
+ this.compiler.llvmOptArg = ['-Xllvm', '-print-after-all', '-Xllvm', '-print-before-all'];
+ this.compiler.llvmOptModuleScopeArg = ['-Xllvm', '-print-module-scope'];
+ this.compiler.llvmOptNoDiscardValueNamesArg = [];
+ }
+
override getSharedLibraryPathsAsArguments() {
return [];
}