// Is accessible from all the threads within the grid and from the host
// through the runtime library (cudaGetSymbolAddress() / cudaGetSymbolSize()
// / cudaMemcpyToSymbol() / cudaMemcpyFromSymbol())."
- if (GV && LangOpts.CUDA) {
+ if (LangOpts.CUDA) {
if (LangOpts.CUDAIsDevice) {
if (Linkage != llvm::GlobalValue::InternalLinkage &&
(D->hasAttr<CUDADeviceAttr>() || D->hasAttr<CUDAConstantAttr>() ||
bool NeedsFramework = false;
Map.addUnresolvedHeader(ActiveModule, std::move(Header), NeedsFramework);
- if (NeedsFramework && ActiveModule)
+ if (NeedsFramework)
Diags.Report(CurrModuleDeclLoc, diag::note_mmap_add_framework_keyword)
<< ActiveModule->getFullModuleName()
<< FixItHint::CreateReplacement(CurrModuleDeclLoc, "framework module");
return true;
// Adjust scalar if desired.
- if (Scalar) {
- if (ScalarCast != CK_NoOp)
- *Scalar = S.ImpCastExprToType(Scalar->get(), VectorEltTy, ScalarCast);
- *Scalar = S.ImpCastExprToType(Scalar->get(), VectorTy, CK_VectorSplat);
- }
+ if (ScalarCast != CK_NoOp)
+ *Scalar = S.ImpCastExprToType(Scalar->get(), VectorEltTy, ScalarCast);
+ *Scalar = S.ImpCastExprToType(Scalar->get(), VectorTy, CK_VectorSplat);
return false;
}