aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/DebugLoc.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h
index 77e8ca5..5052928 100644
--- a/include/llvm/CodeGen/DebugLoc.h
+++ b/include/llvm/CodeGen/DebugLoc.h
@@ -37,17 +37,14 @@ namespace llvm {
public:
DebugLoc() : Idx(~0U) {} // Defaults to invalid.
- static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = 0; return L; }
+ static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = ~0U; return L; }
static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; }
unsigned getIndex() const { return Idx; }
- /// isInvalid - Return true if the DebugLoc is invalid.
- bool isInvalid() const { return Idx == ~0U; }
-
/// isUnknown - Return true if there is no debug info for the SDNode /
/// MachineInstr.
- bool isUnknown() const { return Idx == 0; }
+ bool isUnknown() const { return Idx == ~0U; }
bool operator==(const DebugLoc &DL) const { return Idx == DL.Idx; }
bool operator!=(const DebugLoc &DL) const { return !(*this == DL); }