diff options
author | Jim Laskey <jlaskey@mac.com> | 2007-01-26 14:19:17 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2007-01-26 14:19:17 +0000 |
commit | f773e145470ff8e6a4bc4e8eb174edca20c97dac (patch) | |
tree | 1eb7508f2fc1302e4990bebb111c87a881287d2a /llvm/lib | |
parent | 0ad67b0e4314291b7f59336b2525475b5a5ccdd9 (diff) | |
download | bcm5719-llvm-f773e145470ff8e6a4bc4e8eb174edca20c97dac.tar.gz bcm5719-llvm-f773e145470ff8e6a4bc4e8eb174edca20c97dac.zip |
Clarify some constants.
llvm-svn: 33536
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index d3e996ba67d..15386048058 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -878,7 +878,7 @@ public: EmitReference(Label.Tag, Label.Number); } void EmitReference(const char *Tag, unsigned Number) const { - if (TAI->getAddressSize() == 4) + if (TAI->getAddressSize() == sizeof(int32_t)) O << TAI->getData32bitsDirective(); else O << TAI->getData64bitsDirective(); @@ -886,7 +886,7 @@ public: PrintLabelName(Tag, Number); } void EmitReference(const std::string &Name) const { - if (TAI->getAddressSize() == 4) + if (TAI->getAddressSize() == sizeof(int32_t)) O << TAI->getData32bitsDirective(); else O << TAI->getData64bitsDirective(); @@ -1208,7 +1208,7 @@ private: /// void AddType(DIE *Entity, TypeDesc *TyDesc, CompileUnit *Unit) { if (!TyDesc) { - AddBasicType(Entity, Unit, "", DW_ATE_signed, 4); + AddBasicType(Entity, Unit, "", DW_ATE_signed, sizeof(int32_t)); } else { // Check for pre-existence. DIEntry *&Slot = Unit->getDIEntrySlotFor(TyDesc); @@ -1290,7 +1290,8 @@ private: Size = 0; // Construct an anonymous type for index type. - DIE *IndexTy = ConstructBasicType(Unit, "", DW_ATE_signed, 4); + DIE *IndexTy = ConstructBasicType(Unit, "", DW_ATE_signed, + sizeof(int32_t)); // Add subranges to array type. for(unsigned i = 0, N = Elements.size(); i < N; ++i) { |