Silencing an "enumeral and non-enumeral type in conditional expression" warning;...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 28 Oct 2014 13:12:13 +0000 (13:12 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 28 Oct 2014 13:12:13 +0000 (13:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Mangler.cpp

index c7eb666..5eeb797 100644 (file)
@@ -120,7 +120,8 @@ void Mangler::getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
   const Function *MSFunc = dyn_cast<Function>(GV);
   if (Name.startswith("\01"))
     MSFunc = nullptr; // Don't mangle when \01 is present.
   const Function *MSFunc = dyn_cast<Function>(GV);
   if (Name.startswith("\01"))
     MSFunc = nullptr; // Don't mangle when \01 is present.
-  CallingConv::ID CC = MSFunc ? MSFunc->getCallingConv() : CallingConv::C;
+  CallingConv::ID CC =
+      MSFunc ? MSFunc->getCallingConv() : (unsigned)CallingConv::C;
   if (!DL->hasMicrosoftFastStdCallMangling() &&
       CC != CallingConv::X86_VectorCall)
     MSFunc = nullptr;
   if (!DL->hasMicrosoftFastStdCallMangling() &&
       CC != CallingConv::X86_VectorCall)
     MSFunc = nullptr;