[PATCH] D23429: [CUDA] Place GPU binary into .nv_fatbin section and align it by 8.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 10:16:32 PDT 2016
tra marked an inline comment as done.
================
Comment at: lib/CodeGen/CGCUDANV.cpp:62-69
@@ -60,3 +61,10 @@
llvm::ConstantInt::get(SizeTy, 0)};
auto ConstStr = CGM.GetAddrOfConstantCString(Str, Name.c_str());
+ llvm::GlobalVariable *GV =
+ cast<llvm::GlobalVariable>(ConstStr.getPointer());
+ if (!SectionName.empty())
+ GV->setSection(SectionName);
+ if (Alignment)
+ GV->setAlignment(Alignment);
+
return llvm::ConstantExpr::getGetElementPtr(ConstStr.getElementType(),
----------------
Good point. I've reverted argument types to std::string.
https://reviews.llvm.org/D23429
More information about the cfe-commits
mailing list