diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2022-11-28 21:37:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 21:37:15 +0100 |
commit | 2fa2bbb16a7c2eaa857788d85d9a3aec223508f6 (patch) | |
tree | 3be376b9ede013198365d325b8d2240d5ad8478b /lib/compilers/zigcxx.ts | |
parent | 90e6e4ecfd62962445dbfb232cb877bfc6724602 (diff) | |
download | compiler-explorer-2fa2bbb16a7c2eaa857788d85d9a3aec223508f6.tar.gz compiler-explorer-2fa2bbb16a7c2eaa857788d85d9a3aec223508f6.zip |
refactor: renames the CompilerFilters type (#4346)gh-5117
The type which probably started as a real enum of possible post filtering
options now also includes options used for compilers' invocations.
The type was already split, but the naming was not reflecting this in the other
part of the code.
This changes tries to apply a simple renaming to the type only (corresponding
variables are left as 'filters').
While doing so, some typing error were discovered around the GccDump feature.
A fix for this will follow in a different PR.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'lib/compilers/zigcxx.ts')
-rw-r--r-- | lib/compilers/zigcxx.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/compilers/zigcxx.ts b/lib/compilers/zigcxx.ts index 4225d2503..f608f37c6 100644 --- a/lib/compilers/zigcxx.ts +++ b/lib/compilers/zigcxx.ts @@ -24,7 +24,7 @@ import Semver from 'semver'; -import {CompilerFilters, ParseFilters} from '../../types/features/filters.interfaces'; +import {CompilerOutputOptions, ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces'; import {asSafeVer} from '../utils'; import {ClangCompiler} from './clang'; @@ -43,7 +43,7 @@ export class ZigCXX extends ClangCompiler { Semver.lt(asSafeVer(this.compiler.semver), '0.9.0', true); } - override preProcess(source: string, filters: CompilerFilters): string { + override preProcess(source: string, filters: CompilerOutputOptions): string { if (this.needsForcedBinary) { // note: zig versions > 0.6 don't emit asm, only binary works - https://github.com/ziglang/zig/issues/8153 filters.binary = true; @@ -52,7 +52,11 @@ export class ZigCXX extends ClangCompiler { return super.preProcess(source, filters); } - override optionsForFilter(filters: ParseFilters, outputFilename: string, userOptions?: string[]): string[] { + override optionsForFilter( + filters: ParseFiltersAndOutputOptions, + outputFilename: string, + userOptions?: string[], + ): string[] { if (this.needsForcedBinary) { // note: zig versions > 0.6 don't emit asm, only binary works - https://github.com/ziglang/zig/issues/8153 filters.binary = true; |