Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move DEBUG_TYPE below LLVM headers #44997

Merged
merged 1 commit into from
Apr 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move DEBUG_TYPE below LLVM headers
Some LLVM headers set DEBUG_TYPE internally (and undef it later),
causing build failures with the newly added STATISTICs. Fix that
by moving DEBUG_TYPE below the headers.

[1] https://github.com/llvm/llvm-project/blob/09c2b7c35af8c4bad39f03e9f60df8bd07323028/llvm/include/llvm/Support/GenericDomTreeConstruction.h#L49
  • Loading branch information
Keno committed Apr 15, 2022
commit 712ec771f756edcb69c91933b0228ca173874c8a
3 changes: 2 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#define DEBUG_TYPE "julia_irgen_codegen"
#undef DEBUG
#include "llvm-version.h"
#include "platform.h"
Expand Down Expand Up @@ -87,6 +86,8 @@
#include <llvm/Bitcode/BitcodeReader.h>
#include <llvm/Linker/Linker.h>

#define DEBUG_TYPE "julia_irgen_codegen"

using namespace llvm;

STATISTIC(EmittedAllocas, "Number of allocas emitted");
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-alloc-opt.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

#define DEBUG_TYPE "alloc_opt"
#undef DEBUG
#include "llvm-version.h"

Expand Down Expand Up @@ -38,6 +37,7 @@
#include <map>
#include <set>

#define DEBUG_TYPE "alloc_opt"
#include "julia_assert.h"

using namespace llvm;
Expand Down