[llvm] r192378 - Debug Info: In DIBuilder, the context field of subprogram is updated to use

Manman Ren manman.ren at gmail.com
Thu Oct 10 11:48:10 PDT 2013


> +    /// FIXME: this is added for dragonegg. Once we update dragonegg
> +    /// to call resolve function, this will be removed.
> +    DISubprogram createFunction(DIScopeRef Scope, StringRef Name,
> +                                StringRef LinkageName,
> +                                DIFile File, unsigned LineNo,
> +                                DICompositeType Ty, bool isLocalToUnit,
> +                                bool isDefinition,
> +                                unsigned ScopeLine,
> +                                unsigned Flags = 0,
> +                                bool isOptimized = false,
> +                                Function *Fn = 0,
> +                                MDNode *TParam = 0,
> +                                MDNode *Decl = 0);
> +
>      /// createMethod - Create a new descriptor for the specified C++
> method.
>      /// See comments in DISubprogram for descriptions of these fields.
>      /// @param Scope         Function scope.
>
>
> Modified: llvm/trunk/lib/IR/DIBuilder.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=192378&r1=192377&r2=192378&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/IR/DIBuilder.cpp (original)
> +++ llvm/trunk/lib/IR/DIBuilder.cpp Thu Oct 10 13:40:01 2013
> @@ -1041,6 +1041,28 @@ DIVariable DIBuilder::createComplexVaria
>  }
>
>  /// createFunction - Create a new descriptor for the specified function.
> +/// FIXME: this is added for dragonegg. Once we update dragonegg
> +/// to call resolve function, this will be removed.
>

Hi Duncan,

Can you update dragonegg to call resolve function on SP.getContext()?

Thanks,
Manman


> +DISubprogram DIBuilder::createFunction(DIScopeRef Context,
> +                                       StringRef Name,
> +                                       StringRef LinkageName,
> +                                       DIFile File, unsigned LineNo,
> +                                       DICompositeType Ty,
> +                                       bool isLocalToUnit, bool
> isDefinition,
> +                                       unsigned ScopeLine,
> +                                       unsigned Flags, bool isOptimized,
> +                                       Function *Fn,
> +                                       MDNode *TParams,
> +                                       MDNode *Decl) {
> +  // dragonegg does not generate identifier for types, so using an empty
> map
> +  // to resolve the context should be fine.
> +  DITypeIdentifierMap EmptyMap;
> +  return createFunction(Context.resolve(EmptyMap), Name, LinkageName,
> File,
> +                        LineNo, Ty, isLocalToUnit, isDefinition,
> ScopeLine,
> +                        Flags, isOptimized, Fn, TParams, Decl);
> +}
> +
> +/// createFunction - Create a new descriptor for the specified function.
>  DISubprogram DIBuilder::createFunction(DIDescriptor Context,
>                                         StringRef Name,
>                                         StringRef LinkageName,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131010/b9504ac9/attachment.html>


More information about the llvm-commits mailing list