diff options
author | Djordje Todorovic <djordje.todorovic@syrmia.com> | 2021-05-14 11:06:46 +0200 |
---|---|---|
committer | Djordje Todorovic <djordje.todorovic@syrmia.com> | 2021-05-14 14:06:13 +0200 |
commit | 01c90bbd4fd12aa86db4a47577addb47e6e84289 (patch) | |
tree | 87d9fe424f20cdba15ae9540c9adb718c6d5469c /llvm/lib/Transforms/Utils/Debugify.cpp | |
parent | 6ec66f681c3763916933057849587a44cfb8e6da (diff) | |
download | llvm-01c90bbd4fd12aa86db4a47577addb47e6e84289.zip llvm-01c90bbd4fd12aa86db4a47577addb47e6e84289.tar.gz llvm-01c90bbd4fd12aa86db4a47577addb47e6e84289.tar.bz2 |
[Transforms][Debugify] Fix "Missing line" false alarm on PHI nodes
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=49959
The "Missing line" false alarm was introduced in D75242.
Patch by Yilong Guo<yilong.guo@intel.com>
Differential Revision: https://reviews.llvm.org/D100446
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Debugify.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp index 413981b..cbea4077 100644 --- a/llvm/lib/Transforms/Utils/Debugify.cpp +++ b/llvm/lib/Transforms/Utils/Debugify.cpp @@ -623,7 +623,7 @@ bool checkDebugifyMetadata(Module &M, // Find missing lines. for (Instruction &I : instructions(F)) { - if (isa<DbgValueInst>(&I) || isa<PHINode>(&I)) + if (isa<DbgValueInst>(&I)) continue; auto DL = I.getDebugLoc(); @@ -632,7 +632,7 @@ bool checkDebugifyMetadata(Module &M, continue; } - if (!DL) { + if (!isa<PHINode>(&I) && !DL) { dbg() << "WARNING: Instruction with empty DebugLoc in function "; dbg() << F.getName() << " --"; I.print(dbg()); |