Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2008-07-02 00:35:47 +00:00
parent 445723bfb0
commit 12432cfc59
3 changed files with 8 additions and 8 deletions

View File

@ -14,6 +14,7 @@
#ifndef LLVM_CODEGEN_MACHINEDEBUGINFODESC_H #ifndef LLVM_CODEGEN_MACHINEDEBUGINFODESC_H
#define LLVM_CODEGEN_MACHINEDEBUGINFODESC_H #define LLVM_CODEGEN_MACHINEDEBUGINFODESC_H
#include "llvm/GlobalValue.h"
#include "llvm/Support/DataTypes.h" #include "llvm/Support/DataTypes.h"
#include <string> #include <string>
#include <vector> #include <vector>
@ -67,7 +68,7 @@ public:
/// getLinkage - get linkage appropriate for this type of descriptor. /// 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. // Subclasses should supply the following virtual methods.
@ -111,7 +112,7 @@ public:
/// getLinkage - get linkage appropriate for this type of descriptor. /// 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. /// ApplyToFields - Target the visitor to the fields of the AnchorDesc.
/// ///

View File

@ -92,8 +92,8 @@ DebugInfoDesc *DebugInfoDesc::DescFactory(unsigned Tag) {
} }
/// getLinkage - get linkage appropriate for this type of descriptor. /// getLinkage - get linkage appropriate for this type of descriptor.
unsigned DebugInfoDesc::getLinkage() const { GlobalValue::LinkageTypes DebugInfoDesc::getLinkage() const {
return (unsigned)GlobalValue::InternalLinkage; return GlobalValue::InternalLinkage;
} }
/// ApplyToFields - Target the vistor to the fields of the descriptor. /// 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. /// getLinkage - get linkage appropriate for this type of descriptor.
unsigned AnchorDesc::getLinkage() const { GlobalValue::LinkageTypes AnchorDesc::getLinkage() const {
return (unsigned)GlobalValue::LinkOnceLinkage; return GlobalValue::LinkOnceLinkage;
} }
/// ApplyToFields - Target the visitor to the fields of the TransUnitDesc. /// ApplyToFields - Target the visitor to the fields of the TransUnitDesc.

View File

@ -587,8 +587,7 @@ GlobalVariable *DISerializer::Serialize(DebugInfoDesc *DD) {
// Create the GlobalVariable early to prevent infinite recursion. // Create the GlobalVariable early to prevent infinite recursion.
GlobalVariable *GV = GlobalVariable *GV =
new GlobalVariable(Ty, true, new GlobalVariable(Ty, true, DD->getLinkage(),
(GlobalValue::LinkageTypes)DD->getLinkage(),
NULL, DD->getDescString(), M); NULL, DD->getDescString(), M);
GV->setSection("llvm.metadata"); GV->setSection("llvm.metadata");