@@ -60,7 +60,7 @@ namespace {
6060class NVVMReflect {
6161 // Map from reflect function call arguments to the value to replace the call
6262 // with. Should include __CUDA_FTZ and __CUDA_ARCH values.
63- StringMap<int > ReflectMap;
63+ StringMap<unsigned > ReflectMap;
6464 bool handleReflectFunction (Module &M, StringRef ReflectName);
6565 void populateReflectMap (Module &M);
6666 void foldReflectCall (CallInst *Call, Constant *NewValue);
@@ -83,7 +83,7 @@ class NVVMReflectLegacyPass : public ModulePass {
8383};
8484} // namespace
8585
86- ModulePass *llvm::createNVVMReflectPass (unsigned int SmVersion) {
86+ ModulePass *llvm::createNVVMReflectPass (unsigned SmVersion) {
8787 LLVM_DEBUG (dbgs () << " Creating NVVMReflectPass with SM version " << SmVersion
8888 << " \n " );
8989 return new NVVMReflectLegacyPass (SmVersion);
@@ -123,7 +123,7 @@ void NVVMReflect::populateReflectMap(Module &M) {
123123 if (Val.empty ())
124124 report_fatal_error (" Missing value in nvvm-reflect-add option '" + Option +
125125 " '" );
126- int ValInt;
126+ unsigned ValInt;
127127 if (!to_integer (Val.trim (), ValInt, 10 ))
128128 report_fatal_error (" integer value expected in nvvm-reflect-add option '" +
129129 Option + " '" );
@@ -173,7 +173,7 @@ bool NVVMReflect::handleReflectFunction(Module &M, StringRef ReflectName) {
173173 report_fatal_error (" __nvvm_reflect argument cannot be empty" );
174174 // Now that we have extracted the string argument, we can look it up in the
175175 // ReflectMap
176- int ReflectVal = 0 ; // The default value is 0
176+ unsigned ReflectVal = 0 ; // The default value is 0
177177 if (ReflectMap.contains (ReflectArg))
178178 ReflectVal = ReflectMap[ReflectArg];
179179
0 commit comments