diff options
author | Carlos Alberto Enciso <carlos.alberto.enciso@gmail.com> | 2019-02-08 10:57:26 +0000 |
---|---|---|
committer | Carlos Alberto Enciso <carlos.alberto.enciso@gmail.com> | 2019-02-08 10:57:26 +0000 |
commit | 08dc50f2fb824dbfb909e9a9babb0f5cdbfe69c2 (patch) | |
tree | e18ac2456aac895bbe6faf721a993d21387cafb3 /llvm/lib/Transforms/Utils | |
parent | fc6d29dff939bca7edecf5f7ad98d7fe858683e4 (diff) | |
download | bcm5719-llvm-08dc50f2fb824dbfb909e9a9babb0f5cdbfe69c2.tar.gz bcm5719-llvm-08dc50f2fb824dbfb909e9a9babb0f5cdbfe69c2.zip |
[DWARF] LLVM ERROR: Broken function found, while removing Debug Intrinsics.
Check that when SimplifyCFG is flattening a 'br', all their debug intrinsic instructions are removed, including any dbg.label referencing a label associated with the basic blocks being removed.
Differential Revision: https://reviews.llvm.org/D57444
llvm-svn: 353511
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index d9f6f6b63fd..70812dc2de8 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -2530,13 +2530,13 @@ void llvm::hoistAllInstructionsInto(BasicBlock *DomBlock, Instruction *InsertPt, BasicBlock *BB) { // Since we are moving the instructions out of its basic block, we do not // retain their original debug locations (DILocations) and debug intrinsic - // instructions (dbg.values). + // instructions. // // Doing so would degrade the debugging experience and adversely affect the // accuracy of profiling information. // // Currently, when hoisting the instructions, we take the following actions: - // - Remove their dbg.values. + // - Remove their debug intrinsic instructions. // - Set their debug locations to the values from the insertion point. // // As per PR39141 (comment #8), the more fundamental reason why the dbg.values @@ -2554,7 +2554,7 @@ void llvm::hoistAllInstructionsInto(BasicBlock *DomBlock, Instruction *InsertPt, I->dropUnknownNonDebugMetadata(); if (I->isUsedByMetadata()) dropDebugUsers(*I); - if (isa<DbgVariableIntrinsic>(I)) { + if (isa<DbgInfoIntrinsic>(I)) { // Remove DbgInfo Intrinsics. II = I->eraseFromParent(); continue; |