Skip to content

Commit

Permalink
Move DEBUG_TYPE below LLVM headers (#44997)
Browse files Browse the repository at this point in the history
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 authored Apr 16, 2022
1 parent d28a0dd commit 6106e6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

2 comments on commit 6106e6c

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - no new issues were detected. A full report can be found here.

Please sign in to comment.