示例#1
0
 public LLVMMetadataRef CreateSubroutineType(LLVMMetadataRef File, ReadOnlySpan <LLVMMetadataRef> ParameterTypes, LLVMDIFlags Flags)
 {
     fixed(LLVMMetadataRef *pParameterTypes = ParameterTypes)
     {
         return(LLVM.DIBuilderCreateSubroutineType(this, File, (LLVMOpaqueMetadata **)pParameterTypes, (uint)ParameterTypes.Length, Flags));
     }
 }
示例#2
0
        public LLVMMetadataRef CreateTypedef(LLVMMetadataRef Type, ReadOnlySpan <char> Name, LLVMMetadataRef File, uint LineNo, LLVMMetadataRef Scope, uint AlignInBits)
        {
            using var marshaledName = new MarshaledString(Name);
            var nameLength = (uint)marshaledName.Length;

            return(LLVM.DIBuilderCreateTypedef(this, Type, marshaledName, (UIntPtr)nameLength, File, LineNo, Scope, AlignInBits));
        }
示例#3
0
        public LLVMMetadataRef CreateMacro(LLVMMetadataRef ParentMacroFile, uint Line, LLVMDWARFMacinfoRecordType RecordType, ReadOnlySpan <char> Name, ReadOnlySpan <char> Value)
        {
            using var marshaledName  = new MarshaledString(Name);
            using var marshaledValue = new MarshaledString(Value);
            var nameLength  = (uint)marshaledName.Length;
            var valueLength = (uint)marshaledValue.Length;

            return(LLVM.DIBuilderCreateMacro(this, ParentMacroFile, Line, RecordType, marshaledName, (UIntPtr)nameLength, marshaledValue, (UIntPtr)valueLength));
        }
示例#4
0
        public LLVMMetadataRef CreateFunction(LLVMMetadataRef Scope, ReadOnlySpan <char> Name, ReadOnlySpan <char> LinkageName, LLVMMetadataRef File, uint LineNo, LLVMMetadataRef Type, int IsLocalToUnit, int IsDefinition,
                                              uint ScopeLine, LLVMDIFlags Flags, int IsOptimized)
        {
            using var marshaledName        = new MarshaledString(Name);
            using var marshaledLinkageName = new MarshaledString(LinkageName);
            var methodNameLength  = (uint)marshaledName.Length;
            var linkageNameLength = (uint)marshaledLinkageName.Length;

            return(LLVM.DIBuilderCreateFunction(this, Scope, marshaledName, (UIntPtr)(methodNameLength), marshaledLinkageName, (UIntPtr)(linkageNameLength), File,
                                                LineNo, Type, IsLocalToUnit, IsDefinition, ScopeLine, Flags, IsOptimized));
        }
示例#5
0
        public LLVMMetadataRef CreateModule(LLVMMetadataRef ParentScope, ReadOnlySpan <char> Name, ReadOnlySpan <char> ConfigMacros, ReadOnlySpan <char> IncludePath, ReadOnlySpan <char> SysRoot)
        {
            using var marshaledName         = new MarshaledString(Name);
            using var marshaledConfigMacros = new MarshaledString(ConfigMacros);
            using var marshaledIncludePath  = new MarshaledString(IncludePath);
            using var marshaledSysRoot      = new MarshaledString(SysRoot);
            var nameLength         = (uint)marshaledName.Length;
            var configMacrosLength = (uint)marshaledConfigMacros.Length;
            var includePathLength  = (uint)marshaledIncludePath.Length;
            var sysRootLength      = (uint)marshaledSysRoot.Length;

            return(LLVM.DIBuilderCreateModule(this, ParentScope, marshaledName, (UIntPtr)nameLength, marshaledConfigMacros, (UIntPtr)configMacrosLength, marshaledIncludePath, (UIntPtr)includePathLength, marshaledSysRoot, (UIntPtr)sysRootLength));
        }
示例#6
0
 public LLVMMetadataRef CreateTypedef(LLVMMetadataRef Type, string Name, LLVMMetadataRef File, uint LineNo, LLVMMetadataRef Scope, uint AlignInBits) => CreateTypedef(Type, Name.AsSpan(), File, LineNo, Scope, AlignInBits);
示例#7
0
 public LLVMMetadataRef CreateTempMacroFile(LLVMMetadataRef ParentMacroFile, uint Line, LLVMMetadataRef File) => LLVM.DIBuilderCreateTempMacroFile(this, ParentMacroFile, Line, File);
示例#8
0
 public static void SetSubprogram(LLVMValueRef Function, LLVMMetadataRef Type)
 {
     LLVM.SetSubprogram(Function, Type);
 }
示例#9
0
 public void AddNamedMetadataOperand(string Name, LLVMMetadataRef CompileUnitMetadata) => AddNamedMetadataOperand(Name.AsSpan(), CompileUnitMetadata);
