From 82a9321f5641b76aeb7ba9d6fad5e4b559327fb1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 2 Jul 2008 00:35:47 +0000 Subject: [PATCH] Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree. llvm-svn: 53001 --- llvm/include/llvm/CodeGen/MachineDebugInfoDesc.h | 5 +++-- llvm/lib/CodeGen/MachineDebugInfoDesc.cpp | 8 ++++---- llvm/lib/CodeGen/MachineModuleInfo.cpp | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/CodeGen/MachineDebugInfoDesc.h b/llvm/include/llvm/CodeGen/MachineDebugInfoDesc.h index 50f093d21fa7..55f8767c881d 100644 --- a/llvm/include/llvm/CodeGen/MachineDebugInfoDesc.h +++ b/llvm/include/llvm/CodeGen/MachineDebugInfoDesc.h @@ -14,6 +14,7 @@ #ifndef LLVM_CODEGEN_MACHINEDEBUGINFODESC_H #define LLVM_CODEGEN_MACHINEDEBUGINFODESC_H +#include "llvm/GlobalValue.h" #include "llvm/Support/DataTypes.h" #include #include @@ -67,7 +68,7 @@ public: /// getLinkage - get linkage appropriate for this type of descriptor. /// - virtual unsigned getLinkage() const; + virtual GlobalValue::LinkageTypes getLinkage() const; //===--------------------------------------------------------------------===// // Subclasses should supply the following virtual methods. @@ -111,7 +112,7 @@ public: /// getLinkage - get linkage appropriate for this type of descriptor. /// - virtual unsigned getLinkage() const; + virtual GlobalValue::LinkageTypes getLinkage() const; /// ApplyToFields - Target the visitor to the fields of the AnchorDesc. /// diff --git a/llvm/lib/CodeGen/MachineDebugInfoDesc.cpp b/llvm/lib/CodeGen/MachineDebugInfoDesc.cpp index 3477dd6a89ba..23853862c28f 100644 --- a/llvm/lib/CodeGen/MachineDebugInfoDesc.cpp +++ b/llvm/lib/CodeGen/MachineDebugInfoDesc.cpp @@ -92,8 +92,8 @@ DebugInfoDesc *DebugInfoDesc::DescFactory(unsigned Tag) { } /// getLinkage - get linkage appropriate for this type of descriptor. -unsigned DebugInfoDesc::getLinkage() const { - return (unsigned)GlobalValue::InternalLinkage; +GlobalValue::LinkageTypes DebugInfoDesc::getLinkage() const { + return GlobalValue::InternalLinkage; } /// ApplyToFields - Target the vistor to the fields of the descriptor. @@ -115,8 +115,8 @@ bool AnchorDesc::classof(const DebugInfoDesc *D) { } /// getLinkage - get linkage appropriate for this type of descriptor. -unsigned AnchorDesc::getLinkage() const { - return (unsigned)GlobalValue::LinkOnceLinkage; +GlobalValue::LinkageTypes AnchorDesc::getLinkage() const { + return GlobalValue::LinkOnceLinkage; } /// ApplyToFields - Target the visitor to the fields of the TransUnitDesc. diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 44e4ee36ecd8..473b60554b64 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -587,8 +587,7 @@ GlobalVariable *DISerializer::Serialize(DebugInfoDesc *DD) { // Create the GlobalVariable early to prevent infinite recursion. GlobalVariable *GV = - new GlobalVariable(Ty, true, - (GlobalValue::LinkageTypes)DD->getLinkage(), + new GlobalVariable(Ty, true, DD->getLinkage(), NULL, DD->getDescString(), M); GV->setSection("llvm.metadata");