From 68c91994931c29dfc7a09e7d5a5e4515d13b12bd Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Wed, 24 Apr 2019 23:02:48 +0000 Subject: Recommitting r358783 and r358786 "[MS] Emit S_HEAPALLOCSITE debug info" with fixes for buildbot error (undefined assembler label). Summary: This emits labels around heapallocsite calls and S_HEAPALLOCSITE debug info in codeview. Currently only changes FastISel, so emitting labels still needs to be implemented in SelectionDAG. Reviewers: rnk Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61083 llvm-svn: 359149 --- llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG') diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 30294ae1595..fb607bbf739 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1234,6 +1234,12 @@ bool FastISel::lowerCallTo(CallLoweringInfo &CLI) { if (CLI.NumResultRegs && CLI.CS) updateValueMap(CLI.CS->getInstruction(), CLI.ResultReg, CLI.NumResultRegs); + // Set labels for heapallocsite call. + if (CLI.CS && CLI.CS->getInstruction()->getMetadata("heapallocsite")) { + MDNode *MD = CLI.CS->getInstruction()->getMetadata("heapallocsite"); + MF->addCodeViewHeapAllocSite(CLI.Call, MD); + } + return true; } -- cgit v1.2.3