Sorry. I couldn't sleep at night knowing I put these ugly casts into the source tree.
authorBill Wendling <isanbard@gmail.com>
Wed, 2 Jul 2008 00:35:47 +0000 (00:35 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 2 Jul 2008 00:35:47 +0000 (00:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53001 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineDebugInfoDesc.h
lib/CodeGen/MachineDebugInfoDesc.cpp
lib/CodeGen/MachineModuleInfo.cpp

index 50f093d21fa7f97d7140288692eabe6967657de4..55f8767c881d189579e8f83d20fee2f906a0a0e2 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef LLVM_CODEGEN_MACHINEDEBUGINFODESC_H
 #define LLVM_CODEGEN_MACHINEDEBUGINFODESC_H
 
+#include "llvm/GlobalValue.h"
 #include "llvm/Support/DataTypes.h"
 #include <string>
 #include <vector>
@@ -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.
   ///
index 3477dd6a89bad32e8c4db259a8f8a1456ff2e2a2..23853862c28fa51c095c89c1eacee2e14b0ea7e1 100644 (file)
@@ -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.
index 44e4ee36ecd8417820daded98fe43692b8febf44..473b60554b641844b03baeaf561a2398794194dc 100644 (file)
@@ -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");