Browse Source

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 years ago
parent
commit
92a94dfc34
1 changed files with 1 additions and 0 deletions
  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) {