瀏覽代碼

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.getDiagnostics().setIgnoreAllWarnings(!opts.OutputWarnings);
   compiler.getLangOpts().HLSLVersion = (unsigned)opts.HLSLVersion;
   compiler.getLangOpts().HLSLVersion = (unsigned)opts.HLSLVersion;
   compiler.getLangOpts().UseMinPrecision = !opts.Enable16BitTypes;
   compiler.getLangOpts().UseMinPrecision = !opts.Enable16BitTypes;
+  compiler.getLangOpts().EnableBackCompatMode = opts.EnableBackCompatMode;
 
 
   PreprocessorOptions &PPOpts = compiler.getPreprocessorOpts();
   PreprocessorOptions &PPOpts = compiler.getPreprocessorOpts();
   if (rewrite != nullptr) {
   if (rewrite != nullptr) {