From 73cb5de5469a5b78282308186de4682ca0ef1a4d Mon Sep 17 00:00:00 2001 From: Justin Holewinski Date: Fri, 27 Jun 2014 18:35:53 +0000 Subject: [PATCH] [NVPTX] Variables that start with llvm. or nvvm. are reserved and should not be emitted llvm-svn: 211940 --- llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index 34de7bbd8a6a..652a4995569e 100644 --- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1351,6 +1351,11 @@ void NVPTXAsmPrinter::printModuleLevelGV(const GlobalVariable *GVar, return; } + // Skip LLVM intrinsic global variables + if (GVar->getName().startswith("llvm.") || + GVar->getName().startswith("nvvm.")) + return; + const DataLayout *TD = TM.getDataLayout(); // GlobalVariables are always constant pointers themselves.