@@ -27,11 +27,24 @@ import { highlightIntrinsicsAndDatatypes, initIntrinsicHighlighting, deactivateH
2727import { activate as activateCompletion } from './completionProvider' ;
2828
2929import { registerShowPerformanceGraphCommand } from './showPerformanceGraph' ;
30+ import { registerLlvmMcaCommand } from './llvmMcaAnalyzer' ;
31+
3032
3133export function activate ( context : vscode . ExtensionContext ) {
3234
3335 console . log ( 'Extension "code.simd.info" is now active!' ) ;
3436
37+ const enableLLVM = vscode . workspace . getConfiguration ( 'code.simd.info' ) . get < boolean > ( 'enableLLVM' , false ) ;
38+
39+ vscode . commands . executeCommand ( 'setContext' , 'code.simd.info.enableLLVM' , enableLLVM ) ;
40+
41+ vscode . workspace . onDidChangeConfiguration ( e => {
42+ if ( e . affectsConfiguration ( 'code.simd.info.enableLLVM' ) ) {
43+ const updated = vscode . workspace . getConfiguration ( 'code.simd.info' ) . get < boolean > ( 'enableLLVM' , false ) ;
44+ vscode . commands . executeCommand ( 'setContext' , 'code.simd.info.enableLLVM' , updated ) ;
45+ }
46+ } ) ;
47+
3548 context . subscriptions . push (
3649 vscode . languages . registerCodeLensProvider ( { scheme : 'file' , language : '*' } , new TranslationCodeLensProvider ( ) )
3750 ) ;
@@ -48,6 +61,8 @@ export function activate(context: vscode.ExtensionContext) {
4861 activateCompletion ( context ) ;
4962
5063 registerShowPerformanceGraphCommand ( context ) ;
64+
65+ registerLlvmMcaCommand ( context ) ;
5166}
5267
5368export function deactivate ( ) {
0 commit comments