[all-commits] [llvm/llvm-project] 64788d: [clang] Include missing LangOpts in `getModuleHash`.

Michael Spencer via All-commits all-commits at lists.llvm.org
Tue Jul 7 16:15:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 64788d7d5377345af5e3080d26cb6a76c324ab5b
      https://github.com/llvm/llvm-project/commit/64788d7d5377345af5e3080d26cb6a76c324ab5b
  Author: Michael Spencer <bigcheesegs at gmail.com>
  Date:   2020-07-07 (Tue, 07 Jul 2020)

  Changed paths:
    M clang/include/clang/Basic/ObjCRuntime.h
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/test/Modules/context-hash.c
    M llvm/include/llvm/Support/VersionTuple.h

  Log Message:
  -----------
  [clang] Include missing LangOpts in `getModuleHash`.

`ObjCRuntime` and `CommentOpts.BlockCommandNames` are checked by
`ASTReader::checkLanguageOptions`, but are not part of the module
context hash. This can lead to errors when using implicit modules if
different TUs have different values for these options when using the
same module cache.

This was not hit very often due to the rare usage of
`-fblock-command-names=` and that `ObjCRuntime` is by default set by
the target triple, which is part of the existing context hash.




More information about the All-commits mailing list