[NVPTX] Variables that start with llvm. or nvvm. are reserved and should not be emitted

llvm-svn: 211940
This commit is contained in:
Justin Holewinski 2014-06-27 18:35:53 +00:00
parent b926d9d446
commit 73cb5de546
1 changed files with 5 additions and 0 deletions

View File

@ -1351,6 +1351,11 @@ void NVPTXAsmPrinter::printModuleLevelGV(const GlobalVariable *GVar,
return; return;
} }
// Skip LLVM intrinsic global variables
if (GVar->getName().startswith("llvm.") ||
GVar->getName().startswith("nvvm."))
return;
const DataLayout *TD = TM.getDataLayout(); const DataLayout *TD = TM.getDataLayout();
// GlobalVariables are always constant pointers themselves. // GlobalVariables are always constant pointers themselves.