<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
+    /// FIXME: this is added for dragonegg. Once we update dragonegg<br>
+    /// to call resolve function, this will be removed.<br>
+    DISubprogram createFunction(DIScopeRef Scope, StringRef Name,<br>
+                                StringRef LinkageName,<br>
+                                DIFile File, unsigned LineNo,<br>
+                                DICompositeType Ty, bool isLocalToUnit,<br>
+                                bool isDefinition,<br>
+                                unsigned ScopeLine,<br>
+                                unsigned Flags = 0,<br>
+                                bool isOptimized = false,<br>
+                                Function *Fn = 0,<br>
+                                MDNode *TParam = 0,<br>
+                                MDNode *Decl = 0);<br>
+<br>
     /// createMethod - Create a new descriptor for the specified C++ method.<br>
     /// See comments in DISubprogram for descriptions of these fields.<br>
     /// @param Scope         Function scope.<br>
<br><br>
Modified: llvm/trunk/lib/IR/DIBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=192378&r1=192377&r2=192378&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=192378&r1=192377&r2=192378&view=diff</a><br>

==============================================================================<br>
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)<br>
+++ llvm/trunk/lib/IR/DIBuilder.cpp Thu Oct 10 13:40:01 2013<br>
@@ -1041,6 +1041,28 @@ DIVariable DIBuilder::createComplexVaria<br>
 }<br>
<br>
 /// createFunction - Create a new descriptor for the specified function.<br>
+/// FIXME: this is added for dragonegg. Once we update dragonegg<br>
+/// to call resolve function, this will be removed.<br></blockquote><div><br></div><div>Hi Duncan,</div><div><br></div><div>Can you update dragonegg to call resolve function on SP.getContext()?</div><div><br></div><div>
Thanks,</div><div>Manman</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+DISubprogram DIBuilder::createFunction(DIScopeRef Context,<br>
+                                       StringRef Name,<br>
+                                       StringRef LinkageName,<br>
+                                       DIFile File, unsigned LineNo,<br>
+                                       DICompositeType Ty,<br>
+                                       bool isLocalToUnit, bool isDefinition,<br>
+                                       unsigned ScopeLine,<br>
+                                       unsigned Flags, bool isOptimized,<br>
+                                       Function *Fn,<br>
+                                       MDNode *TParams,<br>
+                                       MDNode *Decl) {<br>
+  // dragonegg does not generate identifier for types, so using an empty map<br>
+  // to resolve the context should be fine.<br>
+  DITypeIdentifierMap EmptyMap;<br>
+  return createFunction(Context.resolve(EmptyMap), Name, LinkageName, File,<br>
+                        LineNo, Ty, isLocalToUnit, isDefinition, ScopeLine,<br>
+                        Flags, isOptimized, Fn, TParams, Decl);<br>
+}<br>
+<br>
+/// createFunction - Create a new descriptor for the specified function.<br>
 DISubprogram DIBuilder::createFunction(DIDescriptor Context,<br>
                                        StringRef Name,<br>
                                        StringRef LinkageName,<br></blockquote></div></div></div>