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
diff --git a/lib/CodeGen/MachineDebugInfoDesc.cpp b/lib/CodeGen/MachineDebugInfoDesc.cpp
index 3477dd6..2385386 100644
--- a/lib/CodeGen/MachineDebugInfoDesc.cpp
+++ b/lib/CodeGen/MachineDebugInfoDesc.cpp
@@ -92,8 +92,8 @@
}
/// 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 @@
}
/// 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/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 44e4ee3..473b605 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -587,8 +587,7 @@
// 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");