Ejemplo n.º 1
0
 /// <summary>Creates a named module with a root <see cref="DICompileUnit"/> to contain debugging information</summary>
 /// <param name="moduleId">Module name</param>
 /// <param name="context">Context for the module</param>
 /// <param name="language">Language to store in the debugging information</param>
 /// <param name="srcFilePath">path of source file to set for the compilation unit</param>
 /// <param name="producer">Name of the application producing this module</param>
 /// <param name="optimized">Flag to indicate if the module is optimized</param>
 /// <param name="compilationFlags">Additional flags</param>
 /// <param name="runtimeVersion">Runtime version if any (use 0 if the runtime version has no meaning)</param>
 public NativeModule(string moduleId
                     , Context context
                     , SourceLanguage language
                     , string srcFilePath
                     , string producer
                     , bool optimized          = false
                     , string compilationFlags = ""
                     , uint runtimeVersion     = 0
                     )
     : this(moduleId, context)
 {
     DICompileUnit = DIBuilder.CreateCompileUnit(language
                                                 , srcFilePath
                                                 , producer
                                                 , optimized
                                                 , compilationFlags
                                                 , runtimeVersion
                                                 );
 }
Ejemplo n.º 2
0
        /// <summary>Initializes a new instance of the <see cref="BitcodeModule"/> class with a root <see cref="DICompileUnit"/> to contain debugging information</summary>
        /// <param name="context">Context for the module</param>
        /// <param name="moduleId">Module name</param>
        /// <param name="language">Language to store in the debugging information</param>
        /// <param name="srcFilePath">path of source file to set for the compilation unit</param>
        /// <param name="producer">Name of the application producing this module</param>
        /// <param name="optimized">Flag to indicate if the module is optimized</param>
        /// <param name="compilationFlags">Additional flags</param>
        /// <param name="runtimeVersion">Runtime version if any (use 0 if the runtime version has no meaning)</param>
        public BitcodeModule(Context context
                             , string moduleId
                             , SourceLanguage language
                             , string srcFilePath
                             , string producer
                             , bool optimized          = false
                             , string compilationFlags = ""
                             , uint runtimeVersion     = 0
                             )
            : this(context, moduleId)
        {
            DICompileUnit = DIBuilder.CreateCompileUnit(language
                                                        , srcFilePath
                                                        , producer
                                                        , optimized
                                                        , compilationFlags
                                                        , runtimeVersion
                                                        );

            SourceFileName = Path.GetFileName(srcFilePath);
        }