| diff --git a/clspv/lib/BitcastUtils.cpp b/clspv/lib/BitcastUtils.cpp |
| index c4599bef..a0b3695b 100644 |
| --- a/clspv/lib/BitcastUtils.cpp |
| +++ b/clspv/lib/BitcastUtils.cpp |
| @@ -384,8 +384,9 @@ void GroupVectorValuesInPair(IRBuilder<> &Builder, |
| |
| for (unsigned i = 0; i < NewValuesSize; i++) { |
| unsigned idx = 2 * i; |
| + SmallVector<unsigned, 4> Indices = {0, 1, 2, 3}; |
| Values[i] = |
| - Builder.CreateShuffleVector(Values[idx], Values[idx + 1], {0, 1, 2, 3}); |
| + Builder.CreateShuffleVector(Values[idx], Values[idx + 1], Indices); |
| } |
| Values.resize(NewValuesSize); |
| } |
| diff --git a/clspv/lib/Compiler.cpp b/clspv/lib/Compiler.cpp |
| index 8808a520..dcb7e59a 100644 |
| --- a/clspv/lib/Compiler.cpp |
| +++ b/clspv/lib/Compiler.cpp |
| @@ -276,7 +276,6 @@ int SetCompilerInstanceOptions( |
| instance.getCodeGenOpts().SimplifyLibCalls = false; |
| instance.getCodeGenOpts().EmitOpenCLArgMetadata = false; |
| instance.getCodeGenOpts().DisableO0ImplyOptNone = true; |
| - instance.getCodeGenOpts().OpaquePointers = OpaquePointers; |
| instance.getDiagnosticOpts().IgnoreWarnings = IgnoreWarnings; |
| |
| instance.getLangOpts().SinglePrecisionConstants = |
| @@ -324,8 +323,9 @@ int SetCompilerInstanceOptions( |
| // We manually include the OpenCL headers below, so this vector is unused. |
| std::vector<std::string> includes; |
| |
| - LangOptions::setLangDefaults(instance.getLangOpts(), clang::Language::OpenCL, |
| - triple, includes, standard); |
| + instance.getInvocation().setLangDefaults( |
| + instance.getLangOpts(), clang::InputKind(clang::Language::OpenCL), triple, |
| + includes, standard); |
| |
| // Override the C99 inline semantics to accommodate for more OpenCL C |
| // programs in the wild. |