Index: llvm/lib/Transforms/Coroutines/CoroEarly.cpp
===================================================================
--- llvm/lib/Transforms/Coroutines/CoroEarly.cpp
+++ llvm/lib/Transforms/Coroutines/CoroEarly.cpp
@@ -8,6 +8,7 @@
 
 #include "llvm/Transforms/Coroutines/CoroEarly.h"
 #include "CoroInternal.h"
+#include "llvm/IR/DIBuilder.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/InstIterator.h"
@@ -116,17 +117,37 @@
     // Create a Noop function that does nothing.
     Function *NoopFn =
         Function::Create(FnTy, GlobalValue::LinkageTypes::PrivateLinkage,
-                         "NoopCoro.ResumeDestroy", &M);
+                         "_NoopCoro_ResumeDestroy", &M);
     NoopFn->setCallingConv(CallingConv::Fast);
     auto *Entry = BasicBlock::Create(C, "entry", NoopFn);
     ReturnInst::Create(C, Entry);
 
+    // Attach debug info to the noop coroutine.
+    DIBuilder DB(M);
+    auto *FileNode = DB.createFile("<llvm-intrinsics>", "");
+    StringRef Producer = "LLVM Version " LLVM_VERSION_STRING;
+    auto *CU =
+        DB.createCompileUnit(dwarf::DW_LANG_Mips_Assembler, FileNode, Producer,
+                             /*IsOptimized=*/false, /*Flags*/ "",
+                             /*RuntimeVersion=*/0);
+    SmallVector<Metadata *, 2> Params{nullptr, nullptr};
+    auto *SubroutineType =
+        DB.createSubroutineType(DB.getOrCreateTypeArray(Params));
+    auto *SP = DB.createFunction(
+        CU, /*Name=*/"_NoopCoro_ResumeDestroy",
+        /*LinkageName=*/"_NoopCoro_ResumeDestroy", /*File*/ FileNode,
+        /*LineNo=*/0, SubroutineType, /*ScopeLine=*/0, DINode::FlagArtificial,
+        DISubprogram::SPFlagDefinition);
+    NoopFn->setSubprogram(SP);
+    DB.finalizeSubprogram(SP);
+    DB.finalize();
+
     // Create a constant struct for the frame.
-    Constant* Values[] = {NoopFn, NoopFn};
-    Constant* NoopCoroConst = ConstantStruct::get(FrameTy, Values);
-    NoopCoro = new GlobalVariable(M, NoopCoroConst->getType(), /*isConstant=*/true,
-                                GlobalVariable::PrivateLinkage, NoopCoroConst,
-                                "NoopCoro.Frame.Const");
+    Constant *Values[] = {NoopFn, NoopFn};
+    Constant *NoopCoroConst = ConstantStruct::get(FrameTy, Values);
+    NoopCoro = new GlobalVariable(
+        M, NoopCoroConst->getType(), /*isConstant=*/true,
+        GlobalVariable::PrivateLinkage, NoopCoroConst, "NoopCoro.Frame.Const");
   }
 
   Builder.SetInsertPoint(II);
Index: llvm/test/Transforms/Coroutines/coro-noop.ll
===================================================================
--- /dev/null
+++ llvm/test/Transforms/Coroutines/coro-noop.ll
@@ -0,0 +1,25 @@
+; Tests that CoroEarly pass correctly lowers coro.noop
+; RUN: opt < %s -S -passes=coro-early | FileCheck %s
+
+; CHECK: %NoopCoro.Frame = type { void (%NoopCoro.Frame*)*, void (%NoopCoro.Frame*)* }
+; CHECK: @NoopCoro.Frame.Const = private constant %NoopCoro.Frame { void (%NoopCoro.Frame*)* @_NoopCoro_ResumeDestroy, void (%NoopCoro.Frame*)* @_NoopCoro_ResumeDestroy }
+
+
+; CHECK-LABEL: @noop(
+define i8* @noop() {
+; CHECK-NEXT: entry
+entry:
+; CHECK-NEXT: ret i8* bitcast (%NoopCoro.Frame* @NoopCoro.Frame.Const to i8*)
+  %n = call i8* @llvm.coro.noop()
+  ret i8* %n
+}
+
+declare i8* @llvm.coro.noop()
+
+
+; CHECK: define private fastcc void @_NoopCoro_ResumeDestroy(%NoopCoro.Frame* %0) !dbg ![[RESUME:[0-9]+]] {
+; CHECK-NEXT: entry
+; CHECK-NEXT:    ret void
+
+; CHECK: ![[RESUME]] = distinct !DISubprogram(name: "_NoopCoro_ResumeDestroy", linkageName: "_NoopCoro_ResumeDestroy"
+
Index: llvm/test/Transforms/Coroutines/coro-resume-destroy.ll
===================================================================
--- llvm/test/Transforms/Coroutines/coro-resume-destroy.ll
+++ llvm/test/Transforms/Coroutines/coro-resume-destroy.ll
@@ -1,10 +1,6 @@
 ; Tests that CoroEarly pass correctly lowers coro.resume, coro.destroy
-; and other intrinsics managed by this pass.
 ; RUN: opt < %s -S -passes=coro-early | FileCheck %s
 
-; CHECK: %NoopCoro.Frame = type { void (%NoopCoro.Frame*)*, void (%NoopCoro.Frame*)* }
-; CHECK: @NoopCoro.Frame.Const = private constant %NoopCoro.Frame { void (%NoopCoro.Frame*)* @NoopCoro.ResumeDestroy, void (%NoopCoro.Frame*)* @NoopCoro.ResumeDestroy }
-
 ; CHECK-LABEL: @callResume(
 define void @callResume(i8* %hdl) {
 ; CHECK-NEXT: entry
@@ -41,20 +37,5 @@
 }
 
 
-; CHECK-LABEL: @noop(
-define i8* @noop() {
-; CHECK-NEXT: entry
-entry:
-; CHECK-NEXT: ret i8* bitcast (%NoopCoro.Frame* @NoopCoro.Frame.Const to i8*)
-  %n = call i8* @llvm.coro.noop()
-  ret i8* %n
-}
-
-; CHECK-LABEL: define private fastcc void @NoopCoro.ResumeDestroy(%NoopCoro.Frame* %0) {
-; CHECK-NEXT: entry
-; CHECK-NEXT:    ret void
-
-
 declare void @llvm.coro.resume(i8*)
 declare void @llvm.coro.destroy(i8*)
-declare i8* @llvm.coro.noop()