示例#10
0
 public void AddModuleFlag(string FlagName, LLVMModuleFlagBehavior Behavior, LLVMMetadataRef ValAsMetadataRef) => AddModuleFlag(FlagName.AsSpan(), Behavior, ValAsMetadataRef);
示例#11
0
 public LLVMMetadataRef CreateMacro(LLVMMetadataRef ParentMacroFile, uint Line, LLVMDWARFMacinfoRecordType RecordType, string Name, string Value) => CreateMacro(ParentMacroFile, Line, RecordType, Name.AsSpan(), Value.AsSpan());
示例#12
0
 public LLVMMetadataRef CreateFunction(LLVMMetadataRef Scope, string Name, string LinkageName, LLVMMetadataRef File, uint LineNo, LLVMMetadataRef Type, int IsLocalToUnit, int IsDefinition,
                                       uint ScopeLine, LLVMDIFlags Flags, int IsOptimized) => CreateFunction(Scope, Name.AsSpan(), LinkageName.AsSpan(), File, LineNo, Type, IsLocalToUnit, IsDefinition, ScopeLine, Flags, IsOptimized);
示例#13
0
        public LLVMMetadataRef CreateCompileUnit(LLVMDWARFSourceLanguage SourceLanguage, LLVMMetadataRef FileMetadata, ReadOnlySpan <char> Producer, int IsOptimized, ReadOnlySpan <char> Flags, uint RuntimeVersion,
                                                 ReadOnlySpan <char> SplitName, LLVMDWARFEmissionKind DwarfEmissionKind, uint DWOld, int SplitDebugInlining, int DebugInfoForProfiling)
        {
            using var marshaledProducer       = new MarshaledString(Producer);
            using var marshaledFlags          = new MarshaledString(Flags);
            using var marshaledSplitNameFlags = new MarshaledString(SplitName);

            return(LLVM.DIBuilderCreateCompileUnit(this, SourceLanguage, FileMetadata, marshaledProducer, (UIntPtr)marshaledProducer.Length, IsOptimized, marshaledFlags, (UIntPtr)marshaledFlags.Length,
                                                   RuntimeVersion, marshaledSplitNameFlags, (UIntPtr)marshaledSplitNameFlags.Length, DwarfEmissionKind, DWOld, SplitDebugInlining, DebugInfoForProfiling));
        }
示例#14
0
 public LLVMMetadataRef CreateCompileUnit(LLVMDWARFSourceLanguage SourceLanguage, LLVMMetadataRef FileMetadata, string Producer, int IsOptimized, string Flags, uint RuntimeVersion,
                                          string SplitName, LLVMDWARFEmissionKind DwarfEmissionKind, uint DWOld, int SplitDebugInlining, int DebugInfoForProfiling) => CreateCompileUnit(SourceLanguage, FileMetadata, Producer.AsSpan(), IsOptimized, Flags.AsSpan(), RuntimeVersion, SplitName.AsSpan(), DwarfEmissionKind, DWOld, SplitDebugInlining, DebugInfoForProfiling);
示例#15
0
 public LLVMValueRef MetadataAsValue(LLVMMetadataRef MD) => LLVM.MetadataAsValue(this, MD);
示例#16
0
 public LLVMMetadataRef CreateDebugLocation(uint Line, uint Column, LLVMMetadataRef Scope, LLVMMetadataRef InlinedAt) => LLVM.DIBuilderCreateDebugLocation(this, Line, Column, Scope, InlinedAt);
示例#17
0
 public LLVMMetadataRef CreateModule(LLVMMetadataRef ParentScope, string Name, string ConfigMacros, string IncludePath, string SysRoot) => CreateModule(ParentScope, Name.AsSpan(), ConfigMacros.AsSpan(), IncludePath.AsSpan(), SysRoot.AsSpan());
示例#18
0
 public void AddModuleFlag(ReadOnlySpan <char> FlagName, LLVMModuleFlagBehavior Behavior, LLVMMetadataRef ValAsMetadataRef)
 {
     using var marshaledName = new MarshaledString(FlagName);
     LLVM.AddModuleFlag(this, Behavior, marshaledName, (UIntPtr)FlagName.Length, ValAsMetadataRef);
 }
示例#19
0
 public LLVMMetadataRef CreateSubroutineType(LLVMMetadataRef File, LLVMMetadataRef[] ParameterTypes, LLVMDIFlags Flags) => CreateSubroutineType(File, ParameterTypes.AsSpan(), Flags);
示例#20
0
 public void AddNamedMetadataOperand(ReadOnlySpan <char> Name, LLVMMetadataRef CompileUnitMetadata)
 {
     using var marshaledName = new MarshaledString(Name);
     LLVM.AddNamedMetadataOperand(this, marshaledName, LLVM.MetadataAsValue(Context, CompileUnitMetadata));
 }
示例#21
0
 public LLVMValueRef MetadataAsValue(LLVMMetadataRef MD)
 {
     return(LLVM.MetadataAsValue(this, MD));
 }