diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-02-06 21:54:05 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-02-06 21:54:05 +0000 |
commit | 0458fb76fd00e8e3e8a5e90fedfad183c44dfe12 (patch) | |
tree | 7b57dee861f4aff79c8c8e51c7bcfa1d8c8b565f /llvm | |
parent | b643ff554616750e2be4e8444cda00a0fd3a0c80 (diff) | |
download | bcm5719-llvm-0458fb76fd00e8e3e8a5e90fedfad183c44dfe12.tar.gz bcm5719-llvm-0458fb76fd00e8e3e8a5e90fedfad183c44dfe12.zip |
Goodbye nasty macro.
llvm-svn: 26019
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineDebugInfo.h | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineDebugInfo.cpp | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineDebugInfo.h b/llvm/include/llvm/CodeGen/MachineDebugInfo.h index a96525eb315..c7fe55a267a 100644 --- a/llvm/include/llvm/CodeGen/MachineDebugInfo.h +++ b/llvm/include/llvm/CodeGen/MachineDebugInfo.h @@ -51,11 +51,9 @@ class StructType; //===----------------------------------------------------------------------===// // Debug info constants. -// Invalid result indicator. -#define DIINVALID (~0U) - enum { LLVMDebugVersion = 1, // Current version of debug information. + DIInvalid = ~0U, // Invalid result indicator. // DebugInfoDesc type identifying tags. // FIXME - Change over with gcc4. diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp index 9cc8cae4ac0..28fc9c306f8 100644 --- a/llvm/lib/CodeGen/MachineDebugInfo.cpp +++ b/llvm/lib/CodeGen/MachineDebugInfo.cpp @@ -175,7 +175,7 @@ static ConstantUInt *getUIntOperand(GlobalVariable *GV, unsigned i) { /// GlobalVariable. unsigned DebugInfoDesc::TagFromGlobal(GlobalVariable *GV) { ConstantUInt *C = getUIntOperand(GV, 0); - return C ? C->getValue() : DIINVALID; + return C ? (unsigned)C->getValue() : (unsigned)DIInvalid; } /// DescFactory - Create an instance of debug info descriptor based on Tag. @@ -416,7 +416,7 @@ public: /// GlobalVariable. unsigned CompileUnitDesc::DebugVersionFromGlobal(GlobalVariable *GV) { ConstantUInt *C = getUIntOperand(GV, 1); - return C ? C->getValue() : DIINVALID; + return C ? (unsigned)C->getValue() : (unsigned)DIInvalid; } /// ApplyToFields - Target the visitor to the fields of the CompileUnitDesc. @@ -684,12 +684,12 @@ bool DIVerifier::Verify(GlobalVariable *GV) { // Get the Tag unsigned Tag = DebugInfoDesc::TagFromGlobal(GV); - if (Tag == DIINVALID) return false; + if (Tag == DIInvalid) return false; // If a compile unit we need the debug version. if (Tag == DI_TAG_compile_unit) { DebugVersion = CompileUnitDesc::DebugVersionFromGlobal(GV); - if (DebugVersion == DIINVALID) return false; + if (DebugVersion == DIInvalid) return false; } // Construct an empty DebugInfoDesc. |