From: Hsiangkai Wang Date: Mon, 6 Aug 2018 04:00:08 +0000 (+0000) Subject: [DebugInfo] Use DbgVariableIntrinsic as the base class of variables. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1bc897a181fe6fabbcc69273d9333f900e7c6752;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338985 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index cc334637a8..d07c160e24 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -128,7 +128,7 @@ static void resolveTopLevelMetadata(llvm::Function *Fn, // they are referencing. for (auto &BB : Fn->getBasicBlockList()) { for (auto &I : BB) { - if (auto *DII = dyn_cast(&I)) { + if (auto *DII = dyn_cast(&I)) { auto *DILocal = DII->getVariable(); if (!DILocal->isResolved()) DILocal->resolve();