diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index 212bd97641..23f812c2a6 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -3845,6 +3845,9 @@ Supported Whole Program Optimizations: Code Generation Backend $CODEGENERATIONBACKEND +Supported LLVM/Xcode versions (only available with LLVM Code Generation Backend) + $LLVMVERSIONS + Supported Microcontroller types:$\n $CONTROLLERTYPES$\n This program comes under the GNU General Public Licence For more information read COPYING.v2 @@ -4092,6 +4095,7 @@ A*2CV_Set section threadvar model to **2iD_Return compiler date **2if_Return list of supported FPU instruction sets **2ii_Return list of supported inline assembler modes +L*2il_Return list of supported LLVM/Xcode versions by the LLVM backend **2im_Return list of supported modeswitches **2io_Return list of supported optimizations **2ir_Return list of recognized compiler and RTL features diff --git a/compiler/options.pas b/compiler/options.pas index 75d7f6f255..f027d66b43 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -232,6 +232,7 @@ const FeatureListPlaceholder = '$FEATURELIST'; ModeSwitchListPlaceholder = '$MODESWITCHES'; CodeGenerationBackendPlaceholder = '$CODEGENERATIONBACKEND'; + LLVMVersionPlaceholder = '$LLVMVERSIONS'; procedure SplitLine (var OrigString: TCmdStr; const Placeholder: TCmdStr; out RemainderString: TCmdStr); @@ -730,6 +731,51 @@ const WriteLn(xmloutput,' ',cgbackend2str[cgbackend],''); end; + procedure ListLLVMVersions (OrigString: TCmdStr); +{$ifdef LLVM} + var + llvmversion : tllvmversion; +{$endif LLVM} + begin +{$ifdef LLVM} + SplitLine (OrigString, LLVMVersionPlaceholder, HS3); + for llvmversion:=low(llvmversion) to high(llvmversion) do + begin + hs1:=llvmversionstr[llvmversion]; + if hs1<>'' then + begin + if OrigString = '' then + Comment (V_Normal, hs1) + else + begin + hs:=OrigString; + Replace(hs,LLVMVersionPlaceholder,hs1); + Comment(V_Normal,hs); + end; + end; + end; +{$else LLVM} + Comment (V_Normal, '') +{$endif LLVM} + end; + + procedure ListLLVMVersionsXML; +{$ifdef LLVM} + var + llvmversion : tllvmversion; +{$endif LLVM} + begin +{$ifdef LLVM} + WriteLn(xmloutput,' '); + for llvmversion:=Low(tllvmversion) to High(tllvmversion) do + if llvmversionstr[llvmversion]<>'' then + WriteLn(xmloutput,' '); + WriteLn(xmloutput,' '); +{$endif LLVM} + end; + + + begin if More = '' then begin @@ -761,6 +807,8 @@ begin ListFeatures (S) else if pos(CodeGenerationBackendPlaceholder,s)>0 then ListCodeGenerationBackend (S) + else if pos(LLVMVersionPlaceholder,s)>0 then + ListLLVMVersions (s) else Comment(V_Normal,s); end; @@ -783,6 +831,7 @@ begin ListControllerTypesXML; ListFeaturesXML; ListCodeGenerationBackendXML; + ListLLVMVersionsXML; WriteLn(xmloutput,' '); WriteLn(xmloutput,''); Close(xmloutput); @@ -800,6 +849,9 @@ begin 'c': ListCPUInstructionSets (''); 'f': ListFPUInstructionSets (''); 'i': ListAsmModes (''); +{$ifdef LLVM} + 'l': ListLLVMVersions (''); +{$endif LLVM} 'm': ListModeswitches (''); 'o': ListOptimizations (''); 'r': ListFeatures (''); @@ -2287,7 +2339,7 @@ begin 'i' : begin if (More='') or - (More [1] in ['a', 'b', 'c', 'f', 'i', 'm', 'o', 'r', 't', 'u', 'w', 'x']) then + (More [1] in ['a', 'b', 'c', 'f', 'i', {$ifdef LLVM}'l',{$endif} 'm', 'o', 'r', 't', 'u', 'w', 'x']) then WriteInfo (More) else QuickInfo:=QuickInfo+More;