[PATCH] D142803: [LogicCombine 1/?] Implement a general way to simplify logical operations.

Alex Langford via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 15:14:30 PST 2023


bulbazord added a comment.

This breaks module builds (i.e. `LLVM_ENABLE_MODULES=ON`):

  /Users/alex/llvm-project/llvm/include/llvm/Analysis/LogicalExpr.h:53:7: error: redefinition of 'LogicalExpr'
  class LogicalExpr {
        ^
  /Users/alex/llvm-project/llvm/include/llvm/Analysis/LogicCombine.h:9:10: note: '/Users/alex/llvm-project/llvm/include/llvm/Analysis/LogicalExpr.h' included multiple times, additional include site in header from module 'LLVM_Analysis.LogicalExpr'
  #include "LogicalExpr.h"
           ^
  <module-includes>:67:10: note: '/Users/alex/llvm-project/llvm/include/llvm/Analysis/LogicalExpr.h' included multiple times, additional include site in header from module 'LLVM_Analysis.LogicalExpr'
  #include "Analysis/LogicalExpr.h"
           ^
  /Users/alex/llvm-project/llvm/include/llvm/Analysis/LogicalExpr.h:53:7: note: unguarded header; consider using #ifdef guards or #pragma once
  class LogicalExpr {

I've added header guards to `llvm/include/llvm/Analysis/LogicalExpr.h` and `llvm/include/llvm/LogicCombine.h` in `ff65a586677eb127ea70ca84b91204c0b9940b00`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142803/new/

https://reviews.llvm.org/D142803



More information about the llvm-commits mailing list