r338985 - [DebugInfo] Use DbgVariableIntrinsic as the base class of variables.

Hsiangkai Wang via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 5 21:00:09 PDT 2018

Author: hsiangkai
Date: Sun Aug  5 21:00:08 2018
New Revision: 338985

URL: http://llvm.org/viewvc/llvm-project?rev=338985&view=rev
[DebugInfo] Use DbgVariableIntrinsic as the base class of variables.

After refactoring DbgInfoIntrinsic class hierarchy, we use
DbgVariableIntrinsic as the base class of variable debug info.

In resolveTopLevelMetadata() in CGVTables.cpp, we only care about
dbg.value, so we try to cast the instructions to DbgVariableIntrinsic
before resolving variables.

Differential Revision: https://reviews.llvm.org/D50226


Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=338985&r1=338984&r2=338985&view=diff
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Sun Aug  5 21:00:08 2018
@@ -128,7 +128,7 @@ static void resolveTopLevelMetadata(llvm
   // they are referencing.
   for (auto &BB : Fn->getBasicBlockList()) {
     for (auto &I : BB) {
-      if (auto *DII = dyn_cast<llvm::DbgInfoIntrinsic>(&I)) {
+      if (auto *DII = dyn_cast<llvm::DbgVariableIntrinsic>(&I)) {
         auto *DILocal = DII->getVariable();
         if (!DILocal->isResolved())

More information about the cfe-commits mailing list