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

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 08:14:03 PDT 2016


Author: stulova
Date: Tue Apr 26 10:14:01 2016
New Revision: 267561

URL: http://llvm.org/viewvc/llvm-project?rev=267561&view=rev
Log:
[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


Modified:
    cfe/trunk/lib/CodeGen/TargetInfo.cpp

Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=267561&r1=267560&r2=267561&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Tue Apr 26 10:14:01 2016
@@ -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();




More information about the cfe-commits mailing list