Example #1
0
 private static void AddModuleFlags(BitcodeModule module)
 {
     module.AddModuleFlag(ModuleFlagBehavior.Warning, BitcodeModule.DwarfVersionValue, 4);
     module.AddModuleFlag(ModuleFlagBehavior.Warning, BitcodeModule.DebugVersionValue, BitcodeModule.DebugMetadataVersion);
     TargetDetails.AddModuleFlags(module);
     module.AddVersionIdentMetadata(VersionIdentString);
 }
Example #2
0
        public void AddModuleFlagTest( )
        {
            using (var context = new Context( ))
                using (var module = new BitcodeModule(context, TestModuleName))
                {
                    module.AddModuleFlag(ModuleFlagBehavior.Warning, BitcodeModule.DwarfVersionValue, 4);
                    module.AddModuleFlag(ModuleFlagBehavior.Warning, BitcodeModule.DebugVersionValue, BitcodeModule.DebugMetadataVersion);
                    module.AddModuleFlag(ModuleFlagBehavior.Error, "wchar_size", 4);
                    module.AddModuleFlag(ModuleFlagBehavior.Error, "min_enum_size", 4);
                    module.AddVersionIdentMetadata("unit-tests 1.0");

                    // currently no exposed means to get module level flags...
                    // so at this point as long as adding the flags doesn't throw an exception
                    // assume things are OK.
                }
        }
Example #3
0
 public void AddModuleFlags(BitcodeModule module)
 {
     module.AddModuleFlag(ModuleFlagBehavior.Error, "PIC Level", 2);
 }
 public void AddModuleFlags(BitcodeModule module)
 {
     // Specify ABI const sizes so linker can detect mismatches
     module.AddModuleFlag(ModuleFlagBehavior.Error, "wchar_size", 4);
     module.AddModuleFlag(ModuleFlagBehavior.Error, "min_enum_size", 4);
 }