Переглянути джерело

Propagate EnableBackCompatMode flag in DxcRewriter (#1542)

Fixes failing RewriterTests

The EnableBackCompatMode flag was not initialized when the compiler
was used via DxcRewriter.

The flag is new and has been introduced shortly after the DxcRewriter
change PR. The tests failures were caused by unfortunate merge timing
of the two changes.
Helena Kotas 7 роки тому
батько
коміт
92a94dfc34
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      tools/clang/tools/libclang/dxcrewriteunused.cpp

+ 1 - 0
tools/clang/tools/libclang/dxcrewriteunused.cpp

@@ -129,6 +129,7 @@ void SetupCompilerForRewrite(CompilerInstance &compiler,
   compiler.getDiagnostics().setIgnoreAllWarnings(!opts.OutputWarnings);
   compiler.getLangOpts().HLSLVersion = (unsigned)opts.HLSLVersion;
   compiler.getLangOpts().UseMinPrecision = !opts.Enable16BitTypes;
+  compiler.getLangOpts().EnableBackCompatMode = opts.EnableBackCompatMode;
 
   PreprocessorOptions &PPOpts = compiler.getPreprocessorOpts();
   if (rewrite != nullptr) {