[SPIR] Remove an assert mandating SPIR for OpenCL sources only.

SPIR target can be used for C/C++ inputs too (i.e. in OpenCL compatible mode for the libs creation).

Patch by Neil Henning!

Review: http://reviews.llvm.org/D19478
llvm-svn: 267561
This commit is contained in:
Anastasia Stulova 2016-04-26 15:14:01 +00:00
parent 9092700683
commit 0937a7d814
1 changed files with 0 additions and 1 deletions

View File

@ -7442,7 +7442,6 @@ public:
/// Emit SPIR specific metadata: OpenCL and SPIR version.
void SPIRTargetCodeGenInfo::emitTargetMD(const Decl *D, llvm::GlobalValue *GV,
CodeGen::CodeGenModule &CGM) const {
assert(CGM.getLangOpts().OpenCL && "SPIR is only for OpenCL");
llvm::LLVMContext &Ctx = CGM.getModule().getContext();
llvm::Type *Int32Ty = llvm::Type::getInt32Ty(Ctx);
llvm::Module &M = CGM.getModule();