summaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index a6a88a2fecb3..7a133b209459 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -987,10 +987,8 @@ void Instruction::updateLocationAfterHoist() { dropLocation(); }
void Instruction::dropLocation() {
const DebugLoc &DL = getDebugLoc();
- if (!DL) {
- setDebugLoc(DebugLoc::getDropped());
+ if (!DL)
return;
- }
// If this isn't a call, drop the location to allow a location from a
// preceding instruction to propagate.
@@ -1002,7 +1000,7 @@ void Instruction::dropLocation() {
}
if (!MayLowerToCall) {
- setDebugLoc(DebugLoc::getDropped());
+ setDebugLoc(DebugLoc());
return;
}
@@ -1021,7 +1019,7 @@ void Instruction::dropLocation() {
//
// One alternative is to set a line 0 location with the existing scope and
// inlinedAt info. The location might be sensitive to when inlining occurs.
- setDebugLoc(DebugLoc::getDropped());
+ setDebugLoc(DebugLoc());
}
//===----------------------------------------------------------------------===//