]> granicus.if.org Git - clang/commitdiff
[SPIR] Remove an assert mandating SPIR for OpenCL sources only.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 26 Apr 2016 15:14:01 +0000 (15:14 +0000)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 26 Apr 2016 15:14:01 +0000 (15:14 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267561 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp

index dcea1a529eeb4c0e361472f450326d8e231836c4..4512f702e7e07e2451ec3d1350e1717036b60bc6 100644 (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();