HsiangKai created this revision. HsiangKai added reviewers: aprantl, probinson, dblaikie. Herald added subscribers: cfe-commits, JDevlieghere.
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. Repository: rC Clang https://reviews.llvm.org/D50226 Files: lib/CodeGen/CGVTables.cpp Index: lib/CodeGen/CGVTables.cpp =================================================================== --- lib/CodeGen/CGVTables.cpp +++ lib/CodeGen/CGVTables.cpp @@ -128,7 +128,7 @@ // 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()) DILocal->resolve();
Index: lib/CodeGen/CGVTables.cpp =================================================================== --- lib/CodeGen/CGVTables.cpp +++ lib/CodeGen/CGVTables.cpp @@ -128,7 +128,7 @@ // 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()) DILocal->resolve();
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits