[llvm-commits] CVS: llvm/lib/CodeGen/MachineDebugInfo.cpp
Jim Laskey
jlaskey at apple.com
Thu Nov 30 10:29:38 PST 2006
Changes in directory llvm/lib/CodeGen:
MachineDebugInfo.cpp updated: 1.61 -> 1.62
---
Log message:
better check for version
---
Diffs of the changes: (+14 -2)
MachineDebugInfo.cpp | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.61 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.62
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.61 Thu Nov 30 08:35:45 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp Thu Nov 30 12:29:23 2006
@@ -1390,11 +1390,23 @@
return false;
}
- // Get the Tag
+ // Get the Tag.
unsigned Tag = DebugInfoDesc::TagFromGlobal(GV);
// Check for user defined descriptors.
- if (Tag == DW_TAG_invalid) return true;
+ if (Tag == DW_TAG_invalid) {
+ ValiditySlot = Valid;
+ return true;
+ }
+
+ // Get the Version.
+ unsigned Version = DebugInfoDesc::VersionFromGlobal(GV);
+
+ // Check for version mismatch.
+ if (Version != LLVMDebugVersion) {
+ ValiditySlot = Invalid;
+ return false;
+ }
// Construct an empty DebugInfoDesc.
DebugInfoDesc *DD = DebugInfoDesc::DescFactory(Tag);
More information about the llvm-commits
mailing list